Skip to content

Commit

Permalink
Respect users locale
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Jul 31, 2024
1 parent 34fbd13 commit 985d7a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions includes/core/classes/class-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ public static function unprefix_key( string $key ): string {
* @return array An array of time zones with labels as keys and time zone choices as values.
*/
public static function timezone_choices(): array {
$timezones_raw = explode( PHP_EOL, wp_timezone_choice( 'UTC' ) );
$timezones_clean = array();
$timezones_raw = explode( PHP_EOL, wp_timezone_choice( 'UTC', get_user_locale() ) );
$group = null;

foreach ( $timezones_raw as $timezone ) {
Expand Down

0 comments on commit 985d7a7

Please sign in to comment.