PluginProbe ʕ •ᴥ•ʔ
Speed Optimizer – The All-In-One Performance-Boosting Plugin / 7.7.10
Speed Optimizer – The All-In-One Performance-Boosting Plugin v7.7.10
7.7.11 7.7.10 trunk 7.6.4 7.6.5 7.6.6 7.6.7 7.6.8 7.7.0 7.7.1 7.7.2 7.7.3 7.7.4 7.7.5 7.7.6 7.7.7 7.7.8 7.7.9
sg-cachepress / sg-cachepress.php
sg-cachepress Last commit date
assets 4 weeks ago core 4 weeks ago helpers 4 weeks ago templates 4 weeks ago vendor 4 weeks ago readme.txt 4 weeks ago sg-cachepress.php 4 weeks ago uninstall.php 4 weeks ago
sg-cachepress.php
75 lines
1 <?php
2 /**
3 * SG CachePress
4 *
5 * @package SG_CachePress
6 * @author SiteGround
7 * @link http://www.siteground.com/
8 *
9 * @wordpress-plugin
10 * Plugin Name: Speed Optimizer
11 * Plugin URI: https://siteground.com
12 * Description: This plugin will link your WordPress application with all the performance optimizations provided by SiteGround
13 * Version: 7.7.10
14 * Author: SiteGround
15 * Author URI: https://www.siteground.com
16 * Text Domain: sg-cachepress
17 * Domain Path: /languages
18 * License: GPLv3
19 */
20
21 // Our namespace.
22 namespace SiteGround_Optimizer;
23
24 use SiteGround_Optimizer\Loader\Loader;
25 use SiteGround_Optimizer\Helper\Helper;
26 use SiteGround_Optimizer\Activator\Activator;
27 use SiteGround_Optimizer\Deactivator\Deactivator;
28
29 // If this file is called directly, abort.
30 if ( ! defined( 'WPINC' ) ) {
31 die;
32 }
33
34 // Define version constant.
35 if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) {
36 define( __NAMESPACE__ . '\VERSION', '7.7.10' );
37 }
38
39 // Define slug constant.
40 if ( ! defined( __NAMESPACE__ . '\PLUGIN_SLUG' ) ) {
41 define( __NAMESPACE__ . '\PLUGIN_SLUG', 'sg-cachepress' );
42 }
43
44 // Define root directory.
45 if ( ! defined( __NAMESPACE__ . '\DIR' ) ) {
46 define( __NAMESPACE__ . '\DIR', __DIR__ );
47 }
48
49 // Define root URL.
50 if ( ! defined( __NAMESPACE__ . '\URL' ) ) {
51 $root_url = \trailingslashit( DIR );
52
53 // Sanitize directory separator on Windows.
54 $root_url = str_replace( '\\', '/', $root_url );
55
56 $wp_plugin_dir = str_replace( '\\', '/', WP_PLUGIN_DIR );
57 $root_url = str_replace( $wp_plugin_dir, \plugins_url(), $root_url );
58
59 define( __NAMESPACE__ . '\URL', \untrailingslashit( $root_url ) );
60
61 unset( $root_url );
62 }
63
64 require_once( \SiteGround_Optimizer\DIR . '/vendor/autoload.php' );
65
66 register_activation_hook( __FILE__, array( new Activator(), 'activate' ) );
67 register_deactivation_hook( __FILE__, array( new Deactivator(), 'deactivate' ) );
68
69 // Initialize the loader.
70 global $siteground_optimizer_loader;
71
72 if ( ! isset( $siteground_optimizer_loader ) ) {
73 $siteground_optimizer_loader = new Loader();
74 }
75