-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugin.php
69 lines (58 loc) · 1.62 KB
/
plugin.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* Plugin KAGG Pagespeed Optimization
*
* @package kagg_pagespeed_optimization
* @author KAGG Design
* @license GPL-2.0-or-later
* @wordpress-plugin
*
* Plugin Name: KAGG PageSpeed Optimization
* Plugin URI: https://wordpress.org/plugins/kagg-pagespeed-optimization/
* Description: Optimize scripts and styles to get higher scores of Google Pagespeed Insights
* Author: KAGG Design
* Version: 1.7.0
* Author URI: https://kagg.eu/en/
* Requires at least: 5.0
* Tested up to: 6.7
*
* Text Domain: kagg-pagespeed-optimization
* Domain Path: /languages/
*/
use KAGG\PageSpeed\Optimization\Main;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Plugin version
*/
const KAGG_PAGESPEED_OPTIMIZATION_VERSION = '1.7.0';
/**
* Path to the plugin dir.
*/
const KAGG_PAGESPEED_OPTIMIZATION_PATH = __DIR__;
/**
* Plugin dir url.
*/
define( 'KAGG_PAGESPEED_OPTIMIZATION_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
/**
* Plugin main file.
*/
const KAGG_PAGESPEED_OPTIMIZATION_FILE = __FILE__;
/**
* Init plugin on plugin load.
*/
require_once constant( 'KAGG_PAGESPEED_OPTIMIZATION_PATH' ) . '/vendor/autoload.php';
/**
* Get KAGG Pagespeed Optimization Main class instance.
*
* @return Main
*/
function kagg_pagespeed_optimization(): Main {
static $kagg_pagespeed_optimization;
if ( ! $kagg_pagespeed_optimization ) {
$kagg_pagespeed_optimization = new Main();
}
return $kagg_pagespeed_optimization;
}
kagg_pagespeed_optimization()->init();