Changeset 61053
- Timestamp:
- 10/22/2025 11:23:50 PM (3 weeks ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/formatting.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r60913 r61053 447 447 $pre_tags = array(); 448 448 449 if ( trim( $text ) === '') {449 if ( '' === trim( $text ) ) { 450 450 return ''; 451 451 } … … 1182 1182 $unicode_length += $encoded_char_length; 1183 1183 } else { 1184 if ( count( $values ) === 0) {1184 if ( 0 === count( $values ) ) { 1185 1185 if ( $value < 224 ) { 1186 1186 $num_octets = 2; … … 2559 2559 */ 2560 2560 function balanceTags( $text, $force = false ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid 2561 if ( $force || (int) get_option( 'use_balanceTags' ) === 1) {2561 if ( $force || 1 === (int) get_option( 'use_balanceTags' ) ) { 2562 2562 return force_balance_tags( $text ); 2563 2563 } else { … … 3000 3000 // Removed trailing [.,;:)] from URL. 3001 3001 $last_char = substr( $dest, -1 ); 3002 if ( in_array( $last_char, array( '.', ',', ';', ':', ')' ), true ) === true) {3002 if ( in_array( $last_char, array( '.', ',', ';', ':', ')' ), true ) ) { 3003 3003 $ret = $last_char; 3004 3004 $dest = substr( $dest, 0, strlen( $dest ) - 1 ); … … 3327 3327 3328 3328 // Don't run (more expensive) regex if no links with targets. 3329 if ( stripos( $text, 'target' ) === false || stripos( $text, '<a ' ) === false|| is_serialized( $text ) ) {3329 if ( false === stripos( $text, 'target' ) || false === stripos( $text, '<a ' ) || is_serialized( $text ) ) { 3330 3330 return $text; 3331 3331 } … … 3447 3447 global $wpsmiliestrans; 3448 3448 3449 if ( count( $matches ) === 0) {3449 if ( 0 === count( $matches ) ) { 3450 3450 return ''; 3451 3451 } … … 3573 3573 3574 3574 // Test for an @ character after the first position. 3575 if ( strpos( $email, '@', 1 ) === false) {3575 if ( false === strpos( $email, '@', 1 ) ) { 3576 3576 /** This filter is documented in wp-includes/formatting.php */ 3577 3577 return apply_filters( 'is_email', false, $email, 'email_no_at' ); … … 3787 3787 3788 3788 // Test for an @ character after the first position. 3789 if ( strpos( $email, '@', 1 ) === false) {3789 if ( false === strpos( $email, '@', 1 ) ) { 3790 3790 /** This filter is documented in wp-includes/formatting.php */ 3791 3791 return apply_filters( 'sanitize_email', '', $email, 'email_no_at' ); … … 5363 5363 $args = (array) $args; 5364 5364 $result = array_shift( $args ); 5365 if ( count( $args ) === 1) {5365 if ( 1 === count( $args ) ) { 5366 5366 $result .= $l['between_only_two'] . array_shift( $args ); 5367 5367 }
Note: See TracChangeset
for help on using the changeset viewer.