Changeset 55990 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 06/22/2023 02:55:47 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r55988 r55990 243 243 $first = $curl[0]; 244 244 if ( '<' === $first ) { 245 if ( '<!--' === substr( $curl, 0, 4) ) {245 if ( str_starts_with( $curl, '<!--' ) ) { 246 246 // This is an HTML comment delimiter. 247 247 continue; … … 261 261 // This is a shortcode delimiter. 262 262 263 if ( '[[' !== substr( $curl, 0, 2 ) && ']]' !== substr( $curl, -2) ) {263 if ( ! str_starts_with( $curl, '[[' ) && ! str_ends_with( $curl, ']]' ) ) { 264 264 // Looks like a normal shortcode. 265 265 _wptexturize_pushpop_element( $curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes ); … … 2628 2628 $pre_attribute_ws = isset( $regex[4] ) ? $regex[4] : ''; 2629 2629 $attributes = trim( isset( $regex[5] ) ? $regex[5] : $regex[3] ); 2630 $has_self_closer = '/' === substr( $attributes, -1);2630 $has_self_closer = str_ends_with( $attributes, '/' ); 2631 2631 2632 2632 $newtext .= $tagqueue; … … 3694 3694 $offset = 0; 3695 3695 } else { 3696 $sign = ( '+' === substr( $timezone, 0, 1) ) ? 1 : -1;3696 $sign = ( str_starts_with( $timezone, '+' ) ) ? 1 : -1; 3697 3697 $hours = (int) substr( $timezone, 1, 2 ); 3698 3698 $minutes = (int) substr( $timezone, 3, 4 ) / 60; … … 5267 5267 function wp_sprintf_l( $pattern, $args ) { 5268 5268 // Not a match. 5269 if ( '%l' !== substr( $pattern, 0, 2) ) {5269 if ( ! str_starts_with( $pattern, '%l' ) ) { 5270 5270 return $pattern; 5271 5271 }
Note: See TracChangeset
for help on using the changeset viewer.