芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/www/wp-content/plugins/google-site-kit/includes/Core/Modules/Module_Settings.php
add_option_default_filters(); } /** * Merges an array of settings to update. * * Only existing keys will be updated. * * @since 1.3.0 * * @param array $partial Partial settings array to save. * * @return bool True on success, false on failure. */ public function merge( array $partial ) { $settings = $this->get(); $partial = array_filter( $partial, function ( $value ) { return null !== $value; } ); $updated = array_intersect_key( $partial, $settings ); return $this->set( array_merge( $settings, $updated ) ); } /** * Registers a filter to ensure default values are present in the saved option. * * @since 1.2.0 */ protected function add_option_default_filters() { add_filter( 'option_' . static::OPTION, function ( $option ) { if ( ! is_array( $option ) ) { return $this->get_default(); } return $option; }, 0 ); // Fill in any missing keys with defaults. // Must run later to not conflict with legacy key migration. add_filter( 'option_' . static::OPTION, function ( $option ) { if ( is_array( $option ) ) { return $option + $this->get_default(); } return $option; }, 99 ); } /** * Gets the expected value type. * * @since 1.2.0 * * @return string The type name. */ protected function get_type() { return 'object'; } }