mailchimp-for-wp
Last commit date
assets
10 years ago
includes
10 years ago
languages
10 years ago
vendor
10 years ago
LICENSE
10 years ago
mailchimp-for-wp.php
10 years ago
readme.txt
10 years ago
wpml-config.xml
10 years ago
mailchimp-for-wp.php
72 lines
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: MailChimp for WordPress Lite |
| 4 | Plugin URI: https://mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=plugins-page |
| 5 | Description: Lite version of MailChimp for WordPress. Adds various sign-up methods to your website. |
| 6 | Version: 2.3.7 |
| 7 | Author: ibericode |
| 8 | Author URI: http://ibericode.com/ |
| 9 | Text Domain: mailchimp-for-wp |
| 10 | Domain Path: /languages |
| 11 | License: GPL v3 |
| 12 | |
| 13 | MailChimp for WordPress |
| 14 | Copyright (C) 2012-2015, Danny van Kooten, hi@dannyvankooten.com |
| 15 | |
| 16 | This program is free software: you can redistribute it and/or modify |
| 17 | it under the terms of the GNU General Public License as published by |
| 18 | the Free Software Foundation, either version 3 of the License, or |
| 19 | (at your option) any later version. |
| 20 | |
| 21 | This program is distributed in the hope that it will be useful, |
| 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | GNU General Public License for more details. |
| 25 | |
| 26 | You should have received a copy of the GNU General Public License |
| 27 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 28 | */ |
| 29 | |
| 30 | // Prevent direct file access |
| 31 | if( ! defined( 'ABSPATH' ) ) { |
| 32 | header( 'Status: 403 Forbidden' ); |
| 33 | header( 'HTTP/1.1 403 Forbidden' ); |
| 34 | exit; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Loads the MailChimp for WP plugin files |
| 39 | * |
| 40 | * @return boolean True if the plugin files were loaded, false otherwise. |
| 41 | */ |
| 42 | function mc4wp_load_plugin() { |
| 43 | |
| 44 | // don't load plugin if user has the premium version installed and activated |
| 45 | if( defined( 'MC4WP_VERSION' ) ) { |
| 46 | return false; |
| 47 | } |
| 48 | |
| 49 | // bootstrap the lite plugin |
| 50 | define( 'MC4WP_LITE_VERSION', '2.3.7' ); |
| 51 | define( 'MC4WP_LITE_PLUGIN_DIR', dirname( __FILE__ ) . '/' ); |
| 52 | define( 'MC4WP_LITE_PLUGIN_URL', plugins_url( '/' , __FILE__ ) ); |
| 53 | define( 'MC4WP_LITE_PLUGIN_FILE', __FILE__ ); |
| 54 | |
| 55 | require_once MC4WP_LITE_PLUGIN_DIR . 'vendor/autoload_52.php'; |
| 56 | require_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions/general.php'; |
| 57 | require_once MC4WP_LITE_PLUGIN_DIR . 'includes/functions/template.php'; |
| 58 | |
| 59 | // Initialize the plugin and store an instance in the global scope |
| 60 | MC4WP_Lite::init(); |
| 61 | $GLOBALS['mc4wp'] = MC4WP_Lite::instance(); |
| 62 | |
| 63 | if( is_admin() |
| 64 | && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { |
| 65 | new MC4WP_Lite_Admin(); |
| 66 | } |
| 67 | |
| 68 | return true; |
| 69 | } |
| 70 | |
| 71 | add_action( 'plugins_loaded', 'mc4wp_load_plugin', 20 ); |
| 72 |