diff --git a/includes/system/class-option.php b/includes/system/class-option.php index 190a423..7f90aa0 100644 --- a/includes/system/class-option.php +++ b/includes/system/class-option.php @@ -121,8 +121,8 @@ public static function site_get( $option, $default = null ) { $default = self::$defaults[ $option ]; } $val = get_option( APCM_PRODUCT_ABBREVIATION . '_' . $option, $default ); - if ( empty( $val ) && is_bool( $default ) ) { - return $default; + if ( is_bool( $default ) ) { + return (bool) $val; } return $val; } @@ -140,8 +140,8 @@ public static function network_get( $option, $default = null ) { $default = self::$defaults[ $option ]; } $val = get_site_option( APCM_PRODUCT_ABBREVIATION . '_' . $option, $default ); - if ( empty( $val ) && is_bool( $default ) ) { - return $default; + if ( is_bool( $default ) ) { + return (bool) $val; } return $val; } @@ -193,9 +193,6 @@ public static function site_set( $option, $value, $autoload = null ) { * @since 1.0.0 */ public static function network_set( $option, $value ) { - if ( false === $value ) { - update_site_option( APCM_PRODUCT_ABBREVIATION . '_' . $option, true ); - } return update_site_option( APCM_PRODUCT_ABBREVIATION . '_' . $option, $value ); }