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

86 lines 3.1 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 return [
22 /*
23 * Every hook the free plugin schedules. Clearing one that was never
24 * scheduled is a no-op, so a hook that only some configurations reach is
25 * still safe to list — and cheaper than discovering it survived.
26 *
27 * Keep in sync with the wp_schedule_event() / wp_schedule_single_event()
28 * call sites; CleanupManifestTest fails when a new one appears.
29 */
30 'cron_hooks' => [
31 'thinkrank_cache_cleanup',
32 'thinkrank_daily_cleanup',
33 'thinkrank_usage_analytics',
34 'thinkrank_put_do_daily_action',
35 // Google token refresh. Scheduled on the custom `thinkrank_45min`
36 // recurrence, whose cron_schedules filter disappears with the plugin —
37 // so a survivor here is a recurring event WordPress can no longer
38 // resolve an interval for.
39 'thinkrank_google_token_refresh',
40 'thinkrank_collect_performance_data',
41 'thinkrank_regenerate_sitemap',
42 'thinkrank_regenerate_sitemap_settings',
43 'thinkrank_ai_traffic_prune',
44 'thinkrank_auto_ai_optimize',
45 'thinkrank_instant_indexing_reconcile',
46 'thinkrank_instant_indexing_submit',
47 'thinkrank_email_report_tick',
48 'thinkrank_bv_tick',
49 'thinkrank_bv_watchdog',
50 ],
51
52 /*
53 * Every capability the plugin grants, including the pre-Role-Manager slugs
54 * older versions handed out, so a historical role is cleaned too.
55 *
56 * Keep in sync with ThinkRank\Core\Capability_Manager::capabilities();
57 * CleanupManifestTest pins the two together.
58 */
59 'capabilities' => [
60 'thinkrank_access',
61 'thinkrank_site_identity',
62 'thinkrank_analytics',
63 'thinkrank_performance',
64 'thinkrank_global_seo',
65 'thinkrank_image_seo',
66 'thinkrank_schema',
67 'thinkrank_social_media',
68 'thinkrank_crawling',
69 'thinkrank_instant_indexing',
70 'thinkrank_author_archives',
71 'thinkrank_content_tools',
72 'thinkrank_ai_insights',
73 'thinkrank_internal_links',
74 'thinkrank_redirections',
75 'thinkrank_broken_links',
76 'thinkrank_woocommerce',
77 'thinkrank_settings',
78 'thinkrank_manage_roles',
79 // Legacy slugs (pre-Role Manager).
80 'thinkrank_manage_settings',
81 'thinkrank_view_analytics',
82 'thinkrank_manage_credits',
83 'thinkrank_use_ai_features',
84 ],
85 ];
86