W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove %s.', dirname( __FILE__ ) ); } $command = \W3TC\Util_Request::get_string( 'command' ); $nonce = \W3TC\Util_Request::get_string( 'nonce' ); $uri = $_SERVER['REQUEST_URI']; if ( hash_equals( wp_hash( $uri ), $nonce ) ) { /** * * * @var $w3_cache W3_CacheFlush */ $w3_cache = \W3TC\Dispatcher::component( 'CacheFlush' ); $result = false; switch ( $command ) { case 'flush': $result = $w3_cache->opcache_flush(); break; case 'flush_file': $file = \W3TC\Util_Request::get_string( 'file' ); $result = $w3_cache->opcache_flush_file( $file ); break; } if ( $result ) { header( $_SERVER["SERVER_PROTOCOL"] . " 200 OK" ); die( 'Success' ); } else { header( $_SERVER["SERVER_PROTOCOL"] . " 500 OK" ); die( $command . ' could not be executed' ); } } else { header( $_SERVER["SERVER_PROTOCOL"] . " 401" ); die( "Unauthorized access. " ); }