← All changes
|
includes/abilities/import/class-preview-seo-import.php
+7
-3
2.12.0
→
2.13.0
View file →
| @@ -12,9 +12,11 @@ | ||
| 12 | 12 | use ThinkRank\Abilities\Ability_Base; |
| 13 | 13 | use ThinkRank\Admin\Importers\AIOSEO_Exporter; |
| 14 | 14 | use ThinkRank\Admin\Importers\Rankmath_Exporter; |
| 15 | 15 | use ThinkRank\Admin\Importers\SEOPress_Exporter; |
| 16 | +use ThinkRank\Admin\Importers\Slim_SEO_Exporter; | |
| 16 | 17 | use ThinkRank\Admin\Importers\Snapshot_Migrator; |
| 18 | +use ThinkRank\Admin\Importers\Squirrly_Exporter; | |
| 17 | 19 | use ThinkRank\Admin\Importers\Yoast_Exporter; |
| 18 | 20 | |
| 19 | 21 | if ( ! defined( 'ABSPATH' ) ) { |
| 20 | 22 | exit; // Exit if accessed directly. |
| @@ -36,9 +38,9 @@ | ||
| 36 | 38 | * Source plugins that can be previewed. |
| 37 | 39 | * |
| 38 | 40 | * @var string[] |
| 39 | 41 | */ |
| 40 | - private const ALLOWED_PLUGINS = [ 'yoast', 'rankmath', 'seopress', 'aioseo', 'squirrly' ]; | |
| 42 | + private const ALLOWED_PLUGINS = [ 'yoast', 'rankmath', 'seopress', 'aioseo', 'squirrly', 'slimseo' ]; | |
| 41 | 43 | |
| 42 | 44 | /** |
| 43 | 45 | * Data types exported before previewing, in pipeline order. |
| 44 | 46 | * |
| @@ -64,9 +66,9 @@ | ||
| 64 | 66 | */ |
| 65 | 67 | public function __construct() { |
| 66 | 68 | $this->id = 'thinkrank/preview-seo-import'; |
| 67 | 69 | $this->label = __( 'Preview SEO Import (Dry Run)', 'thinkrank' ); |
| 68 | - $this->description = __( 'Dry-run an SEO import from another plugin (Yoast, RankMath, SEOPress, or AIOSEO) and report what it would do without writing anything to ThinkRank: counts of records that would be written, records that conflict with existing ThinkRank values (which are never overwritten), and records whose post/term/user no longer exists. Returns totals plus small samples. Run before run-seo-import.', 'thinkrank' ); | |
| 70 | + $this->description = __( 'Dry-run an SEO import from another plugin (Yoast, RankMath, SEOPress, AIOSEO, Squirrly, or Slim SEO) and report what it would do without writing anything to ThinkRank: counts of records that would be written, records that conflict with existing ThinkRank values (which are never overwritten), and records whose post/term/user no longer exists. Returns totals plus small samples. Run before run-seo-import.', 'thinkrank' ); | |
| 69 | 71 | } |
| 70 | 72 | |
| 71 | 73 | /** |
| 72 | 74 | * {@inheritDoc} |
| @@ -145,9 +147,9 @@ | ||
| 145 | 147 | |
| 146 | 148 | if ( ! in_array( $plugin, self::ALLOWED_PLUGINS, true ) ) { |
| 147 | 149 | return new \WP_Error( |
| 148 | 150 | 'thinkrank_invalid_import_plugin', |
| 149 | - __( 'A supported source plugin is required (yoast, rankmath, seopress, aioseo, squirrly).', 'thinkrank' ), | |
| 151 | + __( 'A supported source plugin is required (yoast, rankmath, seopress, aioseo, squirrly, slimseo).', 'thinkrank' ), | |
| 150 | 152 | [ 'status' => 400 ] |
| 151 | 153 | ); |
| 152 | 154 | } |
| 153 | 155 | |
| @@ -281,8 +283,10 @@ | ||
| 281 | 283 | case 'aioseo': |
| 282 | 284 | return new AIOSEO_Exporter(); |
| 283 | 285 | case 'squirrly': |
| 284 | 286 | return new Squirrly_Exporter(); |
| 287 | + case 'slimseo': | |
| 288 | + return new Slim_SEO_Exporter(); | |
| 285 | 289 | default: |
| 286 | 290 | return null; |
| 287 | 291 | } |
| 288 | 292 | } |