PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.10.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.10.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 1.0.1 All 51 releases
← All changes | thinkrank.php +324 -44 1.0.0 → 2.10.0 View file →
@@ -1,22 +1,22 @@
1 1 <?php
2 +
2 3 /**
3 4 * Plugin Name: ThinkRank
4 - * Plugin URI: https://thinkrank.ai/wordpress-plugin
5 + * Plugin URI: https://thinkrank.ai/
5 6 * Description: AI-native SEO plugin for WordPress. Automate and enhance your SEO with cutting-edge AI while maintaining editorial control.
6 - * Version: 1.0.0
7 - * Author: rupok
8 - * Author URI: https://thinkrank.ai
7 + * Version: 2.10.0
8 + * Author: WPDeveloper
9 + * Author URI: https://wpdeveloper.com/
9 10 * License: GPL v2 or later
10 11 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 12 * Text Domain: thinkrank
12 13 * Domain Path: /languages
13 14 * Requires at least: 6.0
14 - * Tested up to: 6.8
15 - * Requires PHP: 8.0
15 + * Requires PHP: 7.4
16 16 *
17 17 * @package ThinkRank
18 - * @version 1.0.0
18 + * @version 2.10.0
19 19 * @since 1.0.0
20 20 */
21 21
22 22 declare(strict_types=1);
@@ -26,9 +26,9 @@
26 26 exit;
27 27 }
28 28
29 29 // Define plugin constants
30 -define('THINKRANK_VERSION', '1.0.0');
30 +define('THINKRANK_VERSION', '2.10.0');
31 31 define('THINKRANK_PLUGIN_FILE', __FILE__);
32 32 define('THINKRANK_PLUGIN_DIR', plugin_dir_path(__FILE__));
33 33 define('THINKRANK_PLUGIN_URL', plugin_dir_url(__FILE__));
34 34 define('THINKRANK_PLUGIN_BASENAME', plugin_basename(__FILE__));
@@ -33,12 +33,12 @@
33 33 define('THINKRANK_PLUGIN_URL', plugin_dir_url(__FILE__));
34 34 define('THINKRANK_PLUGIN_BASENAME', plugin_basename(__FILE__));
35 35
36 36 // Minimum requirements check
37 -if (version_compare(PHP_VERSION, '8.0', '<')) {
38 - add_action('admin_notices', function() {
37 +if (version_compare(PHP_VERSION, '7.4', '<')) {
38 + add_action('admin_notices', function () {
39 39 echo '<div class="notice notice-error"><p>';
40 - echo esc_html__('ThinkRank requires PHP 8.0 or higher. Please upgrade your PHP version.', 'thinkrank');
40 + echo esc_html__('ThinkRank requires PHP 7.4 or higher. Please upgrade your PHP version.', 'thinkrank');
41 41 echo '</p></div>';
42 42 });
43 43 return;
44 44 }
@@ -43,9 +43,9 @@
43 43 return;
44 44 }
45 45
46 46 if (version_compare(get_bloginfo('version'), '6.0', '<')) {
47 - add_action('admin_notices', function() {
47 + add_action('admin_notices', function () {
48 48 echo '<div class="notice notice-error"><p>';
49 49 echo esc_html__('ThinkRank requires WordPress 6.0 or higher. Please upgrade your WordPress installation.', 'thinkrank');
50 50 echo '</p></div>';
51 51 });
@@ -55,8 +55,23 @@
55 55 // Autoloader
56 56 require_once THINKRANK_PLUGIN_DIR . 'includes/class-autoloader.php';
57 57
58 58 /**
59 + * Bundled AI Building Blocks (Abilities API + MCP Adapter).
60 + *
61 + * Loaded through the Jetpack Autoloader so that if the same libraries are also
62 + * shipped by another plugin — or land in WordPress core — the newest copy wins
63 + * and loads once, with no fatal class collisions. This lets ThinkRank serve its
64 + * MCP endpoint out of the box, without requiring the standalone MCP Adapter and
65 + * Abilities API plugins. See docs/mcp-server.md for the update procedure.
66 + */
67 +$thinkrank_mcp_runtime = THINKRANK_PLUGIN_DIR . 'dependencies/vendor/autoload_packages.php';
68 +if (is_readable($thinkrank_mcp_runtime)) {
69 + require_once $thinkrank_mcp_runtime;
70 +}
71 +unset($thinkrank_mcp_runtime);
72 +
73 +/**
59 74 * Main ThinkRank Plugin Class
60 75 *
61 76 * Follows Single Responsibility Principle - only handles plugin initialization
62 77 *
@@ -62,9 +77,9 @@
62 77 *
63 78 * @since 1.0.0
64 79 */
65 80 final class ThinkRank {
66 -
81 +
67 82 /**
68 83 * Plugin instance (Singleton Pattern)
69 84 *
70 85 * @var ThinkRank|null
@@ -69,9 +84,9 @@
69 84 *
70 85 * @var ThinkRank|null
71 86 */
72 87 private static ?ThinkRank $instance = null;
73 -
88 +
74 89 /**
75 90 * Plugin components
76 91 *
77 92 * @var array
@@ -76,9 +91,9 @@
76 91 *
77 92 * @var array
78 93 */
79 94 private array $components = [];
80 -
95 +
81 96 /**
82 97 * Get plugin instance (Singleton Pattern)
83 98 *
84 99 * @return ThinkRank
@@ -88,9 +103,9 @@
88 103 self::$instance = new self();
89 104 }
90 105 return self::$instance;
91 106 }
92 -
107 +
93 108 /**
94 109 * Private constructor to prevent direct instantiation
95 110 */
96 111 private function __construct() {
@@ -96,21 +111,24 @@
96 111 private function __construct() {
97 112 $this->init_autoloader();
98 113 $this->init_hooks();
99 114 }
100 -
115 +
101 116 /**
102 117 * Prevent cloning
103 118 */
104 - private function __clone() {}
105 -
119 + private function __clone() {
120 + }
121 +
106 122 /**
107 123 * Prevent unserialization
124 + *
125 + * @throws \Exception On failure.
108 126 */
109 127 public function __wakeup() {
110 128 throw new \Exception('Cannot unserialize singleton');
111 129 }
112 -
130 +
113 131 /**
114 132 * Initialize autoloader
115 133 *
116 134 * @return void
@@ -117,9 +135,9 @@
117 135 */
118 136 private function init_autoloader(): void {
119 137 ThinkRank\Core\Autoloader::register();
120 138 }
121 -
139 +
122 140 /**
123 141 * Initialize WordPress hooks
124 142 *
125 143 * @return void
@@ -128,11 +146,30 @@
128 146 register_activation_hook(__FILE__, [$this, 'activate']);
129 147 register_deactivation_hook(__FILE__, [$this, 'deactivate']);
130 148
131 149 add_action('plugins_loaded', [$this, 'init']);
150 + add_filter('plugin_action_links_' . THINKRANK_PLUGIN_BASENAME, [$this, 'add_action_links']);
132 151 }
133 -
152 +
134 153 /**
154 + * Add a "Dashboard" link to the plugin action links on the Plugins page.
155 + *
156 + * @param array $links Existing plugin action links.
157 + * @return array
158 + */
159 + public function add_action_links(array $links): array {
160 + $dashboard_link = sprintf(
161 + '<a href="%s">%s</a>',
162 + esc_url(admin_url('admin.php?page=thinkrank')),
163 + esc_html__('Dashboard', 'thinkrank')
164 + );
165 +
166 + array_unshift($links, $dashboard_link);
167 +
168 + return $links;
169 + }
170 +
171 + /**
135 172 * Initialize plugin components
136 173 *
137 174 * @return void
138 175 */
@@ -137,8 +174,11 @@
137 174 * @return void
138 175 */
139 176 public function init(): void {
140 177 try {
178 + $this->maybe_update_database();
179 + $this->register_sitemap_cron_listeners();
180 + $this->clear_retired_brand_visibility_cron();
141 181 $this->load_components();
142 182 $this->init_components();
143 183 $this->load_template_functions();
144 184
@@ -146,10 +186,161 @@
146 186 } catch (\Exception $e) {
147 187 $this->handle_error($e);
148 188 }
149 189 }
150 -
190 +
151 191 /**
192 + * Register the sitemap regeneration WP-Cron listeners.
193 + *
194 + * Runs on plugins_loaded (via init()), so the callbacks exist on every
195 + * request — including WP-Cron, which never fires rest_api_init and therefore
196 + * never builds the Sitemap REST endpoint (whose constructor would otherwise
197 + * be the only place the scheduled regeneration hooks get a listener). The
198 + * generator is built lazily inside the callback so this stays cheap on the
199 + * vast majority of requests where no regeneration is due.
200 + *
201 + * @return void
202 + */
203 + private function register_sitemap_cron_listeners(): void {
204 + add_action('thinkrank_regenerate_sitemap', static function () {
205 + (new ThinkRank\SEO\Sitemap_Generator())->auto_regenerate_sitemap();
206 + });
207 + add_action('thinkrank_regenerate_sitemap_settings', static function () {
208 + (new ThinkRank\SEO\Sitemap_Generator())->regenerate_sitemap_from_settings();
209 + });
210 +
211 + add_action('shutdown', [$this, 'maybe_take_over_sitemap_regeneration'], 100);
212 + }
213 +
214 + /**
215 + * Rebuild the sitemap in-request when WP-Cron has not delivered.
216 + *
217 + * WP-Cron only runs when a request arrives, so with DISABLE_WP_CRON set, a
218 + * host blocking loopback requests, or very little traffic, the scheduled
219 + * regeneration never fires and the sitemap silently stops updating (#629).
220 + * Once the event is overdue by the generator's grace period, an admin, REST
221 + * or WP-CLI request takes the work over so the site converges on its own.
222 + *
223 + * Front-end requests are deliberately excluded: this runs on `shutdown`,
224 + * after the response, but generation on a large site is not free and a
225 + * visitor should never pay for it. Admin traffic is what a site with broken
226 + * cron reliably still has — the sitemap goes stale right after someone
227 + * publishes something, and that someone is in wp-admin.
228 + *
229 + * @since 2.2.1
230 + * @return void
231 + */
232 + public function maybe_take_over_sitemap_regeneration(): void {
233 + // is_admin() is true for admin-ajax.php and REST_REQUEST for public
234 + // core routes, both of which anonymous front-end traffic reaches — so
235 + // without the logged-in test a visitor could still pay for the rebuild
236 + // this method documents as never being theirs to pay for. WP-CLI has no
237 + // user, and is trusted by definition.
238 + //
239 + // An MCP call counts too. It is an admin-equivalent action, but it is
240 + // dispatched from `parse_request` on the pretty /thinkrank/mcp route,
241 + // so it is neither is_admin() nor REST_REQUEST and never qualified —
242 + // which meant an agent could change sitemap settings on a site with no
243 + // working cron and leave the served file stale indefinitely, having
244 + // already reported success (#764). The logged-in test still applies:
245 + // Mcp_Server sets the current user only after a credential validates,
246 + // so an anonymous POST to that route is not eligible.
247 + $is_mcp_request = class_exists('ThinkRank\Mcp\Mcp_Manager')
248 + && ThinkRank\Mcp\Mcp_Manager::is_serving_request();
249 +
250 + $eligible = (defined('WP_CLI') && WP_CLI)
251 + || (
252 + is_user_logged_in()
253 + && (
254 + is_admin()
255 + || (defined('REST_REQUEST') && REST_REQUEST)
256 + || $is_mcp_request
257 + )
258 + );
259 +
260 + if (!$eligible) {
261 + return;
262 + }
263 +
264 + // Cheap autoloaded-option read, so the vast majority of requests stop
265 + // here without building the generator.
266 + if (!ThinkRank\SEO\Sitemap_Generator::has_overdue_regeneration()) {
267 + return;
268 + }
269 +
270 + // `shutdown` runs after the output buffers are flushed, but flushed is
271 + // not delivered: on FPM the connection stays open until the process
272 + // ends, so without this the browser — or the REST call the sitemap
273 + // screen just made — waits out the whole generation. Hand the response
274 + // back first, then rebuild.
275 + $this->close_request();
276 +
277 + // Read-only construction: the auto-generation hooks are pointless this
278 + // late in the request and would only add duplicate callbacks.
279 + (new ThinkRank\SEO\Sitemap_Generator(false))->run_overdue_regeneration();
280 + }
281 +
282 + /**
283 + * Deliver the response and let the request keep working without the client.
284 + *
285 + * A no-op on SAPIs that cannot do it, where the caller simply pays for the
286 + * work as before.
287 + *
288 + * @since 2.2.1
289 + * @return void
290 + */
291 + private function close_request(): void {
292 + if (defined('WP_CLI') && WP_CLI) {
293 + return;
294 + }
295 +
296 + if (function_exists('fastcgi_finish_request')) {
297 + fastcgi_finish_request();
298 + return;
299 + }
300 +
301 + if (function_exists('litespeed_finish_request')) {
302 + litespeed_finish_request();
303 + }
304 + }
305 +
306 + /**
307 + * Unschedule the cron events left behind by the removed Brand Visibility
308 + * feature.
309 + *
310 + * A site that ran a Brand Visibility check can still carry its drain tick
311 + * and watchdog. Their callbacks, and the watchdog's custom recurrence, no
312 + * longer exist, so the events would only fire into nothing.
313 + * wp_unschedule_hook() walks the autoloaded cron array and writes nothing
314 + * when the hook is absent, so this costs nothing once they are gone.
315 + * Deactivation and uninstall clear the same hooks (cleanup-manifest.php).
316 + *
317 + * @return void
318 + */
319 + private function clear_retired_brand_visibility_cron(): void {
320 + foreach (['thinkrank_bv_tick', 'thinkrank_bv_watchdog'] as $hook) {
321 + wp_unschedule_hook($hook);
322 + }
323 + }
324 +
325 + /**
326 + * Check if database schema needs updating and run migrations
327 + *
328 + * Standard WordPress pattern: compare stored db_version against current,
329 + * run dbDelta if stale. This handles schema changes (new tables, new columns)
330 + * without requiring plugin deactivation/reactivation.
331 + *
332 + * @since 1.10.0
333 + * @return void
334 + */
335 + private function maybe_update_database(): void {
336 + $schema = new ThinkRank\Database\Database_Schema();
337 + if ($schema->needs_update()) {
338 + $schema->create_tables();
339 + }
340 + }
341 +
342 + /**
152 343 * Load plugin components (Dependency Injection Container pattern)
153 344 *
154 345 * @return void
155 346 */
@@ -154,22 +345,61 @@
154 345 * @return void
155 346 */
156 347 private function load_components(): void {
157 348 $this->components = [
158 - 'database' => new ThinkRank\Core\Database(),
159 - 'settings' => new ThinkRank\Core\Settings(),
349 + 'database' => new ThinkRank\Core\Database(),
350 + // Settings::instance() rather than a fresh object: the container
351 + // and the singleton were otherwise two different Settings, each
352 + // with its own memo, because instance() resolves the container and
353 + // this array is assigned only after every constructor above has
354 + // run. Anything resolving the singleton during that window got a
355 + // standalone instance that outlived the request, so a hook
356 + // registered from the component's init() ran against an object no
357 + // consumer read through (#516).
358 + 'settings' => ThinkRank\Core\Settings::instance(),
359 + 'role_manager' => new ThinkRank\Core\Role_Manager(),
160 360 'security_headers' => new ThinkRank\Core\Security_Headers(),
161 361 'asset_optimizer' => new ThinkRank\Core\Asset_Optimizer(),
162 - 'api' => new ThinkRank\API\Manager(),
163 - 'admin' => new ThinkRank\Admin\Manager(),
164 - 'ai' => new ThinkRank\AI\Manager(),
362 + 'usage_tracker' => new ThinkRank\Core\Usage_Tracker_Manager(),
363 + 'api' => new ThinkRank\API\Manager(),
364 + 'admin' => new ThinkRank\Admin\Manager(),
365 + 'blocks' => new ThinkRank\Editor\Blocks_Manager(),
366 + 'elementor' => new ThinkRank\Editor\Elementor_Manager(),
367 + 'bricks_elements' => new ThinkRank\Editor\Bricks_Elements_Manager(),
368 + 'beaver_modules' => new ThinkRank\Editor\Beaver_Modules_Manager(),
369 + 'ai' => new ThinkRank\AI\Manager(),
165 370 'frontend_seo' => new ThinkRank\Frontend\SEO_Manager(),
166 - 'seo_notice' => new ThinkRank\Admin\SEO_Notice(),
167 - 'integrations' => new ThinkRank\Integrations\Manager(),
371 + 'seo_notice' => new ThinkRank\Admin\SEO_Notice(),
372 + 'search_visibility_notice' => new ThinkRank\Admin\Search_Visibility_Notice(),
373 + 'webroot_writable_notice' => new ThinkRank\Admin\Webroot_Writable_Notice(),
168 374 'performance_collector' => new ThinkRank\SEO\Performance_Data_Collector(),
375 + 'query_guard' => new ThinkRank\SEO\Query_Guard(),
376 + 'feeds' => new ThinkRank\SEO\Feed_Manager(),
377 + 'sitemap_stylesheet' => new ThinkRank\SEO\Sitemap_Stylesheet(),
378 + 'oembed' => new ThinkRank\SEO\Oembed_Manager(),
379 + 'content_visibility' => new ThinkRank\SEO\Content_Visibility(),
380 + 'instant_indexing' => new ThinkRank\SEO\Instant_Indexing_Manager(),
381 + 'instant_indexing_reconciler' => new ThinkRank\SEO\Instant_Indexing_Reconciler(),
382 + 'author_archives' => new ThinkRank\SEO\Author_Archives_Manager(),
383 + 'seo_analyzer' => new ThinkRank\SEO\SEO_Analyzer(),
384 + // Bulk Snippets' persisted issue index: invalidation hooks must run
385 + // on every request, since posts are edited everywhere but there.
386 + 'snippet_index' => new ThinkRank\SEO\Snippet_Index(),
387 + // The thin content report's word counts: same reason, and a
388 + // separate index because a word count and a snippet verdict go
389 + // stale for different reasons (#565).
390 + 'word_count_index' => new ThinkRank\SEO\Word_Count_Index(),
391 + 'email_report' => new ThinkRank\SEO\Email_Report_Manager(),
392 + 'google_oauth' => new ThinkRank\Integrations\Google_OAuth_Proxy(),
393 + 'multilingual' => new ThinkRank\Integrations\Multilingual_Manager(),
394 + 'ai_traffic' => new ThinkRank\SEO\Ai_Traffic_Tracker(),
395 + 'analytics' => new ThinkRank\SEO\Analytics_Manager(),
396 + 'schema_conflict_health_check' => new ThinkRank\Diagnostics\Schema_Conflict_Health_Check(),
397 + 'abilities' => new ThinkRank\Abilities\Abilities_Registrar(),
398 + 'mcp' => new ThinkRank\Mcp\Mcp_Manager(),
169 399 ];
170 400 }
171 -
401 +
172 402 /**
173 403 * Initialize all components
174 404 *
175 405 * @return void
@@ -189,12 +419,12 @@
189 419 */
190 420 private function load_template_functions(): void {
191 421 require_once THINKRANK_PLUGIN_DIR . 'includes/frontend/template-functions.php';
192 422 }
193 -
423 +
194 424 /**
195 425 * Get component instance
196 - *
426 + *
197 427 * @param string $component Component name
198 428 * @return object|null
199 429 */
200 430 public function get_component(string $component): ?object {
@@ -199,10 +429,47 @@
199 429 */
200 430 public function get_component(string $component): ?object {
201 431 return $this->components[$component] ?? null;
202 432 }
203 -
433 +
204 434 /**
435 + * Shared Analytics Manager instance (lazy)
436 + *
437 + * @var ThinkRank\SEO\Analytics_Manager|null
438 + */
439 + private ?ThinkRank\SEO\Analytics_Manager $analytics_manager = null;
440 +
441 + /**
442 + * Get the shared Analytics Manager, with Google clients initialized.
443 + *
444 + * Consumers (including the Pro plugin, which probes for this accessor)
445 + * should use this instead of constructing their own Analytics_Manager:
446 + * each fresh construction re-reads/decrypts settings and re-initializes
447 + * the Google API clients.
448 + *
449 + * @since 1.18.0
450 + * @return ThinkRank\SEO\Analytics_Manager
451 + */
452 + public function get_analytics_manager(): ThinkRank\SEO\Analytics_Manager {
453 + if ($this->analytics_manager === null) {
454 + // Reuse the registered component. Constructing a second instance
455 + // here would work, but only the registered one has had init() run
456 + // on it, so the token-refresh cron would be scheduled against a
457 + // different object than the one callers actually use.
458 + $component = $this->components['analytics'] ?? null;
459 +
460 + $this->analytics_manager = $component instanceof ThinkRank\SEO\Analytics_Manager
461 + ? $component
462 + : new ThinkRank\SEO\Analytics_Manager();
463 +
464 + // init() defers initialize_clients() to the `init` hook; callers
465 + // that arrive earlier still need working clients.
466 + $this->analytics_manager->initialize_clients();
467 + }
468 + return $this->analytics_manager;
469 + }
470 +
471 + /**
205 472 * Plugin activation
206 473 *
207 474 * @return void
208 475 */
@@ -209,12 +476,11 @@
209 476 public function activate(): void {
210 477 try {
211 478 $activator = new ThinkRank\Core\Activator();
212 479 $activator->activate();
213 -
480 +
214 481 // Flush rewrite rules
215 482 flush_rewrite_rules();
216 -
217 483 } catch (\Exception $e) {
218 484 $this->handle_error($e);
219 485 wp_die(
220 486 esc_html__('ThinkRank activation failed. Please check your server logs.', 'thinkrank'),
@@ -222,9 +488,9 @@
222 488 ['back_link' => true]
223 489 );
224 490 }
225 491 }
226 -
492 +
227 493 /**
228 494 * Plugin deactivation
229 495 *
230 496 * @return void
@@ -232,27 +498,40 @@
232 498 public function deactivate(): void {
233 499 try {
234 500 $deactivator = new ThinkRank\Core\Deactivator();
235 501 $deactivator->deactivate();
236 -
502 +
237 503 // Flush rewrite rules
238 504 flush_rewrite_rules();
239 -
240 505 } catch (\Exception $e) {
241 506 $this->handle_error($e);
242 507 }
243 508 }
244 -
509 +
245 510 /**
246 511 * Handle errors consistently
247 512 *
513 + * Logs errors and surfaces them via _doing_it_wrong() when
514 + * WP_DEBUG is enabled, helping developers diagnose issues.
515 + *
248 516 * @param \Exception $e Exception to handle
249 517 * @return void
250 518 */
251 519 private function handle_error(\Exception $e): void {
252 - // Error handling without debug output
520 + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
521 + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
522 + error_log('ThinkRank: ' . $e->getMessage());
523 + }
524 +
525 + if (defined('WP_DEBUG') && WP_DEBUG) {
526 + _doing_it_wrong(
527 + __METHOD__,
528 + esc_html($e->getMessage()),
529 + esc_html(THINKRANK_VERSION)
530 + );
531 + }
253 532 }
254 -
533 +
255 534 /**
256 535 * Get plugin version
257 536 *
258 537 * @return string
@@ -259,9 +538,9 @@
259 538 */
260 539 public function get_version(): string {
261 540 return THINKRANK_VERSION;
262 541 }
263 -
542 +
264 543 /**
265 544 * Get plugin directory path
266 545 *
267 546 * @return string
@@ -268,9 +547,9 @@
268 547 */
269 548 public function get_plugin_dir(): string {
270 549 return THINKRANK_PLUGIN_DIR;
271 550 }
272 -
551 +
273 552 /**
274 553 * Get plugin URL
275 554 *
276 555 * @return string
@@ -284,8 +563,9 @@
284 563 * Initialize the plugin
285 564 *
286 565 * @return ThinkRank
287 566 */
567 +// phpcs:ignore Universal.Files.SeparateFunctionsFromOO.Mixed -- plugin bootstrap: the accessor belongs next to the class it returns.
288 568 function thinkrank(): ThinkRank {
289 569 return ThinkRank::get_instance();
290 570 }
291 571