Changeset 11315
- Timestamp:
- 11/05/2021 05:03:11 AM (3 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
r11314 r11315 281 281 if ( $is_sprintf ) { 282 282 // Negative/Positive lookahead not used to allow the warning to include the context around the % sign. 283 preg_match_all( '/(?P<context>[^\s%]*)%((\d+\$(?:\d+)?)?( \.\d+)?(?P<char>.))/i', $translation, $m );283 preg_match_all( '/(?P<context>[^\s%]*)%((\d+\$(?:\d+)?)?(?P<char>.))/i', $translation, $m ); 284 284 285 285 foreach ( $m['char'] as $i => $char ) { 286 if ( 287 // % is included for escaped %%. 288 false === strpos( 'bcdefgosux%l', $char ) && 289 // Check the "placeholder" doesn't exist within the original, as an extra safety mechanism. 290 false === strpos( $original, $m[0][ $i ] ) 291 ) { 286 // % is included for escaped %%. 287 if ( false === strpos( 'bcdefgosux%l.', $char ) ) { 292 288 $unexpected_tokens[] = $m[0][ $i ]; 293 289 }
Note: See TracChangeset
for help on using the changeset viewer.