PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.0.6
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.0.6
3.4.4 3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 All 197 releases
← All changes | includes/class-wp-convertkit.php +21 -78 3.4.23.0.6 View file →
@@ -63,9 +63,8 @@
63 63 $this->initialize_admin_or_frontend_editor();
64 64 $this->initialize_cli_cron();
65 65 $this->initialize_frontend();
66 66 $this->initialize_global();
67 - $this->initialize_mcp();
68 67
69 68 }
70 69
71 70 /**
@@ -79,27 +78,22 @@
79 78 if ( ! is_admin() ) {
80 79 return;
81 80 }
82 81
83 - $this->classes['admin_bulk_edit'] = new ConvertKit_Admin_Bulk_Edit();
84 - $this->classes['admin_cache_plugins'] = new ConvertKit_Admin_Cache_Plugins();
85 - $this->classes['admin_category'] = new ConvertKit_Admin_Category();
86 - $this->classes['admin_landing_page'] = new ConvertKit_Admin_Landing_Page();
87 - $this->classes['admin_legacy_resource_notice'] = new ConvertKit_Admin_Legacy_Resource_Notice();
88 - $this->classes['admin_importer_activecampaign'] = new ConvertKit_Admin_Importer_ActiveCampaign();
89 - $this->classes['admin_importer_aweber'] = new ConvertKit_Admin_Importer_AWeber();
90 - $this->classes['admin_importer_campaignmonitor'] = new ConvertKit_Admin_Importer_CampaignMonitor();
91 - $this->classes['admin_importer_convertkit_legacy_forms'] = new ConvertKit_Admin_Importer_ConvertKit_Legacy_Forms();
92 - $this->classes['admin_importer_mc4wp'] = new ConvertKit_Admin_Importer_MC4WP();
93 - $this->classes['admin_importer_mailpoet'] = new ConvertKit_Admin_Importer_Mailpoet();
94 - $this->classes['admin_importer_newsletter'] = new ConvertKit_Admin_Importer_Newsletter();
95 - $this->classes['admin_post'] = new ConvertKit_Admin_Post();
96 - $this->classes['admin_quick_edit'] = new ConvertKit_Admin_Quick_Edit();
97 - $this->classes['admin_restrict_content'] = new ConvertKit_Admin_Restrict_Content();
98 - $this->classes['admin_settings'] = new ConvertKit_Admin_Settings();
99 - $this->classes['admin_setup_wizard_landing_page'] = new ConvertKit_Admin_Setup_Wizard_Landing_Page();
100 - $this->classes['admin_setup_wizard_plugin'] = new ConvertKit_Admin_Setup_Wizard_Plugin();
101 - $this->classes['admin_setup_wizard_restrict_content'] = new ConvertKit_Admin_Setup_Wizard_Restrict_Content();
82 + $this->classes['admin_bulk_edit'] = new ConvertKit_Admin_Bulk_Edit();
83 + $this->classes['admin_cache_plugins'] = new ConvertKit_Admin_Cache_Plugins();
84 + $this->classes['admin_category'] = new ConvertKit_Admin_Category();
85 + $this->classes['admin_landing_page'] = new ConvertKit_Admin_Landing_Page();
86 + $this->classes['admin_notices'] = new ConvertKit_Admin_Notices();
87 + $this->classes['admin_post'] = new ConvertKit_Admin_Post();
88 + $this->classes['admin_quick_edit'] = new ConvertKit_Admin_Quick_Edit();
89 + $this->classes['admin_refresh_resources'] = new ConvertKit_Admin_Refresh_Resources();
90 + $this->classes['admin_restrict_content'] = new ConvertKit_Admin_Restrict_Content();
91 + $this->classes['admin_settings'] = new ConvertKit_Admin_Settings();
92 + $this->classes['admin_setup_wizard_landing_page'] = new ConvertKit_Admin_Setup_Wizard_Landing_Page();
93 + $this->classes['admin_setup_wizard_plugin'] = new ConvertKit_Admin_Setup_Wizard_Plugin();
94 + $this->classes['admin_setup_wizard_restrict_content'] = new ConvertKit_Admin_Setup_Wizard_Restrict_Content();
95 + $this->classes['admin_tinymce'] = new ConvertKit_Admin_TinyMCE();
102 96
103 97 /**
104 98 * Initialize integration classes for the WordPress Administration interface.
105 99 *
@@ -183,11 +177,9 @@
183 177 * @since 1.9.6
184 178 */
185 179 private function initialize_global() {
186 180
187 - $this->classes['admin_notices'] = new ConvertKit_Admin_Notices();
188 - $this->classes['admin_tinymce'] = new ConvertKit_Admin_TinyMCE();
189 - $this->classes['admin_refresh_resources'] = new ConvertKit_Admin_Refresh_Resources();
181 + $this->classes['ajax'] = new ConvertKit_AJAX();
190 182 $this->classes['blocks_convertkit_broadcasts'] = new ConvertKit_Block_Broadcasts();
191 183 $this->classes['blocks_convertkit_content'] = new ConvertKit_Block_Content();
192 184 $this->classes['blocks_convertkit_formtrigger'] = new ConvertKit_Block_Form_Trigger();
193 185 $this->classes['blocks_convertkit_form'] = new ConvertKit_Block_Form();
@@ -198,21 +190,18 @@
198 190 $this->classes['blocks_convertkit_product'] = new ConvertKit_Block_Product();
199 191 $this->classes['block_formatter_form_link'] = new ConvertKit_Block_Formatter_Form_Link();
200 192 $this->classes['block_formatter_product_link'] = new ConvertKit_Block_Formatter_Product_Link();
201 193 $this->classes['pre_publish_action_broadcast_export'] = new ConvertKit_Pre_Publish_Action_Broadcast_Export();
202 - $this->classes['plugin_sidebar_post_settings'] = new ConvertKit_Plugin_Sidebar_Post_Settings();
203 194 $this->classes['broadcasts_exporter'] = new ConvertKit_Broadcasts_Exporter();
204 195 $this->classes['broadcasts_importer'] = new ConvertKit_Broadcasts_Importer();
205 196 $this->classes['elementor'] = new ConvertKit_Elementor();
206 197 $this->classes['gutenberg'] = new ConvertKit_Gutenberg();
207 - $this->classes['mcp'] = new ConvertKit_MCP();
208 - $this->classes['media_library'] = new ConvertKit_Media_Library();
209 - $this->classes['output_restrict_content'] = new ConvertKit_Output_Restrict_Content();
210 - $this->classes['restrict_content_cache'] = new ConvertKit_Restrict_Content_Cache();
211 - $this->classes['review_request'] = new ConvertKit_Review_Request( 'Kit', 'convertkit', CONVERTKIT_PLUGIN_PATH );
212 - $this->classes['preview_output'] = new ConvertKit_Preview_Output();
213 - $this->classes['setup'] = new ConvertKit_Setup();
214 - $this->classes['shortcodes'] = new ConvertKit_Shortcodes();
198 + $this->classes['media_library'] = new ConvertKit_Media_Library();
199 + $this->classes['output_restrict_content'] = new ConvertKit_Output_Restrict_Content();
200 + $this->classes['review_request'] = new ConvertKit_Review_Request( 'Kit', 'convertkit', CONVERTKIT_PLUGIN_PATH );
201 + $this->classes['preview_output'] = new ConvertKit_Preview_Output();
202 + $this->classes['setup'] = new ConvertKit_Setup();
203 + $this->classes['shortcodes'] = new ConvertKit_Shortcodes();
215 204
216 205 /**
217 206 * Initialize integration classes for the frontend web site.
218 207 *
@@ -218,54 +207,8 @@
218 207 *
219 208 * @since 1.9.6
220 209 */
221 210 do_action( 'convertkit_initialize_global' );
222 -
223 - }
224 -
225 - /**
226 - * Initializes the MCP server if enabled in the Plugin's settings.
227 - *
228 - * @since 3.4.0
229 - */
230 - public function initialize_mcp() {
231 -
232 - // Bail if the MCP server is not enabled.
233 - $settings = new ConvertKit_Settings_MCP();
234 - if ( ! $settings->enabled() ) {
235 - return;
236 - }
237 -
238 - // Bail if the Abilities API is unavailable (WordPress < 6.9).
239 - if ( ! function_exists( 'wp_register_ability' ) ) {
240 - return;
241 - }
242 -
243 - // Bail if PHP 7.4+ is not installed, as this is required for the MCP Adapter classes.
244 - if ( version_compare( PHP_VERSION, '7.4', '<' ) ) {
245 - return;
246 - }
247 -
248 - // Load MCP Adapter if another Plugin hasn't already loaded it.
249 - if ( ! class_exists( 'WP\\MCP\\Core\\McpAdapter' ) ) {
250 - // Bail if the WordPress MCP Adapter autoloader is missing.
251 - if ( ! file_exists( CONVERTKIT_PLUGIN_PATH . '/vendor/autoload.php' ) ) {
252 - return;
253 - }
254 -
255 - // Load MCP Adapter.
256 - require_once CONVERTKIT_PLUGIN_PATH . '/vendor/autoload.php';
257 -
258 - // Bail if the MCP Adapter class doesn't exist - something went wrong with the autoloader.
259 - if ( ! class_exists( 'WP\\MCP\\Core\\McpAdapter' ) ) { // @phpstan-ignore-line
260 - return;
261 - }
262 - }
263 -
264 - // Bootstrap the MCP Adapter, per WordPress/mcp-adapter's recommended
265 - // integration pattern.
266 - // @see https://github.com/WordPress/mcp-adapter#using-mcp-adapter-in-your-plugin.
267 - \WP\MCP\Core\McpAdapter::instance();
268 211
269 212 }
270 213
271 214 /**