|
4 | 4 | * Plugin URI: |
5 | 5 | * Description: Optimize external scripts by storing them locally |
6 | 6 | * Author: KAGG Design |
7 | | - * Version: 1.0.1 |
| 7 | + * Version: 1.0.2 |
8 | 8 | * Author URI: https://kagg.eu/en/ |
9 | 9 | * Requires at least: 4.4 |
10 | | - * Tested up to: 5.0 |
| 10 | + * Tested up to: 5.4 |
11 | 11 | * |
12 | 12 | * Text Domain: kagg-pagespeed-optimization |
13 | 13 | * Domain Path: /languages/ |
14 | 14 | * |
15 | 15 | * @package PageSpeed Optimization |
16 | | - * @author KAGG Design |
| 16 | + * @author KAGG Design |
17 | 17 | */ |
18 | 18 |
|
19 | 19 | if ( ! defined( 'ABSPATH' ) ) { |
20 | 20 | exit; // Exit if accessed directly. |
21 | 21 | } |
22 | 22 |
|
23 | | -// Define WC_PLUGIN_FILE. |
24 | | -if ( ! defined( 'PAGESPEED_OPTIMIZATION_PLUGIN_FILE' ) ) { |
25 | | - define( 'PAGESPEED_OPTIMIZATION_PLUGIN_FILE', __FILE__ ); |
| 23 | +if ( defined( 'PAGESPEED_OPTIMIZATION_PLUGIN_FILE' ) ) { |
| 24 | + return; |
26 | 25 | } |
27 | 26 |
|
28 | 27 | /** |
29 | | - * Init PageSpeed Optimization class on plugin load. |
| 28 | + * Plugin main file. |
30 | 29 | */ |
| 30 | +define( 'PAGESPEED_OPTIMIZATION_PLUGIN_FILE', __FILE__ ); |
31 | 31 |
|
32 | | -function init_pagespeed_optimization_class() { |
33 | | - static $plugin; |
34 | | - |
35 | | - if ( ! isset( $plugin ) ) { |
36 | | - // Require plugin classes. |
37 | | - require_once dirname( __FILE__ ) . '/includes/class-pagespeed-optimization.php'; |
38 | | - require_once dirname( __FILE__ ) . '/includes/class-pagespeed-filesystem.php'; |
39 | | - require_once dirname( __FILE__ ) . '/includes/class-pagespeed-resources-to-footer.php'; |
40 | | - |
41 | | - $plugin = new PageSpeed_Optimization(); |
42 | | - new PageSpeed_Resources_To_Footer(); |
43 | | - } |
44 | | -} |
45 | | - |
46 | | -init_pagespeed_optimization_class(); |
| 32 | +/** |
| 33 | + * Init PageSpeed Optimization classes on plugin load. |
| 34 | + */ |
| 35 | +require_once dirname( __FILE__ ) . '/includes/class-pagespeed-optimization.php'; |
| 36 | +require_once dirname( __FILE__ ) . '/includes/class-pagespeed-filesystem.php'; |
| 37 | +require_once dirname( __FILE__ ) . '/includes/class-pagespeed-resources-to-footer.php'; |
47 | 38 |
|
| 39 | +new PageSpeed_Optimization(); |
| 40 | +new PageSpeed_Resources_To_Footer(); |
0 commit comments