| @@ -71,8 +71,17 @@ | ||
| 71 | 71 | 'file' => 'squirrly-seo/squirrly.php', |
| 72 | 72 | 'extra_files' => ['squirrly-seo-pack/index.php'], |
| 73 | 73 | 'importable' => true, |
| 74 | 74 | ], |
| 75 | + 'slimseo' => [ | |
| 76 | + 'name' => 'Slim SEO', | |
| 77 | + 'class' => 'SlimSEO\\Activator', | |
| 78 | + 'function' => '', | |
| 79 | + 'file' => 'slim-seo/slim-seo.php', | |
| 80 | + // Slim SEO Pro runs with or without the free plugin (#886). | |
| 81 | + 'extra_files' => ['slim-seo-pro/slim-seo-pro.php'], | |
| 82 | + 'importable' => true, | |
| 83 | + ], | |
| 75 | 84 | 'theseoframework' => [ |
| 76 | 85 | 'name' => 'The SEO Framework', |
| 77 | 86 | 'class' => 'The_SEO_Framework\\Load', |
| 78 | 87 | 'function' => 'the_seo_framework', |
| @@ -156,11 +165,16 @@ | ||
| 156 | 165 | if (!empty($plugin['function']) && function_exists($plugin['function'])) { |
| 157 | 166 | return true; |
| 158 | 167 | } |
| 159 | 168 | |
| 160 | - // Check by plugin file | |
| 161 | - if (!empty($plugin['file']) && function_exists('is_plugin_active') && is_plugin_active($plugin['file'])) { | |
| 162 | - return true; | |
| 169 | + // Check by plugin file, the add-on's included: Slim SEO Pro runs | |
| 170 | + // without the free plugin, and is no less a second SEO plugin then. | |
| 171 | + if (function_exists('is_plugin_active')) { | |
| 172 | + foreach (array_merge([$plugin['file'] ?? ''], $plugin['extra_files'] ?? []) as $file) { | |
| 173 | + if ($file !== '' && is_plugin_active($file)) { | |
| 174 | + return true; | |
| 175 | + } | |
| 176 | + } | |
| 163 | 177 | } |
| 164 | 178 | |
| 165 | 179 | return false; |
| 166 | 180 | } |