Changeset 55988 for trunk/src/wp-includes/blocks.php
- Timestamp:
- 06/22/2023 02:34:56 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r55952 r55988 584 584 } 585 585 586 return false !== strpos( (string) $post, '<!-- wp:' );586 return str_contains( (string) $post, '<!-- wp:' ); 587 587 } 588 588 … … 620 620 * their serialized names. 621 621 */ 622 if ( false === strpos( $block_name, '/' ) ) {622 if ( ! str_contains( $block_name, '/' ) ) { 623 623 $block_name = 'core/' . $block_name; 624 624 } 625 625 626 626 // Test for existence of block by its fully qualified name. 627 $has_block = false !== strpos( $post, '<!-- wp:' . $block_name . ' ' );627 $has_block = str_contains( $post, '<!-- wp:' . $block_name . ' ' ); 628 628 629 629 if ( ! $has_block ) { … … 634 634 $serialized_block_name = strip_core_block_namespace( $block_name ); 635 635 if ( $serialized_block_name !== $block_name ) { 636 $has_block = false !== strpos( $post, '<!-- wp:' . $serialized_block_name . ' ' );636 $has_block = str_contains( $post, '<!-- wp:' . $serialized_block_name . ' ' ); 637 637 } 638 638 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)