| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: EmailOctopus |
| 4 |
* Plugin URI: https://emailoctopus.com |
| 5 |
* Description: Use this official plugin to display EmailOctopus subscription forms on your WordPress site. |
| 6 |
* Version: 3.1.7 |
| 7 |
* Author: EmailOctopus |
| 8 |
* Author URI: https://emailoctopus.com |
| 9 |
* Text Domain: emailoctopus |
| 10 |
* License: GPL-2.0+ |
| 11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 12 |
* Domain Path: /languages |
| 13 |
* Requires PHP: 7.4 |
| 14 |
*/ |
| 15 |
|
| 16 |
// Exit if accessed directly. |
| 17 |
if ( ! defined( 'ABSPATH' ) ) |
| 18 |
{ |
| 19 |
exit; |
| 20 |
} |
| 21 |
|
| 22 |
if ( version_compare( PHP_VERSION, '7.4', '<' ) ) { |
| 23 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); |
| 24 |
deactivate_plugins( plugin_basename( __FILE__ ) ); |
| 25 |
wp_die( esc_html__( 'EmailOctopus requires PHP version 7.4 or higher.', 'emailoctopus' ) ); |
| 26 |
} |
| 27 |
|
| 28 |
define( 'EMAILOCTOPUS_VERSION', '3.1.7' ); |
| 29 |
define( 'EMAILOCTOPUS_FILE', __FILE__ ); |
| 30 |
define( 'EMAILOCTOPUS_DIR', plugin_dir_path( EMAILOCTOPUS_FILE ) ); |
| 31 |
define( 'EMAILOCTOPUS_URL', plugin_dir_url( EMAILOCTOPUS_FILE ) ); |
| 32 |
|
| 33 |
$emailoctopus_autoloader = dirname( EMAILOCTOPUS_FILE ) . '/vendor/autoload.php'; |
| 34 |
$emailoctopus_functions = dirname( EMAILOCTOPUS_FILE ) . '/functions.php'; |
| 35 |
|
| 36 |
if ( ! is_readable( $emailoctopus_autoloader ) ) |
| 37 |
{ |
| 38 |
/* Translators: Placeholder is the current directory. */ |
| 39 |
throw new Exception( sprintf( __( 'Please run `composer install` in the plugin folder "%s" and try activating this plugin again.', 'emailoctopus' ), dirname( EMAILOCTOPUS_FILE ) ) ); |
| 40 |
} |
| 41 |
|
| 42 |
require_once $emailoctopus_autoloader; |
| 43 |
require_once $emailoctopus_functions; |
| 44 |
|
| 45 |
$emailoctopus_plugin = \EmailOctopus\Plugin::get_instance(); |
| 46 |
|
| 47 |
$emailoctopus_plugin->run(); |
| 48 |
|