mirror of
https://ghproxy.net/https://github.com/abhijitb/helix.git
synced 2025-08-28 06:26:00 +08:00
fixed timezone saving
This commit is contained in:
parent
9e560f9846
commit
9dbbd4a93c
2 changed files with 121 additions and 52 deletions
|
@ -146,8 +146,13 @@ function helix_update_settings( $request ) {
|
|||
// Get the WordPress option name for this setting
|
||||
$option_name = helix_get_wp_option_name( $setting );
|
||||
|
||||
// Update the WordPress option
|
||||
$result = update_option( $option_name, $sanitized_value );
|
||||
// Special handling for timezone setting
|
||||
if ( $setting === 'timezone' ) {
|
||||
$result = helix_update_timezone_setting( $sanitized_value );
|
||||
} else {
|
||||
// Update the WordPress option normally
|
||||
$result = update_option( $option_name, $sanitized_value );
|
||||
}
|
||||
|
||||
// Special handling for WPLANG option
|
||||
if ( $option_name === 'WPLANG' && ! $result ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue