PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.11.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.11.0
2.11.0 2.10.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 All 52 releases
← All changes | includes/admin/class-manager.php +21 -17 2.7.0 → 2.11.0 View file →
@@ -16,8 +16,9 @@
16 16 use ThinkRank\Core\Settings;
17 17 use ThinkRank\Core\Database;
18 18 use ThinkRank\Core\Plan_Config;
19 19 use ThinkRank\Core\Capability_Manager;
20 +use ThinkRank\Config\Local_Business_Types_Config;
20 21 use ThinkRank\Admin\Metabox_Manager;
21 22 use ThinkRank\Admin\Elementor_Metabox;
22 23 use ThinkRank\Admin\Oxygen_Metabox;
23 24 use ThinkRank\Admin\Divi_Metabox;
@@ -427,8 +428,11 @@
427 428 'capabilities' => $this->get_user_capabilities(),
428 429 'settings' => $this->get_admin_settings(),
429 430 'i18n' => $this->get_i18n_strings(),
430 431 'isAdmin' => current_user_can('manage_options'),
432 + // Simple / Advanced navigation for this user (#730). Read once
433 + // when the page is built; the header switch updates it in place.
434 + 'uiMode' => UI_Mode::get(),
431 435 // One flag per half of the Import / Export page: the "import from
432 436 // another SEO plugin" section, and ThinkRank's own export/restore.
433 437 'migrationToolsEnabled' => (bool) $this->settings->get('enable_migration_tools', false),
434 438 'importExportEnabled' => (bool) $this->settings->get('enable_import_export', false),
@@ -444,8 +448,13 @@
444 448 'faviconUrl' => get_site_icon_url(64) ?: '',
445 449 'adminEmail' => get_option('admin_email'),
446 450 // Post types for Global SEO navigation
447 451 'postTypes' => $this->get_public_post_types(),
452 + // schema.org LocalBusiness subtypes for the Local SEO control.
453 + // Localized rather than mirrored in a JS config: the list runs to
454 + // ~150 entries and is also the MCP ability's enum, so a second copy
455 + // would be a second thing to keep in step (#623).
456 + 'localBusinessTypes' => Local_Business_Types_Config::get_options(),
448 457 // Role Manager: capabilities the current user holds + the
449 458 // section → capability map, so the SPA can hide sections a role
450 459 // cannot access. Administrators receive every capability.
451 460 'caps' => Capability_Manager::user_capabilities(),
@@ -489,8 +498,13 @@
489 498 }
490 499
491 500 // Check for plugin updates
492 501 $this->check_plugin_updates();
502 +
503 + // One-time: a Key Features value saved while commas were delimiters
504 + // becomes one feature per line, so the next regeneration publishes the
505 + // bullets the site already had rather than one merged line.
506 + \ThinkRank\SEO\LLMs_Txt_Manager::maybe_migrate_legacy_key_features();
493 507 }
494 508
495 509 /**
496 510 * Load admin page
@@ -802,19 +816,14 @@
802 816 wp_die();
803 817 }
804 818
805 819 /**
806 - * Check if API key is configured
820 + * Check if the selected AI provider is configured
807 821 *
808 - * @return bool True if at least one API key is configured
822 + * @return bool True when the chosen provider has what it needs to run
809 823 */
810 824 private function has_api_key_configured(): bool {
811 - $settings = \ThinkRank\Core\Settings::instance();
812 -
813 - return !empty($settings->get('openai_api_key'))
814 - || !empty($settings->get('claude_api_key'))
815 - || !empty($settings->get('gemini_api_key'))
816 - || !empty($settings->get('openrouter_api_key'));
825 + return \ThinkRank\Core\Settings::instance()->has_ai_provider_configured();
817 826 }
818 827
819 828 /**
820 829 * Get menu icon
@@ -877,22 +886,17 @@
877 886 ];
878 887 }
879 888
880 889 /**
881 - * Whether any AI provider API key is configured
890 + * Whether the selected AI provider is configured
882 891 *
883 - * Mirrors the check used by ThinkRank\AI\Manager.
892 + * Same answer as ThinkRank\AI\Manager — both read
893 + * Settings::has_ai_provider_configured().
884 894 *
885 895 * @return bool
886 896 */
887 897 private function is_ai_configured(): bool {
888 - foreach (['openai_api_key', 'claude_api_key', 'gemini_api_key', 'openrouter_api_key'] as $key) {
889 - if (!empty($this->settings->get($key, ''))) {
890 - return true;
891 - }
892 - }
893 -
894 - return false;
898 + return $this->settings->has_ai_provider_configured();
895 899 }
896 900
897 901 /**
898 902 * Get internationalization strings