| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | /** |
| 3 | 4 | * The Conflicting Plugins class, documents and displays dashboard notice for conflicting plugins. |
| 4 | 5 | * |
| 5 | 6 | * @package \Optimole\Inc\Conflicts |
| @@ -50,8 +51,11 @@ | ||
| 50 | 51 | 'ewww' => 'ewww-image-optimizer/ewww-image-optimizer.php', |
| 51 | 52 | 'ewww-cloud' => 'ewww-image-optimizer-cloud/ewww-image-optimizer-cloud.php', |
| 52 | 53 | 'imagerecycle' => 'imagerecycle-pdf-image-compression/wp-image-recycle.php', |
| 53 | 54 | 'imagify' => 'imagify/imagify.php', |
| 55 | + 'litespeed' => 'litespeed-cache/litespeed-cache.php', | |
| 56 | + 'autoptimize' => 'autoptimize/autoptimize.php', | |
| 57 | + 'perfmatters' => 'perfmatters/perfmatters.php', | |
| 54 | 58 | // 'plugin-slug' => 'plugin-folder/plugin-file.php' |
| 55 | 59 | ]; |
| 56 | 60 | |
| 57 | 61 | return apply_filters( 'optml_conflicting_defined_plugins', $plugins ); |
| @@ -64,12 +68,13 @@ | ||
| 64 | 68 | * @access private |
| 65 | 69 | * @return array |
| 66 | 70 | */ |
| 67 | 71 | private function get_active_plugins() { |
| 68 | - require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
| 72 | + require_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 69 | 73 | |
| 70 | 74 | $conflicting_plugins = $this->defined_plugins(); |
| 71 | 75 | $conflicting_plugins = array_filter( $conflicting_plugins, 'is_plugin_active' ); |
| 76 | + | |
| 72 | 77 | return apply_filters( 'optml_conflicting_active_plugins', $conflicting_plugins ); |
| 73 | 78 | } |
| 74 | 79 | |
| 75 | 80 | /** |
| @@ -157,9 +162,9 @@ | ||
| 157 | 162 | * @access public |
| 158 | 163 | * @return bool Should show? |
| 159 | 164 | */ |
| 160 | 165 | public function should_show_notice() { |
| 161 | - if ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { | |
| 166 | + if ( wp_doing_ajax() ) { | |
| 162 | 167 | return false; |
| 163 | 168 | } |
| 164 | 169 | |
| 165 | 170 | if ( is_network_admin() ) { |