mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Editor: Fix PHP warning in Layout block support.
strpos was triggering a php warning. This also updates the code to use the now supported str_contains. Props get_dave, dmsnell, ocean90, mukesh27. Fixes #60327. git-svn-id: https://develop.svn.wordpress.org/trunk@57383 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b57c822afd
commit
5466d3a9a7
@ -837,7 +837,8 @@ function wp_render_layout_support_flag( $block_content, $block ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( false !== strpos( $processor->get_attribute( 'class' ), $inner_block_wrapper_classes ) ) {
|
||||
$class_attribute = $processor->get_attribute( 'class' );
|
||||
if ( is_string( $class_attribute ) && str_contains( $class_attribute, $inner_block_wrapper_classes ) ) {
|
||||
break;
|
||||
}
|
||||
} while ( $processor->next_tag() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user