fixed timezone saving

This commit is contained in:
Abhijit Bhatnagar 2025-08-17 02:00:42 +05:30
parent 9e560f9846
commit 9dbbd4a93c
2 changed files with 121 additions and 52 deletions

View file

@ -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 ) {