Changeset 55988 for trunk/src/wp-includes/shortcodes.php
- Timestamp:
- 06/22/2023 02:34:56 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/shortcodes.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/shortcodes.php
r55711 r55988 148 148 */ 149 149 function has_shortcode( $content, $tag ) { 150 if ( false === strpos( $content, '[' ) ) {150 if ( ! str_contains( $content, '[' ) ) { 151 151 return false; 152 152 } … … 206 206 global $shortcode_tags; 207 207 208 if ( false === strpos( $content, '[' ) ) {208 if ( ! str_contains( $content, '[' ) ) { 209 209 return $content; 210 210 } … … 413 413 } 414 414 415 $noopen = false === strpos( $element, '[' );416 $noclose = false === strpos( $element, ']' );415 $noopen = ! str_contains( $element, '[' ); 416 $noclose = ! str_contains( $element, ']' ); 417 417 if ( $noopen || $noclose ) { 418 418 // This element does not contain shortcodes. … … 560 560 // Reject any unclosed HTML elements. 561 561 foreach ( $atts as &$value ) { 562 if ( false !== strpos( $value, '<' ) ) {562 if ( str_contains( $value, '<' ) ) { 563 563 if ( 1 !== preg_match( '/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value ) ) { 564 564 $value = ''; … … 635 635 global $shortcode_tags; 636 636 637 if ( false === strpos( $content, '[' ) ) {637 if ( ! str_contains( $content, '[' ) ) { 638 638 return $content; 639 639 }
Note: See TracChangeset
for help on using the changeset viewer.