WordPress.org

Make WordPress Core

Changeset 39331


Ignore:
Timestamp:
11/21/2016 04:14:01 PM (18 months ago)
Author:
ocean90
Message:

I18N: In wp_dropdown_languages() rename the new show_site_locale_default argument to show_option_site_default.

This makes it consistent with arguments of other wp_dropdown_*() functions.

Props SergeyBiryukov.
See #38632.
Fixes #38871.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-edit.php

    r39169 r39331  
    296296            'languages'                   => $languages,
    297297            'show_available_translations' => false,
    298             'show_site_locale_default'    => true
     298            'show_option_site_default'    => true
    299299        ) );
    300300        ?>
  • trunk/src/wp-includes/l10n.php

    r39330 r39331  
    11091109 * @since 4.0.0
    11101110 * @since 4.3.0 Introduced the `echo` argument.
    1111  * @since 4.7.0 Introduced the `show_site_locale_default` argument.
     1111 * @since 4.7.0 Introduced the `show_option_site_default` argument.
    11121112 *
    11131113 * @see get_available_languages()
     
    11271127 *                                                  boolean equivalents. Default 1.
    11281128 *     @type bool     $show_available_translations  Whether to show available translations. Default true.
    1129  *     @type bool     $show_site_locale_default     Whether to show an option to fall back to the site's locale. Default false.
     1129 *     @type bool     $show_option_site_default     Whether to show an option to fall back to the site's locale. Default false.
    11301130 * }
    11311131 * @return string HTML content
     
    11411141        'echo'         => 1,
    11421142        'show_available_translations' => true,
    1143         'show_site_locale_default'    => false,
     1143        'show_option_site_default'    => false,
    11441144    ) );
    11451145
     
    11921192    }
    11931193
    1194     if ( $args['show_site_locale_default'] ) {
     1194    if ( $args['show_option_site_default'] ) {
    11951195        $structure[] = sprintf(
    11961196            '<option value="site-default" data-installed="1"%s>%s</option>',
  • trunk/tests/phpunit/tests/l10n.php

    r39169 r39331  
    111111            'selected'                 => 'de_DE',
    112112            'echo'                     => false,
    113             'show_site_locale_default' => true,
     113            'show_option_site_default' => true,
    114114        );
    115115        $actual = wp_dropdown_languages( $args );
Note: See TracChangeset for help on using the changeset viewer.