Changeset 11015
- Timestamp:
- 06/07/2021 01:36:48 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-custom-warnings/wporg-gp-custom-warnings.php
r10955 r11015 276 276 public function warning_unexpected_sprintf_token( $original, $translation ) { 277 277 $unexpected_tokens = []; 278 $is_sprintf = preg_match( '!%((\d+\$(?:\d+)?)?[bcdefgosux ])!i', $original );278 $is_sprintf = preg_match( '!%((\d+\$(?:\d+)?)?[bcdefgosuxl])!i', $original ); 279 279 280 280 // Find any percents that are not valid or escaped. … … 285 285 foreach ( $m['char'] as $i => $char ) { 286 286 // % is included for escaped %%. 287 if ( false === strpos( 'bcdefgosux% ', $char ) ) {287 if ( false === strpos( 'bcdefgosux%l', $char ) ) { 288 288 $unexpected_tokens[] = $m[0][ $i ]; 289 289 } … … 312 312 // https://github.com/GlotPress/GlotPress-WP/pull/1237 313 313 add_filter( 'gp_warning_placeholders_re', function( $re ) { 314 if ( '%(\d+\$(?:\d+)?)?[bcdefgosuxEFGX ]' === $re ) {315 $re = '(?<!%)%(\d+\$(?:\d+)?)?[bcdefgosuxEFGX% ]';314 if ( '%(\d+\$(?:\d+)?)?[bcdefgosuxEFGXl]' === $re ) { 315 $re = '(?<!%)%(\d+\$(?:\d+)?)?[bcdefgosuxEFGX%l]'; 316 316 } 317 317 return $re;
Note: See TracChangeset
for help on using the changeset viewer.