WP_Super_Cache_Rest_Get_Stats::callback()
Get the cache stats for the site.
Method of the class: WP_Super_Cache_Rest_Get_Stats{}
No Hooks.
Return
WP_Error|WP_REST_Response
.
Usage
$WP_Super_Cache_Rest_Get_Stats = new WP_Super_Cache_Rest_Get_Stats(); $WP_Super_Cache_Rest_Get_Stats->callback( $request );
- $request(WP_REST_Request) (required)
- Full data about the request.
WP_Super_Cache_Rest_Get_Stats::callback() WP Super Cache Rest Get Stats::callback code WPSCache 1.12.4
public function callback( $request ) { global $valid_nonce; $_GET[ 'listfiles' ] = 1; $valid_nonce = true; return rest_ensure_response( wp_cache_regenerate_cache_file_stats() ); }