PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.9.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.9.0
2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 All 50 releases
← All changes | includes/abilities/settings/class-get-sitemap-settings.php +4 -22 2.0.0 → 2.9.0 View file →
@@ -28,9 +28,9 @@
28 28 */
29 29 public function __construct() {
30 30 $this->id = 'thinkrank/get-sitemap-settings';
31 31 $this->label = __( 'Get ThinkRank Sitemap Settings', 'thinkrank' );
32 - $this->description = __( 'Retrieve ThinkRank XML sitemap settings, which use per-type inclusion toggles plus exclusion lists.', 'thinkrank' );
32 + $this->description = __( 'Retrieve ThinkRank XML sitemap settings: per-type inclusion toggles, exclusion lists, and the index/splitting, styling, filename and search-engine ping options. Use update-sitemap-settings to change them.', 'thinkrank' );
33 33 }
34 34
35 35 /**
36 36 * {@inheritDoc}
@@ -55,9 +55,9 @@
55 55 public function get_input_schema() {
56 56 return [
57 57 'type' => 'object',
58 58 'additionalProperties' => false,
59 - 'properties' => [],
59 + 'properties' => self::empty_properties(),
60 60 ];
61 61 }
62 62
63 63 /**
@@ -67,18 +67,9 @@
67 67 */
68 68 public function get_output_schema() {
69 69 return [
70 70 'type' => 'object',
71 - 'properties' => [
72 - 'enabled' => [ 'type' => 'boolean' ],
73 - 'include_images' => [ 'type' => 'boolean' ],
74 - 'include_posts' => [ 'type' => 'boolean' ],
75 - 'include_pages' => [ 'type' => 'boolean' ],
76 - 'include_categories' => [ 'type' => 'boolean' ],
77 - 'include_tags' => [ 'type' => 'boolean' ],
78 - 'exclude_posts' => [ 'type' => 'string' ],
79 - 'exclude_terms' => [ 'type' => 'string' ],
80 - ],
71 + 'properties' => Settings_Key_Map::sitemap(),
81 72 ];
82 73 }
83 74
84 75 /**
@@ -90,16 +81,7 @@
90 81 public function execute( $input ) {
91 82 $gen = new Sitemap_Generator();
92 83 $s = $gen->get_settings( 'site', null );
93 84
94 - return [
95 - 'enabled' => (bool) ( $s['enabled'] ?? true ),
96 - 'include_images' => (bool) ( $s['include_images'] ?? true ),
97 - 'include_posts' => (bool) ( $s['include_posts'] ?? true ),
98 - 'include_pages' => (bool) ( $s['include_pages'] ?? true ),
99 - 'include_categories' => (bool) ( $s['include_categories'] ?? true ),
100 - 'include_tags' => (bool) ( $s['include_tags'] ?? true ),
101 - 'exclude_posts' => (string) ( $s['exclude_posts'] ?? '' ),
102 - 'exclude_terms' => (string) ( $s['exclude_terms'] ?? '' ),
103 - ];
85 + return Settings_Key_Map::read( Settings_Key_Map::sitemap(), $s );
104 86 }
105 87 }