WP_Super_Cache_Rest_Update_Settings::set_debug_settings()
Update the debug settings.
Метод класса: WP_Super_Cache_Rest_Update_Settings{}
Хуков нет.
Возвращает
WP_Error|WP_REST_Response
.
Использование
$WP_Super_Cache_Rest_Update_Settings = new WP_Super_Cache_Rest_Update_Settings(); $WP_Super_Cache_Rest_Update_Settings->set_debug_settings( $parameters );
- $parameters (обязательный)
- -
Код WP_Super_Cache_Rest_Update_Settings::set_debug_settings() WP Super Cache Rest Update Settings::set debug settings WPSCache 1.12.4
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(); }