Make WordPress Core


Ignore:
Timestamp:
11/08/2016 11:00:38 PM (8 years ago)
Author:
swissspidy
Message:

I18N: Add ability to change user's locale back to site's locale.

Previously there was no way to remove the user locale setting again, even though that might be desirable.

This adds a new 'Site Default' option to the user-specific language setting by introducing a new show_site_locale_default argument to wp_dropdown_languages().

Props ocean90.
See #29783.
Fixes #38632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r39126 r39169  
    10751075                    'description' => __( 'Locale for the resource.' ),
    10761076                    'type'        => 'string',
    1077                     'enum'        => array_merge( array( 'en_US' ), get_available_languages() ),
     1077                    'enum'        => array_merge( array( '', 'en_US' ), get_available_languages() ),
    10781078                    'context'     => array( 'edit' ),
    10791079                ),
Note: See TracChangeset for help on using the changeset viewer.