PluginProbe
WP Email Template / 2.8.7
WP Email Template v2.8.7
1.5.0 1.6.0 1.7.0 1.8.0 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.2 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.2.0 2.2.1 2.2.10 All 101 releases
wp-email-template / wp-email-template.php

wp-email-template.php in WP Email Template 2.8.7, at wp-email-template.php

104 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: WP Email Template LITE
4 Plugin URI: http://a3rev.com/shop/wp-email-template/
5 Description: This plugin automatically adds a professional, responsive, customizable, email browser optimized HTML template for all WordPress and WordPress plugin generated emails that are sent from your site to customers and admins. Works with any WordPress plugin including the e-commerce plugins WooCommerce and WP e-Commerce.
6 Version: 2.8.7
7 Requires at least: 6.0
8 Tested up to: 7.0
9 Author: a3rev Software
10 Author URI: https://a3rev.com/
11 Text Domain: wp-email-template
12 Domain Path: /languages
13 WC requires at least: 6.0.0
14 WC tested up to: 10.6
15 License: This software is under commercial license and copyright to A3 Revolution Software Development team
16
17 WP Email Template plugin
18 Copyright© 2011 A3 Revolution Software Development team
19
20 A3 Revolution Software Development team
21 admin@a3rev.com
22 PO Box 1170
23 Gympie 4570
24 QLD Australia
25 */
26 ?>
27 <?php
28 define('WP_EMAIL_TEMPLATE_FILE_PATH', dirname(__FILE__));
29 define('WP_EMAIL_TEMPLATE_DIR_NAME', basename(WP_EMAIL_TEMPLATE_FILE_PATH));
30 define('WP_EMAIL_TEMPLATE_FOLDER', dirname(plugin_basename(__FILE__)));
31 define('WP_EMAIL_TEMPLATE_URL', untrailingslashit(plugins_url('/', __FILE__)));
32 define('WP_EMAIL_TEMPLATE_DIR', WP_PLUGIN_DIR . '/' . WP_EMAIL_TEMPLATE_FOLDER);
33 define('WP_EMAIL_TEMPLATE_NAME', plugin_basename(__FILE__));
34 define('WP_EMAIL_TEMPLATE_IMAGES_URL', WP_EMAIL_TEMPLATE_URL . '/assets/images');
35 define('WP_EMAIL_TEMPLATE_JS_URL', WP_EMAIL_TEMPLATE_URL . '/assets/js');
36 define('WP_EMAIL_TEMPLATE_CSS_URL', WP_EMAIL_TEMPLATE_URL . '/assets/css');
37 if (!defined("WP_EMAIL_TEMPLATE_AUTHOR_URI")) define("WP_EMAIL_TEMPLATE_AUTHOR_URI", "https://a3rev.com/shop/wp-email-template/");
38
39 define( 'WP_EMAIL_TEMPLATE_KEY', 'wp_email_template' );
40 define( 'WP_EMAIL_TEMPLATE_PREFIX', 'wp_email_template_' );
41 define( 'WP_EMAIL_TEMPLATE_VERSION', '2.8.7' );
42 define( 'WP_EMAIL_TEMPLATE_G_FONTS', true );
43
44 // declare compatibility with new HPOS of WooCommerce
45 add_action( 'before_woocommerce_init', function() {
46 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
47 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
48 }
49 } );
50
51 use \A3Rev\EmailTemplate\FrameWork;
52
53 if ( version_compare( PHP_VERSION, '5.6.0', '>=' ) ) {
54 require __DIR__ . '/vendor/autoload.php';
55
56 /**
57 * Plugin Framework init
58 */
59 $GLOBALS[WP_EMAIL_TEMPLATE_PREFIX.'admin_interface'] = new FrameWork\Admin_Interface();
60
61 global $wp_email_template_admin_page;
62 $wp_email_template_admin_page = new FrameWork\Pages\Email_Template_Admin();
63
64 global $wp_email_template_send_wp_emails_page;
65 $wp_email_template_send_wp_emails_page = new FrameWork\Pages\Send_WP_Emails();
66
67 $GLOBALS[WP_EMAIL_TEMPLATE_PREFIX.'admin_init'] = new FrameWork\Admin_Init();
68
69 // End - Plugin Framework init
70
71 global $wp_et_send_wp_emails;
72 $wp_et_send_wp_emails = new \A3Rev\EmailTemplate\Send_Wp_Emails_Functions();
73
74 global $wp_email_template_exclude_subject_data;
75 $wp_email_template_exclude_subject_data = new \A3Rev\EmailTemplate\Exclude_Subject_Data();
76
77 } else {
78 return;
79 }
80
81 /**
82 * Load Localisation files.
83 *
84 * Note: the first-loaded translation file overrides any following ones if the same translation is present.
85 *
86 * Locales found in:
87 * - WP_LANG_DIR/wp-email-template/wp-email-template-LOCALE.mo
88 * - WP_LANG_DIR/plugins/wp-email-template-LOCALE.mo
89 * - /wp-content/plugins/wp-email-template/languages/wp-email-template-LOCALE.mo (which if not found falls back to)
90 */
91 function wp_email_template_plugin_textdomain() {
92 $locale = apply_filters( 'plugin_locale', get_locale(), 'wp-email-template' );
93
94 load_textdomain( 'wp-email-template', WP_LANG_DIR . '/wp-email-template/wp-email-template-' . $locale . '.mo' );
95 load_plugin_textdomain( 'wp-email-template', false, WP_EMAIL_TEMPLATE_FOLDER . '/languages/' );
96 }
97
98 include ('admin/email-init.php');
99
100 /**
101 * Call when the plugin is activated
102 */
103 register_activation_hook(__FILE__, 'wp_email_template_install');
104