PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.7.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.7.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 1.1.0 1.10.0 All 48 releases
← All changes | includes/core/class-activator.php +49 -3 2.1.12.7.0 View file →
@@ -48,11 +48,12 @@
48 48 delete_option(self::UNINSTALLED_OPTION);
49 49
50 50 $this->check_requirements();
51 51 $this->create_database_tables();
52 - // Must precede set_default_options(): it reads `thinkrank_version`,
53 - // which that method creates.
52 + // Both must precede set_default_options(): they read
53 + // `thinkrank_version`, which that method creates.
54 54 $this->retire_sitemap_legacy_fallback();
55 + $this->seed_feed_defaults();
55 56 $this->set_default_options();
56 57 $this->setup_indexnow_key();
57 58 $this->schedule_cron_jobs();
58 59 $this->restore_webroot_artifacts();
@@ -229,8 +230,53 @@
229 230 add_option(THINKRANK_SITEMAP_MARKED_WRITE_OPTION, '1', '', false);
230 231 }
231 232
232 233 /**
234 + * Give a brand-new install the feed posture the competitors ship with.
235 + *
236 + * The feed controls (#635) default to off in
237 + * {@see Site_Identity_Manager::get_default_settings()}, and they have to:
238 + * two of the three change what a site already publishes. Signing every
239 + * entry adds a line to what existing subscribers receive, and noindexing
240 + * feeds withdraws URLs a site may have had indexed for years — on a podcast
241 + * site, whose feed has to stay indexable, silently at that. Neither belongs
242 + * in a plugin update.
243 + *
244 + * A first install has no subscribers and no indexed feed, so there is
245 + * nothing to change and the protective defaults are simply the right
246 + * starting point — which is what The SEO Framework, Yoast and Rank Math all
247 + * ship. Seeding them here rather than in the defaults is what separates the
248 + * two cases.
249 + *
250 + * Excerpt-only is left off even here: it changes what readers get rather
251 + * than what scrapers can take, and that is the site owner's call.
252 + *
253 + * Same signal and same reasoning as {@see self::retire_sitemap_legacy_fallback()}:
254 + * `thinkrank_version` is absent only on the very first activation, and an
255 + * upgrade does not re-run the activation hook at all.
256 + *
257 + * @since 2.7.0
258 + *
259 + * @return void
260 + */
261 + private function seed_feed_defaults(): void {
262 + if (get_option('thinkrank_version') !== false) {
263 + return;
264 + }
265 +
266 + $manager = new \ThinkRank\SEO\Site_Identity_Manager();
267 +
268 + $manager->save_settings(
269 + 'site',
270 + null,
271 + [
272 + 'feed_source_link' => true,
273 + 'feed_noindex' => true,
274 + ]
275 + );
276 + }
277 +
278 + /**
233 279 * Set default plugin options
234 280 *
235 281 * @return void
236 282 */
@@ -237,9 +283,9 @@
237 283 private function set_default_options(): void {
238 284 $default_options = [
239 285 'thinkrank_version' => THINKRANK_VERSION,
240 286
241 - 'thinkrank_ai_provider' => 'openai',
287 + 'thinkrank_ai_provider' => \ThinkRank\Core\Settings::AI_PROVIDER_NONE,
242 288 'thinkrank_cache_duration' => 3600, // 1 hour
243 289 'thinkrank_max_requests_per_minute' => 10,
244 290 'thinkrank_enable_logging' => true,
245 291 'thinkrank_auto_optimize' => false,