WP_Super_Cache_Rest_Update_Settings::restore_default_settings
Delete the plugin configuration file and restore the sample one.
Method of the class: WP_Super_Cache_Rest_Update_Settings{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->restore_default_settings( $parameters );
- $parameters(required)
- .
WP_Super_Cache_Rest_Update_Settings::restore_default_settings() WP Super Cache Rest Update Settings::restore default settings code WPSCache 3.1.1
protected function restore_default_settings( $parameters ) {
global $wp_cache_config_file, $wp_cache_config_file_sample;
if ( file_exists( $wp_cache_config_file_sample ) ) {
copy( $wp_cache_config_file_sample, $wp_cache_config_file );
$cache_page_secret = md5( gmdate( 'H:i:s' ) . wp_rand() );
wp_cache_setting( 'cache_page_secret', $cache_page_secret );
if ( function_exists( "opcache_invalidate" ) ) {
@opcache_invalidate( $wp_cache_config_file );
}
}
wpsc_set_default_gc( true );
}