Making WordPress.org


Ignore:
Timestamp:
08/25/2021 04:54:00 AM (3 years ago)
Author:
dd32
Message:

Translate: Expand the ###...### placeholder format to accept lowercase characters and dashes.

This makes the placeholder format more generic than just how it's used within WordPress core, and how it'll likely be used within Openverse strings.

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

    r11194 r11198  
    231231     * Adds a warning for changing placeholders.
    232232     *
    233      * This only supports placeholders in the format of '###[A-Z_]+###'.
     233     * This only supports placeholders in the format of '###[A-Za-z_-]+###'.
    234234     *
    235235     * @param string $original    The original string.
     
    237237     */
    238238    public function warning_mismatching_placeholders( $original, $translation ) {
    239         $placeholder_regex = '@(###[A-Z_]+###)@';
     239        $placeholder_regex = '@(###[A-Za-z_-]+###)@';
    240240
    241241        preg_match_all( $placeholder_regex, $original, $original_placeholders );
Note: See TracChangeset for help on using the changeset viewer.