← All changes
|
includes/admin/importers/class-import-detector.php
+25
-0
2.11.0
→
2.13.0
View file →
| @@ -76,8 +76,16 @@ | ||
| 76 | 76 | 'meta_prefix' => '_sq_', |
| 77 | 77 | 'option_keys' => ['sq_options'], |
| 78 | 78 | 'plugin_files' => ['squirrly-seo/squirrly.php'], |
| 79 | 79 | ], |
| 80 | + 'slimseo' => [ | |
| 81 | + 'name' => 'Slim SEO', | |
| 82 | + // One `slim_seo` meta array per post/term, plus primary-term keys | |
| 83 | + // and option-stored redirects (#886) — counted by the exporter. | |
| 84 | + 'meta_prefix' => 'slim_seo', | |
| 85 | + 'option_keys' => ['slim_seo', 'ss_redirects', 'slim_seo_pro', 'slim_seo_schemas'], | |
| 86 | + 'plugin_files' => ['slim-seo/slim-seo.php', 'slim-seo-pro/slim-seo-pro.php'], | |
| 87 | + ], | |
| 80 | 88 | ]; |
| 81 | 89 | |
| 82 | 90 | /** |
| 83 | 91 | * Detect all source plugins present in the database |
| @@ -187,8 +195,12 @@ | ||
| 187 | 195 | $counts = $this->detect_aioseo(); |
| 188 | 196 | } elseif ($slug === 'squirrly') { |
| 189 | 197 | // Squirrly uses a custom table too; the exporter classifies rows. |
| 190 | 198 | $counts = $this->detect_squirrly(); |
| 199 | + } elseif ($slug === 'slimseo') { | |
| 200 | + // Slim SEO's redirects and 404 log live outside postmeta, and its | |
| 201 | + // primary terms under a second key; the exporter counts all of it. | |
| 202 | + $counts = $this->detect_slimseo(); | |
| 191 | 203 | } else { |
| 192 | 204 | // Standard postmeta-based plugins |
| 193 | 205 | $prefix = $config['meta_prefix']; |
| 194 | 206 | |
| @@ -381,8 +393,21 @@ | ||
| 381 | 393 | */ |
| 382 | 394 | private function detect_squirrly(): array { |
| 383 | 395 | $exporter = new Squirrly_Exporter(); |
| 384 | 396 | $counts = $exporter->get_available_types(); |
| 397 | + // Settings are added by the caller from option_keys. | |
| 398 | + unset($counts['settings']); | |
| 399 | + | |
| 400 | + return $counts; | |
| 401 | + } | |
| 402 | + | |
| 403 | + /** | |
| 404 | + * Detect Slim SEO data: per-object meta, redirects and the 404 log. | |
| 405 | + * | |
| 406 | + * @return array Counts array | |
| 407 | + */ | |
| 408 | + private function detect_slimseo(): array { | |
| 409 | + $counts = (new Slim_SEO_Exporter())->get_available_types(); | |
| 385 | 410 | // Settings are added by the caller from option_keys. |
| 386 | 411 | unset($counts['settings']); |
| 387 | 412 | |
| 388 | 413 | return $counts; |