wp_cache_setting()
No Hooks.
Return
null
. Nothing (null).
Usage
wp_cache_setting( $field, $value );
- $field (required)
- -
- $value (required)
- -
wp_cache_setting() wp cache setting code WPSCache 1.12.4
function wp_cache_setting( $field, $value ) { global $wp_cache_config_file; $GLOBALS[ $field ] = $value; if ( is_numeric( $value ) ) { return wp_cache_replace_line( '^ *\$' . $field, "\$$field = $value;", $wp_cache_config_file ); } elseif ( is_bool( $value ) ) { $output_value = $value === true ? 'true' : 'false'; return wp_cache_replace_line( '^ *\$' . $field, "\$$field = $output_value;", $wp_cache_config_file ); } elseif ( is_object( $value ) || is_array( $value ) ) { $text = var_export( $value, true ); $text = preg_replace( '/[\s]+/', ' ', $text ); return wp_cache_replace_line( '^ *\$' . $field, "\$$field = $text;", $wp_cache_config_file ); } else { return wp_cache_replace_line( '^ *\$' . $field, "\$$field = '$value';", $wp_cache_config_file ); } }