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/admin/class-manager.php +9 -22 2.5.02.9.0 View file →
@@ -452,13 +452,10 @@
452 452 'sectionCaps' => Capability_Manager::section_map(),
453 453 'canManageRoles' => Capability_Manager::current_user_can(Capability_Manager::MANAGE_ROLES),
454 454 // Pro detection flag
455 455 'isPro' => Plan_Config::is_pro(),
456 - // Data update frequency (Pro: daily, Free: every 3 days)
457 - 'dataUpdateFrequency' => Plan_Config::is_pro() ? 'daily' : '3days',
458 - // NB: no per-feature capability maps here. Email Reporting reads
459 - // its capabilities from GET /thinkrank/v1/email-report/config;
460 - // localizing a second copy only invited the two to drift.
456 + // NB: no per-feature capability maps here; each screen reads its
457 + // own state over REST, so a localized copy cannot drift from it.
461 458 // MCP (Model Context Protocol) connection details for the MCP page.
462 459 'mcp' => $this->get_mcp_globals(),
463 460 // Google OAuth: JS only ever gets a nonce-signed admin-post URL.
464 461 // The consent URL, client ID, and scopes are assembled by the proxy,
@@ -805,19 +802,14 @@
805 802 wp_die();
806 803 }
807 804
808 805 /**
809 - * Check if API key is configured
806 + * Check if the selected AI provider is configured
810 807 *
811 - * @return bool True if at least one API key is configured
808 + * @return bool True when the chosen provider has what it needs to run
812 809 */
813 810 private function has_api_key_configured(): bool {
814 - $settings = \ThinkRank\Core\Settings::instance();
815 -
816 - return !empty($settings->get('openai_api_key'))
817 - || !empty($settings->get('claude_api_key'))
818 - || !empty($settings->get('gemini_api_key'))
819 - || !empty($settings->get('openrouter_api_key'));
811 + return \ThinkRank\Core\Settings::instance()->has_ai_provider_configured();
820 812 }
821 813
822 814 /**
823 815 * Get menu icon
@@ -880,22 +872,17 @@
880 872 ];
881 873 }
882 874
883 875 /**
884 - * Whether any AI provider API key is configured
876 + * Whether the selected AI provider is configured
885 877 *
886 - * Mirrors the check used by ThinkRank\AI\Manager.
878 + * Same answer as ThinkRank\AI\Manager — both read
879 + * Settings::has_ai_provider_configured().
887 880 *
888 881 * @return bool
889 882 */
890 883 private function is_ai_configured(): bool {
891 - foreach (['openai_api_key', 'claude_api_key', 'gemini_api_key', 'openrouter_api_key'] as $key) {
892 - if (!empty($this->settings->get($key, ''))) {
893 - return true;
894 - }
895 - }
896 -
897 - return false;
884 + return $this->settings->has_ai_provider_configured();
898 885 }
899 886
900 887 /**
901 888 * Get internationalization strings