WP_Super_Cache_Rest_Update_Settings::set_debug_settings() public WPSCache 1.0
Update the debug settings.
{} It's a method of the class: WP_Super_Cache_Rest_Update_Settings{}
No Hooks.
Return
WP_Error/WP_REST_Response.
Usage
$WP_Super_Cache_Rest_Update_Settings = new WP_Super_Cache_Rest_Update_Settings(); $WP_Super_Cache_Rest_Update_Settings->set_debug_settings( $parameters );
- $request(WP_REST_Request) (required)
- Full data about the request.
Code of WP_Super_Cache_Rest_Update_Settings::set_debug_settings() WP Super Cache Rest Update Settings::set debug settings WPSCache 1.7.1
public function set_debug_settings( $parameters ) {
$settings = array (
'wp_super_cache_debug',
'wp_cache_debug_ip',
'wp_super_cache_comments',
'wp_super_cache_front_page_check',
'wp_super_cache_front_page_clear',
'wp_super_cache_front_page_text',
'wp_super_cache_front_page_notification',
'wpsc_delete_log',
);
foreach( $settings as $setting ) {
if ( isset( $parameters[ $setting ] ) ) {
if ( $parameters[ $setting ] != false ) {
$_POST[ $setting ] = $parameters[ $setting ];
}
$_POST[ 'wp_cache_debug' ] = 1;
} else {
if ( ! isset( $GLOBALS[ $setting ] ) ) {
$GLOBALS[ $setting ] = 0;
}
$_POST[ $setting ] = $GLOBALS[ $setting ];
}
}
global $valid_nonce;
$valid_nonce = true;
$settings = wpsc_update_debug_settings();
}