PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.5.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.5.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
thinkrank / includes / cleanup-manifest.php

cleanup-manifest.php in ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO 2.5.0, at includes/cleanup-manifest.php

95 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * What removing ThinkRank has to clean up.
4 *
5 * Deactivation and uninstall both need the cron-hook and capability lists, and
6 * uninstall runs with no autoloader — `WP_UNINSTALL_PLUGIN` loads `uninstall.php`
7 * on its own, without the plugin. So the lists live here as a plain array this
8 * file returns, which both paths `require`, rather than as three hand-maintained
9 * copies that drift (#389, #399).
10 *
11 * Deliberately nothing in the `thinkrank_pro_` namespace: ThinkRank Pro creates
12 * those hooks and ships its own uninstaller, and removing only the free plugin
13 * must not tear down a still-active Pro install (#384).
14 *
15 * @package ThinkRank
16 * @since 2.0.1
17 */
18
19 declare(strict_types=1);
20
21 // Prevent direct access. Reached only via require() from the deactivator and
22 // uninstall.php, both of which run with WordPress loaded, so this costs the
23 // callers nothing — it was the one tracked file in the plugin without the
24 // guard, which Plugin Check flags as direct file access (#517).
25 if (!defined('ABSPATH')) {
26 exit;
27 }
28
29 return [
30 /*
31 * Every hook the free plugin schedules. Clearing one that was never
32 * scheduled is a no-op, so a hook that only some configurations reach is
33 * still safe to list — and cheaper than discovering it survived.
34 *
35 * Keep in sync with the wp_schedule_event() / wp_schedule_single_event()
36 * call sites; CleanupManifestTest fails when a new one appears.
37 */
38 'cron_hooks' => [
39 'thinkrank_cache_cleanup',
40 'thinkrank_daily_cleanup',
41 'thinkrank_usage_analytics',
42 'thinkrank_put_do_daily_action',
43 // Google token refresh. Scheduled on the custom `thinkrank_45min`
44 // recurrence, whose cron_schedules filter disappears with the plugin —
45 // so a survivor here is a recurring event WordPress can no longer
46 // resolve an interval for.
47 'thinkrank_google_token_refresh',
48 'thinkrank_collect_performance_data',
49 'thinkrank_regenerate_sitemap',
50 'thinkrank_regenerate_sitemap_settings',
51 'thinkrank_ai_traffic_prune',
52 'thinkrank_auto_ai_optimize',
53 'thinkrank_instant_indexing_reconcile',
54 'thinkrank_instant_indexing_submit',
55 'thinkrank_email_report_tick',
56 'thinkrank_bv_tick',
57 'thinkrank_bv_watchdog',
58 ],
59
60 /*
61 * Every capability the plugin grants, including the pre-Role-Manager slugs
62 * older versions handed out, so a historical role is cleaned too.
63 *
64 * Keep in sync with ThinkRank\Core\Capability_Manager::capabilities();
65 * CleanupManifestTest pins the two together.
66 */
67 'capabilities' => [
68 'thinkrank_access',
69 'thinkrank_site_identity',
70 'thinkrank_analytics',
71 'thinkrank_performance',
72 'thinkrank_global_seo',
73 'thinkrank_image_seo',
74 'thinkrank_schema',
75 'thinkrank_social_media',
76 'thinkrank_crawling',
77 'thinkrank_instant_indexing',
78 'thinkrank_author_archives',
79 'thinkrank_content_tools',
80 'thinkrank_ai_insights',
81 'thinkrank_internal_links',
82 'thinkrank_redirections',
83 'thinkrank_broken_links',
84 'thinkrank_external_links',
85 'thinkrank_woocommerce',
86 'thinkrank_settings',
87 'thinkrank_manage_roles',
88 // Legacy slugs (pre-Role Manager).
89 'thinkrank_manage_settings',
90 'thinkrank_view_analytics',
91 'thinkrank_manage_credits',
92 'thinkrank_use_ai_features',
93 ],
94 ];
95