Making WordPress.org

Changeset 11039


Ignore:
Timestamp:
06/18/2021 06:30:17 AM (5 years ago)
Author:
dd32
Message:

Translate: Just override the GlotPress placeholder regular expression, rather than checking if GlotPress has updated it yet.

In [11015] I accidentally updated the regex in such a way that it ceased to apply.

Props amieiro.

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

    r11018 r11039  
    312312                // https://github.com/GlotPress/GlotPress-WP/pull/1237
    313313                add_filter( 'gp_warning_placeholders_re', function( $re ) {
    314                         if ( '%(\d+\$(?:\d+)?)?[bcdefgosuxEFGXl]' === $re ) {
    315                                 $re = '(?<!%)%(\d+\$(?:\d+)?)?[bcdefgosuxEFGX%l]';
    316                         }
    317                         return $re;
     314                        return '(?<!%)%(\d+\$(?:\d+)?)?[bcdefgosuxEFGX%l]';
    318315                } );
    319316        }
Note: See TracChangeset for help on using the changeset viewer.