-
Notifications
You must be signed in to change notification settings - Fork 3
/
servebolt-optimizer.php
42 lines (37 loc) · 1.46 KB
/
servebolt-optimizer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/*
Plugin Name: Servebolt Optimizer
Version: 3.5.45
Author: Servebolt
Author URI: https://servebolt.com
Description: A plugin that implements Servebolt Security & Performance best practises for WordPress.
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: servebolt-wp
*/
if (!defined('ABSPATH')) exit; // Exit if accessed directly
// Defines plugin paths and URLs
define('SERVEBOLT_PLUGIN_FILE', __FILE__);
define('SERVEBOLT_PLUGIN_BASENAME', plugin_basename(__FILE__));
define('SERVEBOLT_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ));
define('SERVEBOLT_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ));
define('SERVEBOLT_PLUGIN_PSR4_PATH', SERVEBOLT_PLUGIN_DIR_PATH . 'src/Servebolt/');
define('SERVEBOLT_PLUGIN_MINIMUM_PHP_VERSION', '7.4');
define('SERVEBOLT_PLUGIN_ACD_VERSION', '7');
/**
* Added database version for increased flexibilty in updates.
*
* change this number to be higher to apply all available updates
* when updating the plugin tables.
* @since 3.5.11
*/
define('SERVEBOLT_PLUGIN_DB_VERSION', 103);
// Abort and display WP admin notice if PHP version is less than constant SERVEBOLT_PLUGIN_MINIMUM_PHP_VERSION
if (version_compare(phpversion(), SERVEBOLT_PLUGIN_MINIMUM_PHP_VERSION, '<')) {
require SERVEBOLT_PLUGIN_DIR_PATH . 'php-outdated.php';
return;
}
// Load Composer dependencies
require SERVEBOLT_PLUGIN_DIR_PATH . 'vendor/autoload.php';
// Boot plugin
Servebolt\Optimizer\ServeboltOptimizer::boot();