| Server IP : 162.215.171.210 / Your IP : 216.73.216.249 Web Server : Apache System : Linux 162-215-171-210.bluehost.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : swansondentalgro ( 1070) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/swansondentalgro/.trash/mu-plugins-old/ |
Upload File : |
<?php
/**
* Plugin Name: WP Engine Cache Plugin
* Plugin URI: https://www.wpengine.com
* Description: WP Engine Cache Plugin
* Version: 1.3.0
* Author: WP Engine
*
* @package wpengine\cache_plugin
*/
declare(strict_types=1);
namespace wpengine\cache_plugin;
require_once __DIR__ . '/wpe-cache-plugin/security/security-checks.php';
require_once __DIR__ . '/wpe-cache-plugin/cache-control.php';
require_once __DIR__ . '/wpe-cache-plugin/wpe-admin.php';
\wpengine\cache_plugin\check_security();
define( 'WPE_CACHE_PLUGIN_BASE', __FILE__ );
$plugin_version = get_file_data( WPE_CACHE_PLUGIN_BASE, array( 'Version' => 'Version' ) )['Version'];
define( 'WPE_CACHE_PLUGIN_VERSION', $plugin_version );
$cache_control = new CacheControl( CacheDbSettings::get_instance() );
add_action( 'wp', array( $cache_control, 'wpe_add_cache_header' ) );
add_filter(
'rest_post_dispatch',
function( $result, $server, $request ) use ( $cache_control ) {
$route = $request->get_route();
$cache_control->send_header_cache_control_api( $route );
return $result;
},
10,
3
);
if ( is_admin() ) {
$admin = new WpeAdmin();
$admin->initialize();
}
include_rest_registration();
function include_rest_registration() {
include_once __DIR__ . '/wpe-cache-plugin/register-rest-endpoints.php';
}