| 1 |
<?php |
| 2 |
/** |
| 3 |
* ConvertKit WordPress Plugin. |
| 4 |
* |
| 5 |
* @package ConvertKit |
| 6 |
* @author ConvertKit |
| 7 |
* |
| 8 |
* @wordpress-plugin |
| 9 |
* Plugin Name: ConvertKit |
| 10 |
* Plugin URI: https://convertkit.com/ |
| 11 |
* Description: Quickly and easily integrate ConvertKit forms into your site. |
| 12 |
* Version: 1.9.7.7 |
| 13 |
* Author: ConvertKit |
| 14 |
* Author URI: https://convertkit.com/ |
| 15 |
* Text Domain: convertkit |
| 16 |
*/ |
| 17 |
|
| 18 |
// Bail if ConvertKit is alread loaded. |
| 19 |
if ( class_exists( 'WP_ConvertKit' ) ) { |
| 20 |
return; |
| 21 |
} |
| 22 |
|
| 23 |
// Define ConverKit Plugin paths and version number. |
| 24 |
define( 'CONVERTKIT_PLUGIN_FILE', plugin_basename( __FILE__ ) ); |
| 25 |
define( 'CONVERTKIT_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); |
| 26 |
define( 'CONVERTKIT_PLUGIN_PATH', __DIR__ ); |
| 27 |
define( 'CONVERTKIT_PLUGIN_VERSION', '1.9.7.7' ); |
| 28 |
|
| 29 |
// Load files that are always required. |
| 30 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/cron-functions.php'; |
| 31 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/functions.php'; |
| 32 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-wp-convertkit.php'; |
| 33 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-ajax.php'; |
| 34 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-api.php'; |
| 35 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-gutenberg.php'; |
| 36 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-log.php'; |
| 37 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-output.php'; |
| 38 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-post.php'; |
| 39 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-resource.php'; |
| 40 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-resource-forms.php'; |
| 41 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-resource-landing-pages.php'; |
| 42 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-resource-posts.php'; |
| 43 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-resource-tags.php'; |
| 44 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-review-request.php'; |
| 45 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-settings.php'; |
| 46 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-setup.php'; |
| 47 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-shortcodes.php'; |
| 48 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-system-info.php'; |
| 49 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-term.php'; |
| 50 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-user.php'; |
| 51 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/class-convertkit-widgets.php'; |
| 52 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/blocks/class-convertkit-block.php'; |
| 53 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/blocks/class-convertkit-block-broadcasts.php'; |
| 54 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/blocks/class-convertkit-block-content.php'; |
| 55 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/blocks/class-convertkit-block-form.php'; |
| 56 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/widgets/class-ck-widget-form.php'; |
| 57 |
|
| 58 |
// Contact Form 7 Integration. |
| 59 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/integrations/contactform7/class-convertkit-contactform7.php'; |
| 60 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/integrations/contactform7/class-convertkit-contactform7-settings.php'; |
| 61 |
|
| 62 |
// Elementor Integration. |
| 63 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/integrations/elementor/class-convertkit-elementor.php'; |
| 64 |
|
| 65 |
// WishList Member Integration. |
| 66 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/integrations/wishlist/class-convertkit-wishlist.php'; |
| 67 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/integrations/wishlist/class-convertkit-wishlist-settings.php'; |
| 68 |
|
| 69 |
// WooCommerce Integration. |
| 70 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/integrations/woocommerce/class-convertkit-woocommerce-product-form.php'; |
| 71 |
|
| 72 |
// Load files that are only used in the WordPress Administration interface. |
| 73 |
if ( is_admin() ) { |
| 74 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/class-convertkit-admin-category.php'; |
| 75 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/class-convertkit-admin-post.php'; |
| 76 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/class-convertkit-admin-settings.php'; |
| 77 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/class-convertkit-admin-tinymce.php'; |
| 78 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/class-convertkit-admin-user.php'; |
| 79 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/class-multi-value-field-table.php'; |
| 80 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/section/class-convertkit-settings-base.php'; |
| 81 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/section/class-convertkit-settings-general.php'; |
| 82 |
require_once CONVERTKIT_PLUGIN_PATH . '/admin/section/class-convertkit-settings-tools.php'; |
| 83 |
|
| 84 |
// Contact Form 7 Integration. |
| 85 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/integrations/contactform7/class-convertkit-contactform7-admin-settings.php'; |
| 86 |
|
| 87 |
// WishList Member Integration. |
| 88 |
require_once CONVERTKIT_PLUGIN_PATH . '/includes/integrations/wishlist/class-convertkit-wishlist-admin-settings.php'; |
| 89 |
} |
| 90 |
|
| 91 |
// Register Plugin activation and deactivation functions. |
| 92 |
register_activation_hook( __FILE__, 'convertkit_plugin_activate' ); |
| 93 |
add_action( 'wp_insert_site', 'convertkit_plugin_activate_new_site' ); |
| 94 |
add_action( 'activate_blog', 'convertkit_plugin_activate_new_site' ); |
| 95 |
register_deactivation_hook( __FILE__, 'convertkit_plugin_deactivate' ); |
| 96 |
|
| 97 |
/** |
| 98 |
* Main function to return Plugin instance. |
| 99 |
* |
| 100 |
* @since 1.9.6 |
| 101 |
*/ |
| 102 |
function WP_ConvertKit() { // phpcs:ignore |
| 103 |
|
| 104 |
return WP_ConvertKit::get_instance(); |
| 105 |
|
| 106 |
} |
| 107 |
|
| 108 |
// Finally, initialize the Plugin. |
| 109 |
WP_ConvertKit(); |
| 110 |
|