/** * Call current init_hook() to init their hook */ function init_module_hook() { $module = AEM()->module_factory()->get_current_module(); if ($module) { $module->init_hook(); } }
function wp_mail($to, $subject, $message, $headers = '', $attachments = array()) { $atts = apply_filters('wp_mail', compact('to', 'subject', 'message', 'headers', 'attachments')); $send_result = AEM()->module_factory()->get_current_module()->wp_mail($atts['to'], $atts['subject'], $atts['message'], $atts['headers'], $atts['attachments']); if (!$send_result) { $send_result = @mail($to, $subject, $message, $headers); } return $send_result; }
public static function check_option() { $current_module = AEM()->module_factory()->get_current_module(); $check_result = $current_module->check_option(); return $check_result; }
Author URI: http://enginethemes.com */ define("AEM_PLUGIN_FILE", __FILE__); define("AEM_PLUGIN_PATH", dirname(AEM_PLUGIN_FILE)); define('AEM_PLUGIN_BASENAME', plugin_basename(__FILE__)); define('AEM_VERSION', "1.0.0"); define('AEM_DOMAIN', "et_mailing"); require_once AEM_PLUGIN_PATH . '/inc/class-autoload.php'; require_once AEM_PLUGIN_PATH . '/inc/aem-functions.php'; require_once AEM_PLUGIN_PATH . '/inc/class-aem-util.php'; if (!is_wp_error(AEM_Util::check_require())) { require_once AEM_PLUGIN_PATH . '/inc/aem-override-function.php'; /** * Initiate main object */ AEM()->init(); /* * Check if in administrator area */ if (is_admin()) { /* * Do action after theme setup to check if ET Theme is activated */ add_action("after_setup_theme", "load_admin_page"); } } function load_admin_page() { //Advoid redilace theme core /** * Do action in administration area
function get_general_section() { $sections = array('args' => array('title' => __("General settings", AEM_DOMAIN), 'id' => 'aem-general-settings', 'icon' => "Y", 'class' => ''), 'groups' => array(array('args' => array('title' => __("From Email", AEM_DOMAIN), 'id' => 'aem-from_email', 'desc' => __("The email name you want to display in email header", AEM_DOMAIN), 'class' => ''), 'fields' => array(array('id' => 'from_email', 'type' => 'text', 'title' => __("From email ", AEM_DOMAIN), 'name' => 'aem_from_email', 'class' => ''))), array('args' => array('title' => __("From name", AEM_DOMAIN), 'id' => 'aem-from_name', 'desc' => __("The name you want to display in email header", AEM_DOMAIN), 'class' => ''), 'fields' => array(array('id' => 'from_name', 'type' => 'text', 'title' => __("From name ", AEM_DOMAIN), 'name' => 'aem_from_name', 'class' => ''))), array('args' => array('title' => __("Force header", AEM_DOMAIN), 'id' => 'aem-force-header', 'desc' => __("If enable, all email send by all plugin, theme will be change to the infor above", AEM_DOMAIN), 'class' => ''), 'fields' => array(array('id' => 'force_header', 'type' => 'switch', 'title' => __("Force header ", AEM_DOMAIN), 'name' => 'aem_force_header', 'class' => ''))), array('args' => array('title' => __("Service to use", AEM_DOMAIN), 'id' => 'select_email_service', 'class' => '', 'desc' => __("Select a service you want to use.", AEM_DOMAIN)), 'fields' => array(array('id' => 'eam_current_service', 'type' => 'select', 'data' => AEM()->module_factory()->get_module_names(), 'title' => __("Available service", AEM_DOMAIN), 'name' => 'eam_current_service', 'class' => 'option-item bg-grey-input ', 'placeholder' => __("Select a service", AEM_DOMAIN), 'lable' => __("Available service", AEM_DOMAIN)))), array('args' => array('title' => __("Send test email", AEM_DOMAIN), 'id' => 'send_test_email', 'class' => '', 'desc' => __("Click to test email.", AEM_DOMAIN)), 'fields' => array(array('id' => 'test_email', 'type' => 'text', 'title' => __("Test email", AEM_DOMAIN), 'name' => 'aem_test_email', 'class' => ''), array('id' => 'send_text_email', 'text' => "Send Test Email", 'type' => 'Custom_Type_Button', 'name' => 'aem_send_test_email', 'class' => 'bg-grey-button button btn-button'))), array('args' => array('title' => __("Click tracking", AEM_DOMAIN), 'id' => 'aem-click-tracking', 'class' => '', 'desc' => __("Track link click on email", AEM_DOMAIN)), 'fields' => array(array('id' => 'click_tracking', 'type' => 'switch', 'title' => __("Click tracking ", AEM_DOMAIN), 'name' => 'aem_click_tracking', 'class' => ''))), array('args' => array('title' => __("Open tracking", AEM_DOMAIN), 'id' => 'aem-open-tracking', 'class' => '', 'desc' => __("Open click", AEM_DOMAIN)), 'fields' => array(array('id' => 'click_tracking', 'type' => 'switch', 'title' => __("Open tracking ", AEM_DOMAIN), 'name' => 'aem_open_tracking', 'class' => ''))))); return $sections; }