PluginProbe ʕ •ᴥ•ʔ
Atarim – AI Agency for WordPress: Edit Pages, Fix Code, Update Plugins, SEO & Client Feedback / trunk
Atarim – AI Agency for WordPress: Edit Pages, Fix Code, Update Plugins, SEO & Client Feedback vtrunk
5.1.3 5.1.2 5.1.1 5.1 5.0 trunk 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 3.2.0 3.2.1 3.22 3.22.1 3.22.2 3.22.3 3.22.4 3.22.5 3.22.6 3.3.0 3.3.1 3.3.2 3.3.2.1 3.3.2.2 3.3.3 3.30 3.31 3.32 3.4 3.4.1 3.4.3 3.4.4 3.5 3.5.1 3.6 3.6.1 3.7 3.8 3.9 3.9.1 3.9.2 3.9.3 3.9.4 3.9.6 3.9.6.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.2 4.2.1 4.2.2 4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.4
atarim-visual-collaboration / doit / avcf-cluster-loader.php
atarim-visual-collaboration / doit Last commit date
abilities 2 days ago avcf-cluster-loader.php 2 days ago class-avcf-diagnostic.php 3 weeks ago class-avcf-mcp-auth.php 3 weeks ago class-avcf-mcp.php 2 days ago
avcf-cluster-loader.php
260 lines
1 <?php
2 /**
3 * Atarim DoIt — cluster class loader.
4 *
5 * Centralises every third-party / cluster require_once so the main plugin
6 * file stays stable as clusters are added or removed. Loading flow is
7 * UNCHANGED from when these lived in the main file: detectors load eagerly
8 * (phase 1); ability classes load only when the Abilities API + MCP Adapter
9 * are present, with the base class first, then the MCP layer is bootstrapped
10 * (phase 2). To add a cluster, add its require_once lines here — the main plugin
11 * file does not change.
12 *
13 * @package atarim-visual-collaboration
14 */
15
16 if ( ! defined('ABSPATH') ) {
17 exit;
18 }
19
20 // ---------------------------------------------------------------------------
21 // Phase 1: detectors — eager, no AVCF_Abilities_Base dependency.
22 // ---------------------------------------------------------------------------
23 // WP Activity Log integration — third-party partner integration.
24 // (Abilities class is required below alongside the rest of the MCP layer.)
25 require_once( AVCF_PLUGIN_DIR . 'third-party/wp-activity-log/class-avcf-wpal-detector.php' );
26 require_once( AVCF_PLUGIN_DIR . 'third-party/wp-activity-log/class-avcf-wpal-stats.php' );
27 require_once( AVCF_PLUGIN_DIR . 'third-party/wp-activity-log/class-avcf-wpal-rest.php' );
28
29 // WooCommerce integration — detector is safe to load eagerly (no abilities-base dependency).
30 // Ability classes themselves are loaded inside the MCP conditional block below.
31 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-detector.php' );
32
33 // ACF integration — detector is safe to load eagerly (no abilities-base dependency).
34 // Ability classes themselves are loaded inside the MCP conditional block below.
35 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/acf/class-avcf-acf-detector.php' );
36
37 // SEO integrations (Yoast / Rank Math / AIOSEO) — detectors load eagerly.
38 require_once( AVCF_PLUGIN_DIR . 'third-party/seo/yoast/class-avcf-yoast-detector.php' );
39 require_once( AVCF_PLUGIN_DIR . 'third-party/seo/rank-math/class-avcf-rankmath-detector.php' );
40 require_once( AVCF_PLUGIN_DIR . 'third-party/seo/aioseo/class-avcf-aioseo-detector.php' );
41
42 // Elementor integration — detector loads eagerly.
43 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/elementor/class-avcf-elementor-detector.php' );
44
45 // ShortPixel image optimizer — detector loads eagerly.
46 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/shortpixel/class-avcf-shortpixel-detector.php' );
47
48 // EWWW image optimizer — detector loads eagerly.
49 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/ewww/class-avcf-ewww-detector.php' );
50
51 // reSmush.it image optimizer — detector loads eagerly.
52 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/resmushit/class-avcf-resmushit-detector.php' );
53
54 // Smush image optimizer — detector loads eagerly.
55 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/smush/class-avcf-smush-detector.php' );
56
57 // Optimole (CDN/offload) — detector loads eagerly.
58 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/optimole/class-avcf-optimole-detector.php' );
59
60 // Field-framework integrations (Wave 3) — detectors load eagerly.
61 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/metabox/class-avcf-metabox-detector.php' );
62 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/jetengine/class-avcf-jetengine-detector.php' );
63 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/pods/class-avcf-pods-detector.php' );
64 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/acpt/class-avcf-acpt-detector.php' );
65 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/ase/class-avcf-ase-detector.php' );
66 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/bricks/class-avcf-bricks-detector.php' );
67 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/divi/class-avcf-divi-detector.php' );
68 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/wpbakery/class-avcf-wpbakery-detector.php' );
69 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/breakdance/class-avcf-breakdance-detector.php' );
70 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/etch/class-avcf-etch-detector.php' );
71 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/mosaic/class-avcf-mosaic-detector.php' );
72
73 // Forms detectors (standalone per-plugin clusters).
74 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/gravity-forms/class-avcf-gravity-detector.php' );
75 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/wpforms/class-avcf-wpforms-detector.php' );
76 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/fluent-forms/class-avcf-fluent-detector.php' );
77 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/formidable/class-avcf-formidable-detector.php' );
78 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/forminator/class-avcf-forminator-detector.php' );
79 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/ninja-forms/class-avcf-ninja-detector.php' );
80 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/contact-form-7/class-avcf-cf7-detector.php' );
81 require_once( AVCF_PLUGIN_DIR . 'third-party/flamingo/class-avcf-flamingo-detector.php' );
82
83 // Backup detectors (standalone per-plugin clusters).
84 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-jetbackup-detector.php' );
85
86 // ---------------------------------------------------------------------------
87 // Phase 2: ability classes + MCP bootstrap — only when the Abilities API + MCP
88 // Adapter exist. Base class loads first; everything else extends it. This is the
89 // single place the availability check is made.
90 // ---------------------------------------------------------------------------
91 if ( function_exists('wp_get_abilities') && class_exists('\WP\MCP\Core\McpAdapter') ) {
92 // Ability category base class + core categories.
93 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-base.php' );
94
95 // WooCommerce ability classes — extend AVCF_Abilities_Base, must load AFTER the base.
96 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-products.php' );
97 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-variations.php' );
98 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-product-relations.php' );
99 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-orders.php' );
100 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-customers.php' );
101 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-coupons.php' );
102 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-shipping.php' );
103 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-tax.php' );
104 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-checkout-email.php' );
105 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-attributes.php' );
106 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-catalog.php' );
107
108 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-content.php' );
109 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-gutenberg.php' );
110 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-plugins.php' );
111 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-themes.php' );
112 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-theme-files.php' );
113 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-readonly.php' );
114 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-execute-php.php' );
115 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-wp-cli.php' );
116 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-core.php' );
117 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-taxonomies.php' );
118 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-users.php' );
119 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-settings.php' );
120 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-media.php' );
121 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-metadata.php' );
122 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-navigation.php' );
123 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-templates.php' );
124 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-global-styles.php' );
125 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-patterns.php' );
126 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-block-navigation.php' );
127 require_once( AVCF_PLUGIN_DIR . 'doit/abilities/class-avcf-abilities-cache.php' );
128
129 // Forms cluster — unified surface over WPForms / Gravity / Forminator /
130 // Ninja / Fluent / Formidable / CF7. Load order matters: interface →
131 // abstract → per-plugin detectors+adapters → registry → orchestrator.
132 // Forms: Gravity Forms (standalone cluster).
133 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/gravity-forms/class-avcf-gravity-helpers.php' );
134 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/gravity-forms/class-avcf-abilities-gravity.php' );
135 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/gravity-forms/class-avcf-abilities-gravity-pro.php' );
136 // Forms: WPForms (standalone cluster).
137 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/wpforms/class-avcf-wpforms-helpers.php' );
138 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/wpforms/class-avcf-abilities-wpforms.php' );
139 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/wpforms/class-avcf-abilities-wpforms-pro.php' );
140 // Forms: Fluent Forms (standalone cluster).
141 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/fluent-forms/class-avcf-fluent-helpers.php' );
142 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/fluent-forms/class-avcf-abilities-fluent.php' );
143 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/fluent-forms/class-avcf-abilities-fluent-pro.php' );
144 // Forms: Formidable Forms (standalone cluster).
145 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/formidable/class-avcf-formidable-helpers.php' );
146 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/formidable/class-avcf-abilities-formidable.php' );
147 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/formidable/class-avcf-abilities-formidable-pro.php' );
148 // Forms: Forminator (standalone cluster).
149 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/forminator/class-avcf-forminator-helpers.php' );
150 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/forminator/class-avcf-abilities-forminator.php' );
151 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/forminator/class-avcf-abilities-forminator-pro.php' );
152 // Forms: Ninja Forms (standalone cluster).
153 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/ninja-forms/class-avcf-ninja-helpers.php' );
154 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/ninja-forms/class-avcf-abilities-ninja.php' );
155 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/ninja-forms/class-avcf-abilities-ninja-pro.php' );
156 // Forms: Contact Form 7 (standalone cluster, config-only).
157 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/contact-form-7/class-avcf-cf7-helpers.php' );
158 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/contact-form-7/class-avcf-abilities-cf7.php' );
159 require_once( AVCF_PLUGIN_DIR . 'third-party/forms/contact-form-7/class-avcf-abilities-cf7-pro.php' );
160 // Forms: Flamingo (standalone cluster — CF7's companion entry store).
161 require_once( AVCF_PLUGIN_DIR . 'third-party/flamingo/class-avcf-flamingo-helpers.php' );
162 require_once( AVCF_PLUGIN_DIR . 'third-party/flamingo/class-avcf-abilities-flamingo.php' );
163 require_once( AVCF_PLUGIN_DIR . 'third-party/flamingo/class-avcf-abilities-flamingo-pro.php' );
164
165 // Third-party ability categories.
166 require_once( AVCF_PLUGIN_DIR . 'third-party/ecommerce/woocommerce/class-avcf-wc-abilities.php' );
167 require_once( AVCF_PLUGIN_DIR . 'third-party/wp-activity-log/class-avcf-wpal-abilities.php' );
168
169 // ACF ability classes — extend AVCF_Abilities_Base, must load AFTER the base.
170 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/acf/class-avcf-acf-helpers.php' );
171 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/acf/class-avcf-acf-field-groups.php' );
172 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/acf/class-avcf-acf-content-models.php' );
173 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/acf/class-avcf-acf-abilities.php' );
174
175 // SEO ability classes — extend AVCF_Abilities_Base, must load AFTER the base.
176 require_once( AVCF_PLUGIN_DIR . 'third-party/seo/yoast/class-avcf-abilities-yoast.php' );
177 require_once( AVCF_PLUGIN_DIR . 'third-party/seo/rank-math/class-avcf-abilities-rankmath.php' );
178 require_once( AVCF_PLUGIN_DIR . 'third-party/seo/aioseo/class-avcf-abilities-aioseo.php' );
179
180 // Elementor ability classes — extend AVCF_Abilities_Base, must load AFTER the base.
181 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/elementor/class-avcf-elementor-helpers.php' );
182 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/elementor/class-avcf-abilities-elementor.php' );
183 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/elementor/class-avcf-abilities-elementor-pro.php' );
184 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/shortpixel/class-avcf-shortpixel-helpers.php' );
185 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/shortpixel/class-avcf-abilities-shortpixel.php' );
186 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/ewww/class-avcf-ewww-helpers.php' );
187 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/ewww/class-avcf-abilities-ewww.php' );
188 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/resmushit/class-avcf-resmushit-helpers.php' );
189 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/resmushit/class-avcf-abilities-resmushit.php' );
190 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/smush/class-avcf-smush-helpers.php' );
191 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/smush/class-avcf-abilities-smush.php' );
192 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/optimole/class-avcf-optimole-helpers.php' );
193 require_once( AVCF_PLUGIN_DIR . 'third-party/image-optimizer/optimole/class-avcf-abilities-optimole.php' );
194
195 // Field-framework ability classes (Wave 3) — extend AVCF_Abilities_Base, load AFTER the base.
196 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/metabox/class-avcf-metabox-helpers.php' );
197 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/metabox/class-avcf-abilities-metabox.php' );
198 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/jetengine/class-avcf-jetengine-helpers.php' );
199 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/jetengine/class-avcf-abilities-jetengine.php' );
200 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/pods/class-avcf-pods-helpers.php' );
201 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/pods/class-avcf-abilities-pods.php' );
202 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/acpt/class-avcf-acpt-helpers.php' );
203 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/acpt/class-avcf-abilities-acpt.php' );
204 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/ase/class-avcf-ase-helpers.php' );
205 require_once( AVCF_PLUGIN_DIR . 'third-party/content-model/ase/class-avcf-abilities-ase.php' );
206 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/bricks/class-avcf-bricks-helpers.php' );
207 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/bricks/class-avcf-abilities-bricks.php' );
208 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/bricks/class-avcf-abilities-bricks-pro.php' );
209 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/divi/class-avcf-divi-helpers.php' );
210 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/divi/class-avcf-abilities-divi.php' );
211 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/divi/class-avcf-abilities-divi-pro.php' );
212 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/wpbakery/class-avcf-wpbakery-helpers.php' );
213 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/wpbakery/class-avcf-abilities-wpbakery.php' );
214 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/wpbakery/class-avcf-abilities-wpbakery-pro.php' );
215 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/breakdance/class-avcf-breakdance-helpers.php' );
216 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/breakdance/class-avcf-abilities-breakdance.php' );
217 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/breakdance/class-avcf-abilities-breakdance-pro.php' );
218 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/etch/class-avcf-etch-helpers.php' );
219 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/etch/class-avcf-abilities-etch.php' );
220 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/etch/class-avcf-abilities-etch-pro.php' );
221 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/mosaic/class-avcf-mosaic-helpers.php' );
222 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/mosaic/class-avcf-abilities-mosaic.php' );
223 require_once( AVCF_PLUGIN_DIR . 'third-party/page-builder/mosaic/class-avcf-abilities-mosaic-pro.php' );
224
225 // Backup: JetBackup (standalone cluster). Helpers + per-area ability classes;
226 // all extend AVCF_Abilities_Base and gate on the JetBackup detector.
227 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-jetbackup-helpers.php' );
228 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-backups.php' );
229 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-restore.php' );
230 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-jobs.php' );
231 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-schedules.php' );
232 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-destinations.php' );
233 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-queue.php' );
234 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-settings.php' );
235 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-system.php' );
236 require_once( AVCF_PLUGIN_DIR . 'third-party/backup/jetbackup/class-avcf-abilities-jetbackup-restore-point.php' );
237
238 // -----------------------------------------------------------------------
239 // MCP bootstrap — orchestrator + hooks. Runs at load time, inside the same
240 // guard, so the availability check lives in exactly one place.
241 // -----------------------------------------------------------------------
242 require_once( AVCF_PLUGIN_DIR . 'doit/class-avcf-mcp.php' );
243
244 $avcf_mcp = new AVCF_MCP();
245
246 // Register ability category and abilities at file load time.
247 // wp_abilities_api_init fires between rest_api_init priority 3-6,
248 // so hooks must be registered before rest_api_init fires — i.e. at file load time.
249 add_action( 'wp_abilities_api_categories_init', function() {
250 wp_register_ability_category( 'atarim', [
251 'label' => 'Atarim',
252 'description' => 'Atarim AI action layer abilities.',
253 ]);
254 });
255
256 add_action( 'wp_abilities_api_init', [ $avcf_mcp, 'avcf_mcp_register_abilities' ] );
257
258 // Initialize MCP Adapter — hooks rest_api_init internally to fire mcp_adapter_init.
259 \WP\MCP\Core\McpAdapter::instance();
260 }