PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / 1.4.1
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel v1.4.1
1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 1.5.1 All 26 releases
flywp / includes / Optimizations / Base.php

Base.php in FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel 1.4.1, at includes/Optimizations/Base.php

49 lines 926 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FlyWP\Optimizations;
4
5 use FlyWP\Optimizations;
6
7 abstract class Base {
8
9 /**
10 * Optimizations instance
11 *
12 * @var Optimizations
13 */
14 protected $optimizations;
15
16 /**
17 * Group name
18 *
19 * @var string
20 */
21 protected $group;
22
23 /**
24 * Features to remove.
25 *
26 * @var array
27 */
28 protected $features = [];
29
30 /**
31 * Class constructor
32 *
33 * @param Optimizations $optimizations optimizations instance
34 *
35 * @return void
36 */
37 public function __construct( Optimizations $optimizations ) {
38 $this->optimizations = $optimizations;
39
40 foreach ( $this->features as $feature => $method ) {
41 if ( $this->optimizations->feature_enabled( $feature, $this->group ) ) {
42 if ( method_exists( $this, $method ) ) {
43 $this->$method();
44 }
45 }
46 }
47 }
48 }
49