diff --git wp-includes/functions.php wp-includes/functions.php
index eb9715d..67f2231 100644
|
|
|
function global_terms_enabled() { |
| 3265 | 3265 | } |
| 3266 | 3266 | |
| 3267 | 3267 | /** |
| | 3268 | * Get the timezone object |
| | 3269 | * |
| | 3270 | * Uses timezone_string for a proper timezone if available, otherwise falls back |
| | 3271 | * to an offset. |
| | 3272 | * |
| | 3273 | * @return DateTimeZone |
| | 3274 | */ |
| | 3275 | function wp_get_timezone() { |
| | 3276 | $tzstring = get_option( 'timezone_string' ); |
| | 3277 | if ( ! $tzstring ) { |
| | 3278 | // Create a UTC+- zone if no timezone string exists |
| | 3279 | $current_offset = get_option( 'gmt_offset' ); |
| | 3280 | if ( 0 == $current_offset ) |
| | 3281 | $tzstring = 'UTC'; |
| | 3282 | elseif ($current_offset < 0) |
| | 3283 | $tzstring = 'Etc/GMT' . $current_offset; |
| | 3284 | else |
| | 3285 | $tzstring = 'Etc/GMT+' . $current_offset; |
| | 3286 | } |
| | 3287 | $zone = new DateTimeZone( $tzstring ); |
| | 3288 | return $zone; |
| | 3289 | } |
| | 3290 | |
| | 3291 | /** |
| 3268 | 3292 | * gmt_offset modification for smart timezone handling. |
| 3269 | 3293 | * |
| 3270 | 3294 | * Overrides the gmt_offset option if we have a timezone_string available. |