classes/autoptimizeExtra.php 1 location
|
@@ 33-41 (lines=9) @@
|
| 30 |
|
$this->options = $options; |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
public function run() |
| 34 |
|
{ |
| 35 |
|
if ( is_admin() ) { |
| 36 |
|
add_action( 'admin_menu', array( $this, 'admin_menu' ) ); |
| 37 |
|
add_filter( 'autoptimize_filter_settingsscreen_tabs', array( $this, 'add_extra_tab' ) ); |
| 38 |
|
} else { |
| 39 |
|
$this->run_on_frontend(); |
| 40 |
|
} |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public static function fetch_options() |
| 44 |
|
{ |
classes/autoptimizeImages.php 1 location
|
@@ 97-105 (lines=9) @@
|
| 94 |
|
return self::$instance; |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
public function run() |
| 98 |
|
{ |
| 99 |
|
if ( is_admin() ) { |
| 100 |
|
add_action( 'admin_menu', array( $this, 'imgopt_admin_menu' ) ); |
| 101 |
|
add_filter( 'autoptimize_filter_settingsscreen_tabs', array( $this, 'add_imgopt_tab' ), 9 ); |
| 102 |
|
} else { |
| 103 |
|
$this->run_on_frontend(); |
| 104 |
|
} |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
public function run_on_frontend() { |
| 108 |
|
if ( ! $this->should_run() ) { |