first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,535 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* The public-facing functionality of the plugin.
*
* @link http://example.com
* @since 4.0
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/public
*/
/**
* The public-facing functionality of the plugin.
*
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the public-facing stylesheet and JavaScript.
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/public
*/
class Email_Subscribers_Public {
/**
* The ID of this plugin.
*
* @since 4.0
* @var string $email_subscribers The ID of this plugin.
*/
private $email_subscribers;
/**
* The version of this plugin.
*
* @since 4.0
* @var string $version The current version of this plugin.
*/
private $version;
/**
* Initialize the class and set its properties.
*
* @param string $email_subscribers The name of the plugin.
* @param string $version The version of this plugin.
*
* @since 4.0
*
*/
public function __construct( $email_subscribers, $version ) {
$this->email_subscribers = $email_subscribers;
$this->version = $version;
}
/**
* Register the stylesheets for the public-facing side of the site.
*
* @since 4.0
*/
public function enqueue_styles() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Email_Subscribers_Loader as all of the hooks are defined
* in that particular class.
*
* The Email_Subscribers_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
wp_enqueue_style( $this->email_subscribers, plugin_dir_url( __FILE__ ) . 'css/email-subscribers-public.css', array(), $this->version, 'all' );
wp_register_style( 'ig-es-popup-frontend', plugin_dir_url( __FILE__ ) . 'css/frontend.css', array(), $this->version, 'all' );
wp_register_style( 'ig-es-popup-css', plugin_dir_url( __FILE__ ) . 'css/popup.min.css', array(), $this->version, 'all' );
}
/**
* Register the JavaScript for the public-facing side of the site.
*
* @since 4.0
*/
public function enqueue_scripts() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Email_Subscribers_Loader as all of the hooks are defined
* in that particular class.
*
* The Email_Subscribers_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
wp_enqueue_script( $this->email_subscribers, plugin_dir_url( __FILE__ ) . 'js/email-subscribers-public.js', array( 'jquery' ), $this->version, true );
wp_register_script( 'ig-es-pre-data', plugin_dir_url( __FILE__ ) . 'js/icegram_messages_data.js', array(), $this->version, false );
wp_register_script( 'ig-es-popup-js', plugin_dir_url( __FILE__ ) . 'js/icegram.js', array( 'jquery', 'ig-es-pre-data' ), $this->version, false );
$es_data = array(
'messages' => array(
'es_empty_email_notice' => __( 'Please enter email address', 'email-subscribers' ),
'es_rate_limit_notice' => __( 'You need to wait for some time before subscribing again', 'email-subscribers' ),
'es_single_optin_success_message' => __( 'Successfully Subscribed.', 'email-subscribers' ),
// 'es_double_optin_success_message' => __( 'Your subscription was successful! Kindly check your mailbox and confirm your subscription. If you don\'t see the email within a few minutes, check the spam/junk folder.', 'email-subscribers' ),
'es_email_exists_notice' => __( 'Email Address already exists!', 'email-subscribers' ),
'es_unexpected_error_notice' => __( 'Oops.. Unexpected error occurred.', 'email-subscribers' ),
'es_invalid_email_notice' => __( 'Invalid email address', 'email-subscribers' ),
'es_try_later_notice' => __( 'Please try after some time', 'email-subscribers' )
),
'es_ajax_url' => admin_url( 'admin-ajax.php' ),
);
wp_localize_script( $this->email_subscribers, 'es_data', $es_data );
}
public function es_email_subscribe_init() {
global $wpdb, $ig_es_tracker;
//initialize
new ES_Handle_Subscription();
new ES_Shortcode();
$option = ig_es_get_request_data( 'es' );
$hash = ig_es_get_request_data( 'hash' );
if ( ! empty( $hash ) ) {
$data = ig_es_decode_request_data( $hash );
$db_id = ! empty( $data['contact_id'] ) ? (int) $data['contact_id'] : 0;
$email = ! empty( $data['email'] ) ? $data['email'] : '';
$guid = ! empty( $data['guid'] ) ? $data['guid'] : '';
$message_id = ! empty( $data['message_id'] ) ? (int) $data['message_id'] : 0;
$campaign_id = ! empty( $data['campaign_id'] ) ? (int) $data['campaign_id'] : 0;
$list_ids = ! empty( $data['list_ids'] ) ? $data['list_ids'] : '';
} else {
$db_id = ig_es_get_request_data( 'db' );
$email = ig_es_get_request_data( 'email' );
$guid = ig_es_get_request_data( 'guid' );
$message_id = 0;
$campaign_id = 0;
}
if ( ! empty( $option ) ) {
$email = sanitize_email( $email );
$email = str_replace( ' ', '+', $email );
if ( ( 'optin' === $option || 'unsubscribe' === $option ) && ! empty( $db_id ) ) {
//check if contact exist with id and email
$is_contact_exists = ES()->contacts_db->is_contact_exists( $db_id, $email );
if ( $is_contact_exists ) {
$ids = array( $db_id );
$status = '';
$subject = '';
$content = '';
$unsubscribed = 0;
$status = ( 'optin' === $option ) ? 'subscribed': 'unsubscribed';
$is_status_update_required = ES()->lists_contacts_db->is_status_update_required( $ids, $status );
if ( $is_status_update_required ) {
if ( 'optin' === $option ) {
$message = get_option( 'ig_es_subscription_success_message' );
ES()->contacts_db->edit_contact_global_status( $ids, $unsubscribed );
ES()->lists_contacts_db->edit_subscriber_status( $ids, $status, $list_ids );
//send welcome email
$contact = ES()->contacts_db->get_contacts_email_name_map( array( $email ) );
$data = array(
'name' => ! empty( $contact[ $email ] ) ? $contact[ $email ]['name'] : '',
'first_name' => ! empty( $contact[ $email ] ) ? $contact[ $email ]['first_name'] : '',
'last_name' => ! empty( $contact[ $email ] ) ? $contact[ $email ]['last_name'] : '',
'email' => $email,
'contact_id' => $db_id,
'guid' => $guid,
'list_ids' => $list_ids,
);
$lists = ES()->lists_db->get_all_lists_name_by_contact( $db_id );
$list_name = implode( ', ', $lists );
$data['list_name'] = $list_name;
do_action( 'ig_es_contact_subscribed', $data );
} elseif ( 'unsubscribe' === $option ) {
$unsubscribed = 1;
$submitted = '';
$unsubscribe_lists = array();
$list_selected = ig_es_get_request_data( 'list_selected' );
// Check if nonce value is not empty.
if ( ! empty( $_POST['ig_es_unsubscribe_nonce'] ) ) {
// Verify nonce value.
if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['ig_es_unsubscribe_nonce'] ) ), 'ig-es-unsubscribe-nonce' ) ) {
$submitted = ig_es_get_data( $_POST, 'submitted', '', true );
if ( ! empty( $submitted ) ) {
$unsubscribe_lists = ig_es_get_data( $_POST, 'unsubscribe_lists', array() );
}
} else {
echo esc_html__( 'Sorry, you are not allowed to access this page.', 'email-subscribers' );
die();
}
} elseif ( ! empty( $_POST['List-Unsubscribe'] ) && 'One-Click' === $_POST['List-Unsubscribe'] ) {
$unsubscribe_lists = ES()->lists_contacts_db->get_list_ids_by_contact( $db_id, 'subscribed' );
}
$message = get_option( 'ig_es_unsubscribe_success_message' );
if ( ES()->is_starter() && empty( $submitted ) && empty( $unsubscribe_lists ) && ! $list_selected ) {
do_action( 'ig_es_update_subscriber', $db_id );
}
if ( empty( $unsubscribe_lists ) ) {
// We don't get any lists to unsubscribe. Which means we have to
// ask contact for confirmation about unsubscription
// If we haven't received confirmation about unsubscription,
// Show confirmation message
$confirm_unsubscription = ig_es_get_request_data( 'confirm_unsubscription' );
if ( empty( $submitted ) && ! $confirm_unsubscription ) {
do_action( 'ig_es_confirm_unsubscription' );
}
$unsubscribe_lists = ES()->lists_contacts_db->get_list_ids_by_contact( $db_id, 'subscribed' );
}
// Confirm if there are lists to unsubscribe before we unsubscribe the contact.
if ( ! empty( $unsubscribe_lists ) ) {
//update list status
ES()->contacts_db->edit_list_contact_status( array( $db_id ), $unsubscribe_lists, 'unsubscribed' );
}
//check if all list have same status
$list_ids = ES()->lists_contacts_db->get_list_ids_by_contact( $db_id, 'subscribed' );
if ( count( $list_ids ) == 0 ) {
//update global
ES()->contacts_db->edit_contact_global_status( array( $db_id ), 1 );
}
do_action( 'ig_es_contact_unsubscribe', $db_id, $message_id, $campaign_id, $unsubscribe_lists );
}
do_action( 'es_redirect_to_optin_page', $option );
} else {
if ( 'subscribed' === $status ) {
$message = __( 'You are already subscribed!', 'email-subscribers' );
} else {
$message = __( 'You are already unsubscribed!', 'email-subscribers' );
}
}
} else {
$message = __( 'Sorry, we couldn\'t find you. Please contact admin.', 'email-subscribers' );
}
// We are using $message in following file
include 'partials/subscription-successfull.php';
} elseif ( in_array( $option, array( 'viewstatus', 'open' ) ) ) {
if ( ! empty( $guid ) && ! empty( $email ) ) {
if ( $campaign_id > 0 && $db_id > 0 ) {
do_action( 'ig_es_message_open', $db_id, $message_id, $campaign_id );
}
}
} elseif ( 'click' === $option ) {
if ( ! empty( $data['link_hash'] ) ) {
$hash = $data['link_hash'];
$link = ES()->links_db->get_by_hash( $hash );
if ( ! empty( $link ) ) {
$campaign_id = ! empty( $link['campaign_id'] ) ? $link['campaign_id'] : 0;
$message_id = ! empty( $link['message_id'] ) ? $link['message_id'] : 0;
$contact_id = ! empty( $data['contact_id'] ) ? $data['contact_id'] : 0;
$link_id = ! empty( $link['id'] ) ? $link['id'] : 0;
// Track Link Click
do_action( 'ig_es_message_click', $link_id, $contact_id, $message_id, $campaign_id );
$redirect_link = htmlspecialchars_decode( $link['link'] );
// Now, redirect to target
wp_redirect( $redirect_link );
exit;
}
}
} elseif ( 'survey' === $option ) {
if ( ! empty( $data['survey_number'] ) ) {
$campaign_id = $data['campaign_id'];
$message_id = $data['message_id'];
$survey_number = $data['survey_number'];
if ( ! empty( $survey_number ) ) {
if ( ! empty( $message_id ) ) {
$notification = ES_DB_Mailing_Queue::get_mailing_queue_by_id( $message_id );
if ( ! empty( $notification ) ) {
$notificaion_meta = maybe_unserialize( $notification['meta'] );
$survey = ! empty( $notificaion_meta['survey'] ) ? $notificaion_meta['survey'] : array();
$message = $survey[$survey_number]['message'];
}
} elseif ( ! empty( $campaign_id ) ) {
$campaign = ES()->campaigns_db->get( $campaign_id );
if ( ! empty( $campaign ) ) {
$campaign_meta = maybe_unserialize( $campaign['meta'] );
$survey = ! empty( $campaign_meta['survey'] ) ? $campaign_meta['survey'] : array();
$message = $survey[$survey_number]['message'];
}
}
include 'partials/subscription-successfull.php';
}
}
}
}
}
public function add_contact( $contact_data, $list_id ) {
$email = $contact_data['email'];
$user_list_status = isset( $contact_data['user_list_status'] ) ? $contact_data['user_list_status'] : 'subscribed' ;
$default_data = array(
'status' => 'verified',
'hash' => ES_Common::generate_guid(),
'created_at' => ig_get_current_date_time(),
'wp_user_id' => 0
);
$contact_data = wp_parse_args( $contact_data, $default_data );
$contact_data = apply_filters( 'ig_es_add_subscriber_data', $contact_data );
// Return if contact status has an error.
if ( ! empty( $contact_data['status'] ) && 'ERROR' === $contact_data['status'] ) {
return;
}
$contact = ES()->contacts_db->is_contact_exist_in_list( $email, $list_id );
if ( empty( $contact['contact_id'] ) ) {
$contact_id = ES()->contacts_db->insert( $contact_data );
} else {
$contact_id = $contact['contact_id'];
}
$optin_type = get_option( 'ig_es_optin_type', true );
$optin_type = ( 'double_opt_in' === $optin_type ) ? 2 : 1;
$list_id = ! empty( $list_id ) ? $list_id : 1;
$list_contact_data = array(
'contact_id' => $contact_id,
'status' => $user_list_status,
'subscribed_at' => ig_get_current_date_time(),
'optin_type' => $optin_type,
'subscribed_ip' => '',
);
ES()->lists_contacts_db->remove_contacts_from_lists( $contact_id, $list_id );
ES()->lists_contacts_db->add_contact_to_lists( $list_contact_data, $list_id );
}
/**
* Allow user to select the list from which they want to unsubscribe
*
* @since 4.2
*/
public function confirm_unsubscription() {
global $wp;
$get = ig_es_get_request_data();
$action = home_url( add_query_arg( $get, $wp->request ) );
$action = add_query_arg( 'confirm_unsubscription', 1, $action );
$hash = ig_es_get_request_data( 'hash' );
if ( ! empty( $hash ) ) {
$data = ig_es_decode_request_data( $hash );
$email = ! empty( $data['email'] ) ? $data['email'] : '';
}
wp_register_style( 'tailwind', ES_PLUGIN_URL . 'lite/admin/dist/main.css', array(), $this->version, 'all' );
$es_wp_styles = wp_styles();
$site_name = get_bloginfo( 'name' );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo esc_html__( 'Unsubscribe', 'email-subscribers' ); ?> - <?php echo esc_html( $site_name ); ?></title>
<?php
$es_wp_styles->do_item( 'tailwind' );
?>
<style type="text/css">
.ig_es_form_wrapper {
width: 30%;
margin: 0 auto;
border: 2px #e8e3e3 solid;
padding: 0.9em;
border-radius: 5px;
}
.ig_es_form_heading {
font-size: 1.3em;
line-height: 1.5em;
margin-bottom: 0.25em;
}
.ig_es_list_checkbox {
margin-right: 0.5em;
}
.ig_es_submit {
color: #FFFFFF !important;
border-color: #03a025 !important;
background: #03a025 !important;
box-shadow: 0 1px 0 #03a025;
font-weight: bold;
height: 2.4em;
line-height: 1em;
cursor: pointer;
border-width: 1px;
border-style: solid;
-webkit-appearance: none;
border-radius: 3px;
white-space: nowrap;
box-sizing: border-box;
font-size: 1em;
padding: 0 2em;
}
.confirmation-no {
border-color: #FF0000 !important;
background: #FF0000 !important;
box-shadow: 0 1px 0 #FF0000;
}
.ig_es_submit:hover {
color: #FFF !important;
background: #0AAB2E !important;
border-color: #0AAB2E !important;
}
.ig_es_form_wrapper hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
</style>
</head>
<body>
<div class="min-h-screen px-4 pt-10 pb-12 mx-auto bg-gray-100 sm:px-6 lg:px-8">
<section class="bg-white mt-12 py-7 shadow-md sm:rounded-lg mx-auto sm:w-2/4 xl:w-6/12">
<div class="flex">
<div class="w-full pl-6 pr-6 leading-6">
<form action="<?php echo esc_attr( $action ); ?>" method="post" id="">
<?php wp_nonce_field( 'ig-es-unsubscribe-nonce', 'ig_es_unsubscribe_nonce' ); ?>
<?php
do_action( 'ig_es_unsubscribe_form_after_start' );
?>
<?php
if ( ! empty( $email ) ) {
?>
<div class="ig_es_unsubscribe_header text-center pb-3 border-b border-gry-150">
<span class="block text-xl font-medium text-gray-600"><?php echo esc_html( $email ); ?></span>
<span>
<?php
echo esc_html__( 'is subscribed to our mailing list(s).', 'email-subscribers' );
?>
</span>
</div>
<?php
}
?>
<div class="ig_es_form_heading px-3">
<p class="pt-2 text-base tracking-wide text-gray-600 font-medium"><?php echo esc_html__( 'Unsubscribe from all list(s)', 'email-subscribers' ); ?></p>
<span class="text-sm text-gray-500"><?php echo esc_html__( 'You will be unsubscribed from receiving all future emails sent from us.', 'email-subscribers' ); ?></span>
</div>
<?php
do_action( 'ig_es_unsubscribe_form_before_end' );
?>
<input type="hidden" name="submitted" value="submitted">
<input class="ml-3 mt-4 rounded-md border border-transparent px-4 py-2 bg-white text-sm leading-5 font-medium text-white bg-indigo-600 transition ease-in-out duration-150 hover:bg-indigo-500 focus:ring-4 focus:ring-indigo-500 cursor-pointer" type="submit" name="unsubscribe" value="<?php echo esc_attr__( 'Unsubscribe', 'email-subscribers' ); ?>">
</form>
</div>
</div>
</section>
</div>
</body>
</html>
<?php
die();
}
/**
* Add Icegram Express template types
*
* @param array $template_type Template types
*
* @return array $template_type Template types
*
* @since 5.0.0
*/
public function add_template_type( $template_type = array() ) {
$template_type['newsletter'] = __( 'Broadcast', 'email-subscribers' );
// Start-IG-Code.
$template_type['post_notification'] = __( 'Post Notification', 'email-subscribers' );
// End-IG-Code.
return $template_type;
}
}

View File

@@ -0,0 +1,119 @@
/**
* All of the CSS for your public-facing functionality should be
* included in this file.
*/
.es_caption {
padding-bottom: 1em;
padding-right: 0.5em;
}
.es_msg {
padding-top: 5px;
padding-bottom: 5px;
color: #F00;
}
.es_textbox {
padding-bottom: 10px;
}
.es_button {
padding-top: 10px;
padding-bottom: 5px;
}
.es_textbox_class {
width: 200px;
}
.es_lablebox {
padding-bottom: 3px;
}
.es_subscription_message.success {
color: #008000;
font-size: 16px;
}
.es_subscription_message.error {
color: #ff0000;
font-size: 16px;
}
.es_spinner_image {
display: none;
float: right;
}
.es-field-wrap{
margin-bottom: 0.6em;
}
.ig-es-form-list-selection, .ig-es-form-list-selection td, .ig-es-form-list-selection tr, .ig-es-form-radio-selection, .ig-es-form-radio-selection td, .ig-es-form-radio-selection tr {
border: none;
}
.ig_es_form_wrapper {
width: 30%;
margin: 0 auto;
border: 2px #e8e3e3 solid;
padding: 0.9em;
border-radius: 5px;
}
.ig_es_form_heading {
font-size: 1.3em;
line-height: 1.5em;
margin-bottom: 0.5em;
}
.ig_es_list_checkbox {
margin-right: 0.5em;
}
.ig_es_submit {
color: #FFFFFF !important;
border-color: #03a025 !important;
background: #03a025 !important;
box-shadow: 0 1px 0 #03a025;
font-weight: bold;
height: 2.4em;
line-height: 1em;
cursor: pointer;
border-width: 1px;
border-style: solid;
-webkit-appearance: none;
border-radius: 3px;
white-space: nowrap;
box-sizing: border-box;
font-size: 1em;
padding: 0 2em;
margin-top: 1em;
}
.ig_es_submit:hover {
color: #FFF !important;
background: #0AAB2E !important;
border-color: #0AAB2E !important;
}
.ig_es_form_wrapper hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
/* Custom field - START */
.es_form_cf{
padding: 0.75rem;
}
select.es_form_cf, input[type="text"].es_form_cf, input[type="number"].es_form_cf, input[type="date"].es_form_cf{
width: 50%;
}
/* Custom field - END */

View File

@@ -0,0 +1,830 @@
/* Powered By link */
.ig_powered_by, .ig_powered_by a, a.ig_powered_by {
color: #A8A8A8 !important;
text-decoration: none;
}
.ig_cta_overlay{width: 100%; height: 100%; top: 0; left: 0; background: #E6E6E6; z-index: 1000000; position: fixed; opacity: 0.5; } .ig_cta_spinner{background : url('../images/spinner-2x.gif') no-repeat no-repeat center; height: 100%; }
/* Make border none for all buttons under icegram, to have our style */
/*todo :test this and check with all wp themes and icegram themes*/
.icegram .ig_button,
.icegram input[type="submit"],
.icegram input[type="button"]{
border: none; /* Safari/Chrome, other WebKit */ /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
box-shadow:none;
}
/** TODO : check the need of this while testing **/
/*
.icegram .ig_button:hover,
.icegram input[type="submit"]:hover,
.icegram input[type="button"]:hover,
.icegram .ig_button:active,
.icegram input[type="submit"]:active,
.icegram input[type="button"]:active{
border: none;
}
*/
/*
Making p tag margin uniform to all icegram message type.
It can be override with default.css and theme.css if required
*/
.ig_message p{
margin: 0;
padding: 0;
line-height: inherit;
font-size: inherit;
}
.ig_clear_fix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.ig_form_response_text{
margin:.5em auto;
padding: .5em;
text-align:center;
}
/****************** Embed Form: Start *******************/
.ig_form_container{
display: none;
position: relative;
height: 100%;
z-index: 10;
padding: .7em 1em;
text-align: left;
line-height: 1; /* Safari/Chrome, other WebKit */ /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}
.ig_form_container form{
margin: 0;
padding: 0;
font-size: 100%;
}
.ig_form_container textarea,
.ig_form_container select{
height: 2.25em;
}
/*.ig_form_container textarea{
height: 4.25em;
}*/
.ig_form_container input[type=checkbox]{
height: 1.25em !important;
}
.ig_form_container .ig_form_header{
/*font-size: 1.5em;*/
width: 98%;
/*margin: 0 auto;*/
text-align: left;
}
.ig_form_container .ig_form_footer{
font-size: .8em;
/*margin: 0 auto;*/
width: 98%;
clear: both;
text-align: left;
}
.ig_form_container .ig_form_els{
margin:.3em 1% .3em 0;
}
.ig_form_left .ig_form_container.layout_left{
display: block;
padding: 1em .7em;
}
.ig_form_right .ig_form_container.layout_right{
display: block;
padding: 1em .7em;
float: left;
}
.ig_form_bottom .ig_form_container.layout_bottom{
display: block;
width: 100%;
height: auto;
}
.ig_form_inline .ig_form_container.layout_inline{
display: block;
width: 100%;
padding: .5em;
background-color: transparent !important;
color: inherit !important;
}
.ig_form_bottom .ig_form_container.layout_bottom .ig_embed_form_container,
.ig_form_inline .ig_form_container.layout_inline .ig_embed_form_container{
/*text-align: center;*/
}
.ig_form_left .ig_form_container.layout_left .ig_form_els,
.ig_form_right .ig_form_container.layout_right .ig_form_els{
margin: .5em auto;
}
.ig_form_bottom .ig_form_container.layout_bottom .ig_form_els{
display: inline-block;
float: left;
}
.ig_form_inline .ig_form_container.layout_inline .ig_form_els{
display: inline-block;
float: left;
}
.ig_form_bottom .ig_form_container.layout_bottom .ig_full .ig_form_els,
.ig_form_inline .ig_form_container.layout_inline .ig_full .ig_form_els{
width: 99%;
}
.ig_form_bottom .ig_form_container.layout_bottom .ig_half .ig_form_els,
.ig_form_inline .ig_form_container.layout_inline .ig_half .ig_form_els{
width: 49%;
}
.ig_form_bottom .ig_form_container.layout_bottom .ig_third .ig_form_els,
.ig_form_inline .ig_form_container.layout_inline .ig_third .ig_form_els{
width: 32%;
}
.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els,
.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els{
/*width: 22%;*/
width: 24%;
}
.ig_form_container .ig_form_els input{
height: 2.25em;
line-height: 2.2em;
}
.ig_form_container .ig_form_els input,
.ig_form_container .ig_form_els button,
.ig_form_container .ig_form_els label,
.ig_form_container .ig_form_els textarea,
.ig_form_container .ig_form_els select{
width: 99%;
font-size: 1em;
text-align: left;
display: block;
margin: 0 auto; /* Safari/Chrome, other WebKit */ /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}
.ig_form_container .ig_form_els .ig_button {
text-align: center;
}
.ig_form_container .ig_form_els textarea,
.ig_form_container .ig_form_els select{
padding-left: .5em;
}
.ig_form_container .ig_form_els textarea{
padding-top: .5em;
}
/*TODO : make it work for every message type.. every layout*/
.ig_form_container .ig_form_els.ig_form_el_radio {
height: 2.25em !important;
line-height: 2.2em;
}
.ig_form_container .ig_form_els.ig_form_el_radio input{
width: auto ! important;
display: inline;
margin: 0 .3em;
height: 1em !important;
}
.ig_form_container .ig_form_els.ig_form_el_radio input[type="checkbox"] {
display: inline-block !important;
margin: 0 0.3em;
height: 1em !important;
}
.ig_form_container .ig_form_els.ig_form_el_radio input[type="checkbox"]::before {
margin: -0.85rem 0 0 -0.65em;
}
.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els.ig_form_el_radio,
.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els.ig_form_el_radio{
display: inline;
}
.ig_form_bottom .ig_form_container.layout_bottom .ig_quater .ig_form_els.ig_form_el_radio label,
.ig_form_inline .ig_form_container.layout_inline .ig_quater .ig_form_els.ig_form_el_radio label{
width: auto;
display: inline;
}
.ig_form_left .ig_form_container.layout_left .ig_button_label,
.ig_form_right .ig_form_container.layout_right .ig_button_label{
display: none;
}
.ig_form_inline .ig_form_container.layout_inline .ig_button_label,
.ig_form_bottom .ig_form_container.layout_bottom .ig_button_label{
display: block;
visibility: hidden;
opacity: 0;
}
/* Form Button CSS */
.ig_form_inline .ig_form_container.layout_inline .ig_button,
.ig_form_inline .ig_form_container.layout_inline input[type="submit"],
.ig_form_inline .ig_form_container.layout_inline input[type="button"],
.ig_form_bottom .ig_form_container.layout_bottom .ig_button,
.ig_form_bottom .ig_form_container.layout_bottom input[type="submit"],
.ig_form_bottom .ig_form_container.layout_bottom input[type="button"],
.ig_form_left .ig_form_container.layout_left .ig_button,
.ig_form_left .ig_form_container.layout_left input[type="submit"],
.ig_form_left .ig_form_container.layout_left input[type="button"],
.ig_form_right .ig_form_container.layout_right .ig_button,
.ig_form_right .ig_form_container.layout_right input[type="submit"],
.ig_form_right .ig_form_container.layout_right input[type="button"] {
width: 99% ;
font-size: 1em;
float: none;
margin: 0 auto!important;
text-align: center;
display: block;
-ms-transform: inherit;
-webkit-transform: inherit;
transform: inherit;
opacity: 1;
}
/* End */
/****** Form Styles: Start ******/
.ig_form_container:before{
content: '';
padding: 0;
margin: 0;
position: absolute; /* Safari/Chrome, other WebKit */ /* Firefox, other Gecko */
box-sizing: content-box; /* Opera/IE 8+ */
}
/****** Form Style: Style 0 ******/
.ig_form_style_0 .ig_form_container:before{
display: none;
}
.ig_form_style_0 .ig_form_container .ig_form_els input{
height: 2.25em;
line-height: 2.2em;
padding: inherit;
padding-left: .5em;
}
.ig_form_style_0 .ig_form_container .ig_form_els .ig_button:hover,
.ig_form_style_0 .ig_form_container .ig_form_els .ig_button:focus,
.ig_form_style_0 .ig_form_container .ig_form_els .ig_button{
height: 2.25em;
line-height: 2.2em;
/*border: inherit; */
padding: inherit;
}
/****** Form Style: Style 1 ******/
.ig_form_style_1 .ig_form_container:before{
border-width: 0;
border-style: solid;
border-color: #000 !important;
opacity: .3;
top: 0;
}
.ig_form_left.ig_form_style_1 .ig_form_container:before{
right: 0;
height: inherit;
border-left-width: .22em;
}
.ig_form_right.ig_form_style_1 .ig_form_container:before{
left: 0;
height: inherit;
border-left-width: .22em;
}
.ig_form_bottom.ig_form_style_1 .ig_form_container:before{
left: 0;
width: 100%;
border-top-width: .22em;
}
.ig_form_inline.ig_form_style_1 .ig_form_container:before{
display: none;
}
.ig_form_style_5 .ig_form_container .ig_form_els input:not(.ig_button),
.ig_form_style_6 .ig_form_container .ig_form_els input:not(.ig_button),
.ig_form_style_1 .ig_form_container .ig_form_els input:not(.ig_button){
border: 1px solid #ccc;
}
.ig_form_style_5 .ig_form_container .ig_form_els input,
.ig_form_style_6 .ig_form_container .ig_form_els input,
.ig_form_style_1 .ig_form_container .ig_form_els input{
height: 2.25em;
line-height: 2.2em;
border-radius: .2em;
box-shadow: none;
padding: inherit;
padding-left: .5em;
}
.ig_form_style_5 .ig_form_container .ig_form_els input:focus:not(.ig_button),
.ig_form_style_5 .ig_form_container .ig_form_els input:hover:not(.ig_button),
.ig_form_style_6 .ig_form_container .ig_form_els input:focus:not(.ig_button),
.ig_form_style_6 .ig_form_container .ig_form_els input:hover:not(.ig_button),
.ig_form_style_1 .ig_form_container .ig_form_els input:focus:not(.ig_button),
.ig_form_style_1 .ig_form_container .ig_form_els input:hover:not(.ig_button){
border-color: #999;
}
.ig_form_style_5 .ig_form_container .ig_form_els input:focus,
.ig_form_style_5 .ig_form_container .ig_form_els input:hover,
.ig_form_style_6 .ig_form_container .ig_form_els input:focus,
.ig_form_style_6 .ig_form_container .ig_form_els input:hover,
.ig_form_style_1 .ig_form_container .ig_form_els input:focus,
.ig_form_style_1 .ig_form_container .ig_form_els input:hover{
height: 2.25em;
line-height: 2.2em;
padding: inherit;
padding-left: .5em;
}
.ig_form_style_5 .ig_form_container .ig_form_els .ig_button:hover,
.ig_form_style_5 .ig_form_container .ig_form_els .ig_button:focus,
.ig_form_style_5 .ig_form_container .ig_form_els .ig_button,
.ig_form_style_6 .ig_form_container .ig_form_els .ig_button:hover,
.ig_form_style_6 .ig_form_container .ig_form_els .ig_button:focus,
.ig_form_style_6 .ig_form_container .ig_form_els .ig_button,
.ig_form_style_1 .ig_form_container .ig_form_els .ig_button:hover,
.ig_form_style_1 .ig_form_container .ig_form_els .ig_button:focus,
.ig_form_style_1 .ig_form_container .ig_form_els .ig_button{
height: 2.25em;
line-height: 2.2em;
/*border: inherit; */
padding: inherit;
}
/****** Form Style: Style 2 ******/
.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els,
.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els{
margin-right: 0;
margin-left: 0;
}
.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els .ig_button,
.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els .ig_button,
.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els .ig_button,
.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els .ig_button{
padding: inherit;
}
.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els input,
.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els input{
padding-left: 1em;
}
.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els .ig_button,
.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els input,
.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els .ig_button,
.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els input{
height: 2.25em;
line-height: 2.2em;
border-radius: 2em;
}
.ig_form_left.ig_form_style_2 .ig_form_container.layout_left .ig_form_els label,
.ig_form_right.ig_form_style_2 .ig_form_container.layout_right .ig_form_els label{
padding-left: 1em;
}
.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els .ig_button,
.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els .ig_button,
.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els input,
.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els input{
height: 2.25em;
line-height: 2.2em;
width: 100%;
border-width: 2px;
border-right-width: 0;
}
.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_first input,
.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first input{
border-radius: 2em 0 0 2em;
padding-left: 1em;
}
.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_first label,
.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_first label{
padding-left: 1em;
}
.ig_form_bottom.ig_form_style_2 .ig_form_container.layout_bottom .ig_form_els.ig_form_els_last input,
.ig_form_inline.ig_form_style_2 .ig_form_container.layout_inline .ig_form_els.ig_form_els_last input{
border-radius: 0 2em 2em 0;
}
/****** Form Style: Style 3 ******/
.ig_form_style_3 .ig_form_container .ig_form_els input:not(.ig_button){
border: 1px solid rgba(255,255,255,.3);
}
.ig_form_style_3 .ig_form_container .ig_form_els input{
height: 2.25em;
line-height: 2.2em;
box-shadow: none;
padding: inherit;
padding-left: .5em;
background-color: rgba(0, 0, 0, .3);
/*color: inherit;*/
}
.ig_form_style_3 .ig_form_container .ig_form_els input:focus:not(.ig_button),
.ig_form_style_3 .ig_form_container .ig_form_els input:hover:not(.ig_button){
border-color: rgba(255,255,255,.6);
}
.ig_form_style_3 .ig_form_container .ig_form_els input:focus,
.ig_form_style_3 .ig_form_container .ig_form_els input:hover{
height: 2.25em;
line-height: 2.2em;
padding: inherit;
padding-left: .5em;
}
.ig_form_style_3 .ig_form_container .ig_form_els .ig_button:hover,
.ig_form_style_3 .ig_form_container .ig_form_els .ig_button:focus,
.ig_form_style_3 .ig_form_container .ig_form_els .ig_button{
height: 2.25em;
line-height: 2.2em;
/*border: inherit; */
padding: inherit;
}
.ig_form_style_3 .ig_form_container .ig_form_els ::-webkit-input-placeholder { /* WebKit browsers */
color: rgba(255,255,255,.5);
}
.ig_form_style_3 .ig_form_container .ig_form_els :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: rgba(255,255,255,.5);
opacity: 1;
}
.ig_form_style_3 .ig_form_container .ig_form_els ::-moz-placeholder { /* Mozilla Firefox 19+ */
color: rgba(255,255,255,.5);
opacity: 1;
}
.ig_form_style_3 .ig_form_container .ig_form_els :-ms-input-placeholder { /* Internet Explorer 10+ */
color: rgba(255,255,255,.5);
}
/****** Form Style: Style 4 ******/
.ig_form_bottom.ig_form_style_4 .ig_content{
margin-bottom: 1.3em;
}
.ig_form_style_4 .ig_form_container:before{
/*opacity: .4;*/
border-style: solid;
/*top: -1.2em;
left: -1.3em;
border-width: 1.3em;*/
top: -1em;
left: -1em;
width: 100%;
height: 100%;
border-width: 1em;
z-index: -1;
box-shadow: 0 0px 15px rgba(0,0,0,0.7);
}
.ig_form_bottom.ig_form_style_4 .ig_form_container:before{
/*top: 0;*/
/*border-bottom-width: 0;*/
}
.ig_form_right.ig_form_style_4 .ig_form_container:before{
left: inherit;
right: -1em;
}
.ig_form_inline.ig_form_style_4 .ig_form_container:before{
display: none;
}
.ig_form_style_4 .ig_form_container .ig_form_els input{
height: 2.25em;
line-height: 2.2em;
padding: inherit;
padding-left: .5em;
}
.ig_form_style_4 .ig_form_container .ig_form_els .ig_button:hover,
.ig_form_style_4 .ig_form_container .ig_form_els .ig_button:focus,
.ig_form_style_4 .ig_form_container .ig_form_els .ig_button{
height: 2.25em;
line-height: 2.2em;
/*border: inherit; */
padding: inherit;
}
/****** Form Style: Style 5 ******/
.ig_form_bottom.ig_form_style_5 .ig_form_container.layout_bottom .ig_form_els_first,
.ig_form_inline.ig_form_style_5 .ig_form_container.layout_inline .ig_form_els_first{
width: 68%;
}
.ig_form_bottom.ig_form_style_5 .ig_form_container.layout_bottom .ig_form_els_last,
.ig_form_inline.ig_form_style_5 .ig_form_container.layout_inline .ig_form_els_last{
width: 30%;
}
/****** Form Style: Style 6 ******/
.ig_form_style_6 .ig_form_container.layout_bottom .ig_full .ig_form_els,
.ig_form_style_6 .ig_form_container.layout_inline .ig_full .ig_form_els,
.ig_form_style_6 .ig_form_container.layout_bottom .ig_half .ig_form_els,
.ig_form_style_6 .ig_form_container.layout_inline .ig_half .ig_form_els,
.ig_form_style_6 .ig_form_container.layout_bottom .ig_third .ig_form_els,
.ig_form_style_6 .ig_form_container.layout_inline .ig_third .ig_form_els,
.ig_form_style_6 .ig_form_container.layout_bottom .ig_quater .ig_form_els,
.ig_form_style_6 .ig_form_container.layout_inline .ig_quater .ig_form_els{
width: 99%;
margin: .5em auto 0 auto;
}
/****** Form Styles: End ******/
/****************** Embed Form: End *******************/
/***************Animations: Start******************/
/*** Appear: Start ***/
.ig_anim_appear_in {
-webkit-animation: IgFadeIn 0.9s;
animation: IgFadeIn 0.9s;
visibility: visible;
}
@-webkit-keyframes IgFadeIn {
0% {opacity: 0; }
50% {opacity: 0.5; }
100% {opacity: 1; }
}
@keyframes IgFadeIn {
0% {opacity: 0; }
50% {opacity: 0.5; }
100% {opacity: 1; }
}
.ig_anim_appear_out {
-webkit-animation: IgFadeOut 0.9s;
animation: IgFadeOut 0.9s;
}
@-webkit-keyframes IgFadeOut {
0% {opacity: 1; }
99.5% {opacity: 0.5; }
100% {opacity: 1; }
}
@keyframes IgFadeOut {
0% {opacity: 1; }
99.5% {opacity: 0.5; }
100% {opacity: 1; }
}
/*** Appear: End***/
/*** Slide: Start ***/
/****-Slide Left: Start-***/
.ig_left.ig_anim_slide_in{
animation-name: IgSlideInLeft;
-moz-animation-name: IgSlideInLeft;
-webkit-animation-name: IgSlideInLeft;
animation-duration: 0.5s;
-moz-animation-duration: 0.5s;
-webkit-animation-duration: 0.5s;
animation-timing-function: ease;
-moz-animation-timing-function: ease;
-webkit-animation-timing-function: ease;
}
@-webkit-keyframes IgSlideInLeft {
0% {-webkit-transform: translate3d(-100%, 0, 0);}
100% {-webkit-transform: none;}
}
@keyframes IgSlideInLeft {
0% {-webkit-transform: translate3d(-100%, 0, 0);transform: translate3d(-100%, 0, 0);}
100% {-webkit-transform: none;transform: none;}
}
.ig_left.ig_anim_slide_out{
animation-name: IgFadeOutLeft;
-moz-animation-name: IgFadeOutLeft;
-webkit-animation-name: IgFadeOutLeft;
animation-duration: 0.9s;
-moz-animation-duration: 0.9s;
-webkit-animation-duration: 0.9s;
animation-timing-function: ease;
-moz-animation-timing-function: ease;
-webkit-animation-timing-function: ease;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
@-webkit-keyframes IgFadeOutLeft {
0% {opacity: 1; -webkit-transform: translate3d( 0%, 0, 0);}
99.5% {opacity: 0; -webkit-transform: translate3d(-100%, 0, 0);}
100% {opacity: 1; -webkit-transform: translate3d(-100%, 0, 0);}
}
@keyframes IgFadeOutLeft {
0% {opacity: 1; -webkit-transform: translate3d(0%, 0, 0); transform: translate3d(0%, 0, 0); }
99.5% {opacity: 0; -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); }
100% {opacity: 1; -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); }
}
/****-Slide Left: End-***/
/****-Slide Right: Start-***/
.ig_right.ig_anim_slide_in{
animation-name: IgSlideInRight;
-moz-animation-name: IgSlideInRight;
-webkit-animation-name: IgSlideInRight;
animation-duration: 0.5s;
-moz-animation-duration: 0.5s;
-webkit-animation-duration: 0.5s;
animation-timing-function: ease;
-moz-animation-timing-function: ease;
-webkit-animation-timing-function: ease;
}
@-webkit-keyframes IgSlideInRight {
0% {-webkit-transform: translate3d(100%, 0, 0);}
100% {-webkit-transform: none; }
}
@keyframes IgSlideInRight {
0% { -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); }
100% { -webkit-transform: none; transform: none; }
}
.ig_right.ig_anim_slide_out{
animation-name: IgFadeOutRight;
-moz-animation-name: IgFadeOutRight;
-webkit-animation-name: IgFadeOutRight;
animation-duration: 0.9s;
-moz-animation-duration: 0.9s;
-webkit-animation-duration: 0.9s;
animation-timing-function: ease;
-moz-animation-timing-function: ease;
-webkit-animation-timing-function: ease;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
@-webkit-keyframes IgFadeOutRight {
0% {opacity: 1; -webkit-transform: translate3d(0%, 0, 0);}
99.5% {opacity: 0; -webkit-transform: translate3d(100%, 0, 0);}
100% {opacity: 1; -webkit-transform: translate3d(100%, 0, 0);}
}
@keyframes IgFadeOutRight {
0% {opacity: 1; -webkit-transform: translate3d(0%, 0, 0); transform: translate3d(0%, 0, 0);}
99.5% {opacity: 0; -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); }
100% {opacity: 1; -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); }
}
/****-Slide Right: End-***/
/****-Slide Up : start***/
.ig_bottom.ig_anim_slide_in,
.ig_bottom .ig_anim_slide_in{
animation-name: IgSlideInUp;
-moz-animation-name: IgSlideInUp;
-webkit-animation-name: IgSlideInUp;
animation-duration: 0.5s;
-moz-animation-duration: 0.5s;
-webkit-animation-duration: 0.5s;
animation-timing-function: ease;
-moz-animation-timing-function: ease;
-webkit-animation-timing-function: ease;
}
@-webkit-keyframes IgSlideInUp {
0% {-webkit-transform: translate3d(0, 100%, 0);}
100% {-webkit-transform: none;}
}
@keyframes IgSlideInUp {
0% {-webkit-transform: translate3d(0, 100%, 0);transform: translate3d(0, 100%, 0); }
100% {-webkit-transform: none;transform: none; }
}
.ig_bottom.ig_anim_slide_out,
.ig_bottom .ig_anim_slide_out{
animation-name: IgFadeOutDown;
-moz-animation-name: IgFadeOutDown;
-webkit-animation-name: IgFadeOutDown;
animation-duration: 0.9s;
-moz-animation-duration: 0.9s;
-webkit-animation-duration: 0.9s;
animation-timing-function: ease;
-moz-animation-timing-function: ease;
-webkit-animation-timing-function: ease;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
@-webkit-keyframes IgFadeOutDown {
0% {opacity: 1; -webkit-transform: translate3d(0, 0%, 0);}
99.5% {opacity: 0; -webkit-transform: translate3d(0, 100%, 0);}
100% {opacity: 1; -webkit-transform: translate3d(0, 100%, 0);}
}
@keyframes IgFadeOutDown {
0% {opacity: 1; -webkit-transform: translate3d(0, 0%, 0); transform: translate3d(0, 0%, 0);}
99.5% {opacity: 0; -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0); }
100% {opacity: 1; -webkit-transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);}
}
/****-Slide Up: End-***/
/****-Slide Down: Start-***/
.ig_anim_slide_in,
.ig_top.ig_anim_slide_in,
.ig_top .ig_anim_slide_in{
animation-name: IgSlideInDown;
-moz-animation-name: IgSlideInDown;
-webkit-animation-name: IgSlideInDown;
animation-duration: 0.5s;
-moz-animation-duration: 0.5s;
-webkit-animation-duration: 0.5s;
animation-timing-function: ease;
-moz-animation-timing-function: ease;
-webkit-animation-timing-function: ease;
}
@-webkit-keyframes IgSlideInDown {
0% {-webkit-transform: translate3d(0, -100%, 0);}
100% {-webkit-transform: none; }
}
@keyframes IgSlideInDown {
0% { -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); }
100% {-webkit-transform: none;transform: none; }
}
.ig_anim_slide_out,
.ig_top.ig_anim_slide_out,
.ig_top .ig_anim_slide_out{
animation-name: IgFadeOutUp;
-moz-animation-name: IgFadeOutUp;
-webkit-animation-name: IgFadeOutUp;
animation-duration: 0.9s;
-moz-animation-duration: 0.9s;
-webkit-animation-duration: 0.9s;
animation-timing-function: ease;
-moz-animation-timing-function: ease;
-webkit-animation-timing-function: ease;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
@-webkit-keyframes IgFadeOutUp {
0% {opacity: 1; -webkit-transform: translate3d(0, 0%, 0);}
99.5% {opacity: 0; -webkit-transform: translate3d(0, -100%, 0);}
100% {opacity: 1; -webkit-transform: translate3d(0, -100%, 0);}
}
@keyframes IgFadeOutUp {
0% {opacity: 1; -webkit-transform: translate3d(0, 0%, 0); transform: translate3d(0, 0%, 0);}
99.5% {opacity: 0; -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); }
100% {opacity: 1; -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0);}
}
/****-Slide Down: End***/
/*** Slide: End***/
/****************Animation: End******************/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -0,0 +1,161 @@
(function ($) {
'use strict';
/**
* All of the code for your public-facing JavaScript source
* should reside in this file.
*
* Note: It has been assumed you will write jQuery code here, so the
* $ function reference has been prepared for usage within the scope
* of this function.
*
* This enables you to define handlers, for when the DOM is ready:
*
* $(function() {
*
* });
*
* When the window is loaded:
*
* $( window ).load(function() {
*
* });
*
* ...and/or other possibilities.
*
* Ideally, it is not considered best practise to attach more than a
* single DOM-ready or window-load handler for a particular page.
* Although scripts in the WordPress core, Plugins and Themes may be
* practising this, we should strive to set a better example in our own work.
*/
$(document).ready(function () {
/**
* Extend jQuery to convert form into JSON object
* @returns {{}}
*/
$.fn.serializeObject = function () {
var output = {};
var formData = this.serializeArray();
$.each(formData, function () {
var fieldName = this.name;
var fieldValue = this.value || '';
var isArrayField = fieldName.slice(-2) === '[]';
if (isArrayField) {
if (output[fieldName]) {
output[fieldName].push(fieldValue);
} else {
output[fieldName] = [fieldValue];
}
} else {
output[fieldName] = fieldValue;
}
});
return output;
};
/**
* Handle subscription form submission
*/
$('.es_ajax_subscription_form').on('submit', function (e) {
var form = $(this);
e.preventDefault();
handleBindFunction(form);
});
});
function handleResponse(response, form) {
var redirection_url = response['redirection_url'];
if ( 'undefined' !== typeof redirection_url ) {
redirection_url = redirection_url.trim();
if (typeof(redirection_url) === 'string' && redirection_url != '') {
if (!/^https?:\/\//i.test(redirection_url) ) {
redirection_url = "http://"+redirection_url;
}
window.location.href = redirection_url;
}
} else {
var status = response.status;
var message_class = 'success';
if (status === 'ERROR') {
message_class = 'error';
}
var responseText = response['message_text'];
var messageContainer = $(form).next('.es_subscription_message');
messageContainer.attr('class', 'es_subscription_message ' + message_class);
messageContainer.html(responseText);
var esSuccessEvent = {
detail: {
es_response: message_class,
msg: responseText
},
bubbles: true,
cancelable: true
};
$(form).trigger('es_response', [esSuccessEvent]);
}
}
function handleBindFunction(form, is_ig = false) {
form = $(form);
var formData = form.serializeObject();
formData['es'] = 'subscribe';
formData['action'] = 'es_add_subscriber';
$.ajax({
type: 'POST',
url: es_data.es_ajax_url,
data: formData,
dataType: 'json',
beforeSend: function () {
form.find('#spinner-image').show();
form.find('.es_submit_button').attr('disabled', true);
},
success: function (response) {
if (!is_ig) {
if (response && typeof response.status !== 'undefined' && response.status === "SUCCESS") {
form.slideUp('slow');
form.hide();
} else {
form.find('#spinner-image').hide();
}
}
form.find('.es_submit_button').attr('disabled', false);
jQuery(window).trigger('es.send_response', [form, response]);
handleResponse(response, form);
},
error: function (err) {
form.find('#spinner-image').hide();
form.find('.es_submit_button').attr('disabled', false);
console.log(err, 'error');
},
});
return false;
}
// Compatibility of ES with IG
jQuery( window ).on( "init.icegram", function(e, ig) {
if(typeof ig !== 'undefined' && typeof ig.messages !== 'undefined' ) {
jQuery('.icegram .es_shortcode_form, .icegram form[data-source="ig-es"]').each(function(i, v){
jQuery(v).bind('submit', function (e) {
e.preventDefault();
e.stopImmediatePropagation();
var form = $(this);
handleBindFunction(form, true);
});
});
}
});
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,31 @@
es_pre_data = {
"messages":[{
"post_title": "Icegram Express Form - Popup",
"type": "popup",
"theme": "inspire",
"headline": "",
"icon": "",
"message": "",
"animation": "attention",
"use_form": "yes",
"form_has_label" : "yes",
"form_style": "style_1",
"form_layout": "bottom",
"es_form_code": "1",
"form_html_original": "",
"label": "",
"text_color": "#000000",
"cta_bg_color": "",
"position": {
"inline": "10"
},
"use_custom_code": "yes",
"custom_css": "#ig_this_message .ig_close {\r\n background-image: url(https://www.icegram.com/gallery/wp-content/uploads/2017/07/sprite_close_02_black_48.png);\r\n background-position: -252px center;\r\n background-color: transparent;\r\n top: 5px;\r\n right: 5px;\r\n}\r\n\r\n@media only screen and (max-width: 319px), (min-width: 320px) and (max-width: 359px),(min-width: 360px) and (max-width: 413px){\r\n#ig_this_message {\r\n width: 90%;\r\n }\r\n}\r\n@media only screen and (min-width: 414px) and (max-width: 643px){\r\n#ig_this_message{\r\n width: 80%;\r\n }\r\n}\r\n@media only screen and (min-width: 644px) and (max-width: 767px),(min-width: 668px) and (max-width: 1992px){\r\n#ig_this_message{\r\n width: 60%;\r\n }\r\n}",
"id": "",
"delay_time": 1,
"retargeting": "",
"campaign_id": "",
"expiry_time": "",
"form_html": "",
"title": "",
}]};

View File

@@ -0,0 +1,615 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* The public-facing functionality of the plugin.
*
* @link http://example.com
* @since 4.0
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/public
*/
/**
* The public-facing functionality of the plugin.
*
* Defines Shortcode
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/public
*/
class ES_Shortcode {
/**
* Unique form identifier based on number of forms rendered on the page
*
* @var string
*
* @since 4.7.5
*/
public static $form_identifier;
/**
* Variable to store form submission response
*
* @var array
*
* @since 4.7.5
*/
public static $response = array();
public function __construct() {
}
public static function render_es_subscription_shortcode( $atts ) {
ob_start();
$atts = shortcode_atts( array(
'namefield' => '',
'desc' => '',
'group' => ''
), $atts, 'email-subscribers' );
$data['name_visible'] = $atts['namefield'];
$data['list_visible'] = 'no';
$data['lists'] = array();
$data['form_id'] = 0;
$data['list'] = $atts['group'];
$data['desc'] = $atts['desc'];
self::render_form( $data );
return ob_get_clean();
}
/**
* Render Subscription form using ES 4.0+ Shortcode
*
* @param $atts
*
* @return false|string
*/
public static function render_es_form( $atts ) {
ob_start();
$atts = shortcode_atts( array(
'id' => '',
'show-in-popup' => ''
), $atts, 'email-subscribers-form' );
$id = $atts['id'];
if ( ! empty( $id ) ) {
$form = ES()->forms_db->get_form_by_id( $id );
if ( $form ) {
$form_data = ES_Forms_Table::get_form_data_from_body( $form );
$form_data['show-in-popup-attr'] = isset( $atts['show-in-popup'] ) ? sanitize_text_field( $atts['show-in-popup'] ) : '';
$form_html = self::render_form( $form_data );
}
}
return ob_get_clean();
}
// Handle Email Subscribers Group Selector Shortcode
// Backward Compatibility
public static function render_es_advanced_form( $atts ) {
ob_start();
$atts = shortcode_atts( array(
'id' => ''
), $atts, 'email-subscribers-advanced-form' );
$af_id = $atts['id'];
if ( ! empty( $af_id ) ) {
$form = ES()->forms_db->get_form_by_af_id( $af_id );
if ( $form ) {
$form_data = ES_Forms_Table::get_form_data_from_body( $form );
self::render_form( $form_data );
}
}
return ob_get_clean();
}
/**
* Get the name field to render inside the form
*
* @param $show_name
* @param $name_label
* @param $name_required
* @param $name_placeholder
* @param $submitted_name
*
* @return string
*/
public static function get_name_field_html( $show_name, $name_label, $name_required, $name_placeholder, $submitted_name = '' ) {
$required = '';
if ( ! empty( $show_name ) && 'no' !== $show_name ) {
if ( 'yes' === $name_required ) {
$required = 'required';
if ( ! empty( $name_label ) ) {
$name_label .= '*';
}
}
$name_html = '<div class="es-field-wrap"><label>' . $name_label . '<br/><input type="text" name="esfpx_name" class="ig_es_form_field_name" placeholder="' . $name_placeholder . '" value="' . $submitted_name . '" ';
/* Adding required="required" as attribute name, value pair because wp_kses will strip off the attribute if only 'required' attribute is provided. */
$name_html .= 'required' === $required ? 'required = "' . $required . '"' : '';
$name_html .= '/></label></div>';
return $name_html;
}
return '';
}
/**
* Get the E-Mail field to render inside the form
*
* @param $email_label
* @param $email_placeholder
* @param $submitted_email
*
* @return string
*/
public static function get_email_field_html( $email_label, $email_placeholder, $submitted_email = '' ) {
$email_html = '<div class="es-field-wrap"><label>';
if ( ! empty( $email_label ) ) {
$email_html .= $email_label . '*<br/>';
}
$email_html .= '<input class="es_required_field es_txt_email ig_es_form_field_email" type="email" name="esfpx_email" value="' . $submitted_email . '" placeholder="' . $email_placeholder . '" required="required"/></label></div>';
return $email_html;
}
/**
*
* Get the List field to render inside the form
*
* @param $show_list
* @param $list_label
* @param $list_ids
* @param $list
* @param array $selected_list_ids
*
* @return string
*/
public static function get_list_field_html( $show_list, $list_label, $list_ids, $list, $selected_list_ids = array() ) {
if ( ! empty( $list_ids ) && $show_list ) {
$lists_id_name_map = ES()->lists_db->get_list_id_name_map();
$lists_id_hash_map = ES()->lists_db->get_list_id_hash_map( $list_ids );
$list_html = self::prepare_lists_checkboxes( $lists_id_name_map, $list_ids, 1, $selected_list_ids, $list_label, 0, 'esfpx_lists[]', $lists_id_hash_map );
} elseif ( ! empty( $list_ids ) && ! $show_list ) {
$list_html = '';
$lists = ES()->lists_db->get_lists_by_id( $list_ids );
if ( ! empty( $lists ) ) {
foreach ( $lists as $list ) {
if ( ! empty( $list ) && ! empty( $list['hash'] ) ) {
$list_html .= '<input type="hidden" name="esfpx_lists[]" value="' . $list['hash'] . '" />';
}
}
}
} elseif ( is_numeric( $list ) ) {
$lists = ES()->lists_db->get_lists_by_id( $list );
$list_html = '';
if ( ! empty( $lists ) ) {
$list_hash = ! empty( $lists[0]['hash'] ) ? $lists[0]['hash'] : '';
if ( ! empty( $list_hash ) ) {
$list_html = '<input type="hidden" name="esfpx_lists[]" value="' . $list_hash . '" />';
}
}
} else {
$list_data = ES()->lists_db->get_list_by_name( $list );
if ( empty( $list_data ) ) {
$list_id = ES()->lists_db->add_list( $list );
} else {
$list_id = $list_data['id'];
}
$lists = ES()->lists_db->get_lists_by_id( $list_id );
$list_html = '';
if ( ! empty( $lists ) ) {
$list_hash = ! empty( $lists[0]['hash'] ) ? $lists[0]['hash'] : '';
if ( ! empty( $list_hash ) ) {
$list_html = '<input type="hidden" name="esfpx_lists[]" value="' . $list_hash . '" />';
}
}
}
return $list_html;
}
public static function render_form( $data ) {
/**
* - Show name? -> Prepare HTML for name
* - Show email? -> Prepare HTML for email // Always true
* - Show lists? -> Preapre HTML for Lists list_ids
* - Hidden Field -> form_id,
* list,
* es_email_page,
* es_email_page_url,
* es-subscribe,
* honeypot field
*/
// Compatibility for GDPR
$active_plugins = get_option( 'active_plugins', array() );
if ( is_multisite() ) {
$active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
}
$editor_type = ! empty( $data['settings']['editor_type'] ) ? $data['settings']['editor_type'] : '';
$is_dnd_editor = IG_ES_DRAG_AND_DROP_EDITOR === $editor_type;
if ( ! $is_dnd_editor ) {
$show_name = ! empty( $data['name_visible'] ) ? strtolower( $data['name_visible'] ) : false;
$required_name = ! empty( $data['name_required'] ) ? $data['name_required'] : false;
$name_label = ! empty( $data['name_label'] ) ? $data['name_label'] : '';
$name_placeholder = ! empty( $data['name_place_holder'] ) ? $data['name_place_holder'] : '';
$email_label = ! empty( $data['email_label'] ) ? $data['email_label'] : '';
$email_placeholder = ! empty( $data['email_place_holder'] ) ? $data['email_place_holder'] : '';
$button_label = ! empty( $data['button_label'] ) ? $data['button_label'] : __( 'Subscribe', 'email-subscribers' );
$list_label = ! empty( $data['list_label'] ) ? $data['list_label'] : __( 'Select list(s)', 'email-subscribers' );
$show_list = ! empty( $data['list_visible'] ) ? $data['list_visible'] : false;
$list_ids = ! empty( $data['lists'] ) ? $data['lists'] : array();
$form_id = ! empty( $data['form_id'] ) ? $data['form_id'] : 0;
$list = ! empty( $data['list'] ) ? $data['list'] : 0;
$desc = ! empty( $data['desc'] ) ? $data['desc'] : '';
$form_version = ! empty( $data['form_version'] ) ? $data['form_version'] : '0.1';
$gdpr_consent = ! empty( $data['gdpr_consent'] ) ? $data['gdpr_consent'] : 'no';
$gdpr_consent_text = ! empty( $data['gdpr_consent_text'] ) ? $data['gdpr_consent_text'] : '';
$es_form_popup = isset( $data['show_in_popup'] ) ? $data['show_in_popup'] : 'no';
$es_popup_headline = isset( $data['popup_headline'] ) ? $data['popup_headline'] : '';
$show_in_popup_attr = isset( $data['show-in-popup-attr'] ) ? $data['show-in-popup-attr'] : '';
} else {
$show_list = ! empty( $data['list_visible'] ) ? $data['list_visible'] : false;
$list_ids = ! empty( $data['settings']['lists'] ) ? $data['settings']['lists'] : array();
$form_id = ! empty( $data['form_id'] ) ? $data['form_id'] : 0;
$list = ! empty( $data['list'] ) ? $data['list'] : 0;
$desc = ! empty( $data['desc'] ) ? $data['desc'] : '';
$form_version = ! empty( $data['form_version'] ) ? $data['form_version'] : '0.1';
$es_form_popup = isset( $data['settings']['show_in_popup'] ) ? $data['settings']['show_in_popup'] : 'no';
$es_popup_headline = isset( $data['settings']['popup_headline'] ) ? $data['settings']['popup_headline'] : '';
$show_in_popup_attr = isset( $data['show-in-popup-attr'] ) ? $data['show-in-popup-attr'] : '';
$button_label = '';
}
$allowedtags = ig_es_allowed_html_tags_in_esc();
/**
* We did not have $email_label, $name_label in
* ES < 4.2.2
*
* Since ES 4.2.2, we are adding form_version in form settings.
*
* If we don't find Form Version in settings, we are setting as 0.1
*
* So, if form_version is 0.1 then set default label
*/
if ( '0.1' == $form_version ) {
$email_label = __( 'Email', 'email-subscribers' );
$name_label = __( 'Name', 'email-subscribers' );
}
self::$form_identifier = self::generate_form_identifier( $form_id );
$submitted_name = '';
$submitted_email = '';
$message_class = '';
$message_text = '';
$selected_list_ids = array();
if ( self::is_posted() ) {
// self::$response is set by ES_Handle_Subscription::handle_subscription() when subscription form is posted
$response = ! empty( self::$response ) ? self::$response: array();
if ( ! empty( $response ) ) {
$message_class = ! empty( $response['status'] ) && 'SUCCESS' === $response['status'] ? 'success' : 'error';
$message_text = ! empty( $response['message_text'] ) ? $response['message_text'] : '';
}
$submitted_name = ig_es_get_post_data( 'esfpx_name' );
$submitted_email = ig_es_get_post_data( 'esfpx_email' );
$selected_list_hashes = ig_es_get_post_data( 'esfpx_lists' );
if ( ! empty( $selected_list_hashes ) ) {
$selected_lists = ES()->lists_db->get_lists_by_hash( $selected_list_hashes );
if ( $selected_lists ) {
$selected_list_ids = array_column( $selected_lists, 'id' );
}
}
} else {
if ( is_user_logged_in() ) {
$prefill_form = apply_filters( 'ig_es_prefill_subscription_form', 'yes' );
if ( 'yes' === $prefill_form ) {
$current_user = wp_get_current_user();
$submitted_email = $current_user->user_email;
if ( ! empty( $current_user->user_firstname ) && ! empty( $current_user->user_lastname ) ) {
$submitted_name = $current_user->user_firstname . ' ' . $current_user->user_lastname;
}
}
}
}
//replace total contact
$total_contacts = ES()->contacts_db->count_active_contacts_by_list_id();
$desc = str_replace( '{{TOTAL-CONTACTS}}', $total_contacts, $desc );
$current_page = get_the_ID();
$current_page_url = get_the_permalink( $current_page );
$unique_id = uniqid();
$hp_style = 'position:absolute;top:-99999px;' . ( is_rtl() ? 'right' : 'left' ) . ':-99999px;z-index:-99;';
$nonce = wp_create_nonce( 'es-subscribe' );
// Form html
$form_html = '<input type="hidden" name="esfpx_form_id" value="' . $form_id . '" />';
$form_header_html = '';
$form_data_html = '';
$form_orig_html = '';
$form_orig_html = $form_header_html;
// Don't show form if submission was successful.
if ( 'success' !== $message_class) {
$form_action_url = ES_Common::get_current_request_url();
$enable_ajax_form_submission = get_option( 'ig_es_enable_ajax_form_submission', 'yes' );
$extra_form_class = ( 'yes' == $enable_ajax_form_submission ) ? ' es_ajax_subscription_form' : '';
$form_header_html .= '<form action="' . $form_action_url . '#es_form_' . self::$form_identifier . '" method="post" class="es_subscription_form es_shortcode_form ' . esc_attr( $extra_form_class ) . '" id="es_subscription_form_' . $unique_id . '" data-source="ig-es" data-form-id="' . $form_id . '">';
if ( '' != $desc ) {
$form_header_html .= '<div class="es_caption">' . $desc . '</div>';
}
$form_data_html = '<input type="hidden" name="es" value="subscribe" />
<input type="hidden" name="esfpx_es_form_identifier" value="' . self::$form_identifier . '" />
<input type="hidden" name="esfpx_es_email_page" value="' . $current_page . '"/>
<input type="hidden" name="esfpx_es_email_page_url" value="' . $current_page_url . '"/>
<input type="hidden" name="esfpx_status" value="Unconfirmed"/>
<input type="hidden" name="esfpx_es-subscribe" id="es-subscribe-' . $unique_id . '" value="' . $nonce . '"/>
<label style="' . $hp_style . '" aria-hidden="true"><span hidden>' . __( 'Please leave this field empty.', 'email-subscribers' ) . '</span><input type="email" name="esfpx_es_hp_email" class="es_required_field" tabindex="-1" autocomplete="-1" value=""/></label>';
$spinner_image_path = ES_PLUGIN_URL . 'lite/public/images/spinner.gif';
$editor_type = ! empty( $data['settings']['editor_type'] ) ? $data['settings']['editor_type'] : '';
$is_dnd_editor = IG_ES_DRAG_AND_DROP_EDITOR === $editor_type;
if ( ! $is_dnd_editor ) {
// Name
$name_html = self::get_name_field_html($show_name, $name_label, $required_name, $name_placeholder, $submitted_name);
// Lists
$list_html = self::get_list_field_html($show_list, $list_label, $list_ids, $list, $selected_list_ids);
$email_html = self::get_email_field_html($email_label, $email_placeholder, $submitted_email);
$form = array( $form_header_html, $name_html, $email_html, $list_html, $form_html, $form_data_html );
$form_orig_html = implode( '', $form );
$form_data_html = apply_filters( 'ig_es_after_form_fields', $form_orig_html, $data );
if ( 'yes' === $gdpr_consent ) {
$form_data_html .= '<label style="display: inline"><input type="checkbox" name="es_gdpr_consent" value="true" required="required"/>&nbsp;' . $gdpr_consent_text . '</label><br/>';
} elseif ( ( in_array( 'gdpr/gdpr.php', $active_plugins ) || array_key_exists( 'gdpr/gdpr.php', $active_plugins ) ) ) {
GDPR::consent_checkboxes();
}
$form_data_html .= '<input type="submit" name="submit" class="es_subscription_form_submit es_submit_button es_textbox_button" id="es_subscription_form_submit_' . $unique_id . '" value="' . $button_label . '"/>';
} else {
if ( ! empty( $list_ids ) ) {
$list_html = self::get_list_field_html(false, '', $list_ids, '', $selected_list_ids);
$form_html .= $list_html;
}
$form_body = '';
if ( ! empty( $data['settings']['dnd_editor_css'] ) ) {
$editor_css = $data['settings']['dnd_editor_css'];
// We are using attribute selector data-form-id to apply Form style and not form unique id since when using it, it overrides GrapeJs custom style changes done through GrapeJS style editor.
$editor_css = str_replace( '.es-form-field-container', 'form[data-form-id="' . $form_id . '"] .es-form-field-container', $editor_css );
$editor_css = str_replace( '* {', 'form.es_subscription_form[data-form-id="' . $form_id . '"] * {', $editor_css );
$form_body = '<style type="text/css">' . $editor_css . '</style>';
}
$form_body .= ! empty( $data['body'] ) ? do_shortcode( $data['body'] ) : '';
$form = array( $form_header_html, $form_html, $form_data_html, $form_body );
$form_orig_html = implode( '', $form );
$form_data_html = $form_orig_html;
}
$form_data_html .= '<span class="es_spinner_image" id="spinner-image"><img src="' . $spinner_image_path . '" alt="Loading"/></span></form>';
}
$form_data_html .= '<span class="es_subscription_message ' . $message_class . '" id="es_subscription_message_' . $unique_id . '">' . $message_text . '</span>';
// Wrap form html inside a container.
$form_data_html = '<div class="emaillist" id="es_form_' . self::$form_identifier . '">' . $form_data_html . '</div>';
$form = $form_data_html;
$show_in_popup = false;
if ( ! empty( $es_form_popup ) && 'yes' === $es_form_popup ) {
if ( empty( $show_in_popup_attr ) || 'yes' === $show_in_popup_attr ) {
$show_in_popup = true;
}
}
if ( $show_in_popup ) {
if ( ! wp_style_is( 'ig-es-popup-frontend' ) ) {
wp_enqueue_style( 'ig-es-popup-frontend' );
}
if ( ! wp_style_is( 'ig-es-popup-css' ) ) {
wp_enqueue_style( 'ig-es-popup-css' );
}
?>
<script type="text/javascript">
if( typeof(window.icegram) === 'undefined'){
<?php
if ( ! wp_script_is( 'ig-es-popup-js' ) ) {
wp_enqueue_script( 'ig-es-popup-js' );
}
?>
}
</script>
<script type="text/javascript">
jQuery( function () {
var form_id = <?php echo esc_js($form_id); ?>;
var es_message_id = "es" + form_id ;
var message = '<h3 style=\"text-align: center;\"><?php echo esc_js( $es_popup_headline ); ?></h3>';
es_pre_data.ajax_url = '<?php echo esc_url(admin_url( 'admin-ajax.php' )); ?>';
es_pre_data.messages[0].form_html = <?php echo json_encode($form); ?>;
es_pre_data.messages[0].id = es_pre_data.messages[0].campaign_id = es_message_id;
es_pre_data.messages[0].label = <?php echo json_encode($button_label); ?>;
es_pre_data.messages[0].message = message;
var es_data = es_pre_data;
if( typeof(window.icegram) === 'undefined'){
window.icegram = new Icegram();
window.icegram.init( es_data );
}
jQuery( window ).on( "preinit.icegram", function( e, data ) {
var icegram_data = es_data['messages'].concat(data['messages']);
data.messages = icegram_data;
});
});
</script>
<?php
return $form;
} else {
add_filter( 'safe_style_css', 'ig_es_allowed_css_style', 999 );
echo wp_kses( $form, $allowedtags );
remove_filter( 'safe_style_css', 'ig_es_allowed_css_style', 999 );
}
}
public static function prepare_lists_checkboxes( $lists, $list_ids = array(), $columns = 3, $selected_lists = array(), $list_label = '', $contact_id = 0, $name = 'lists[]', $lists_id_hash_map = array() ) {
$list_label = ! empty( $list_label ) ? $list_label : __( 'Select list(s)', 'email-subscribers' );
$lists_html = '<div><p><b class="font-medium text-gray-500 pb-2">' . $list_label . '*</b></p><table class="ig-es-form-list-selection"><tr>';
$i = 0;
if ( ! empty( $contact_id ) ) {
$list_contact_status_map = ES()->lists_contacts_db->get_list_contact_status_map( $contact_id );
}
$lists = apply_filters( 'ig_es_lists', $lists );
foreach ( $lists as $list_id => $list_name ) {
if ( 0 != $i && 0 === ( $i % $columns ) ) {
$lists_html .= '</tr><tr>';
}
$status_span = '';
if ( in_array( $list_id, $list_ids ) ) {
// Check if list hash has been passed for given list id, if yes then use list hash, else use list id
if ( ! empty( $lists_id_hash_map[ $list_id ] ) ) {
$list_value = $lists_id_hash_map[ $list_id ];
} else {
$list_value = $list_id;
}
if ( in_array( $list_id, $selected_lists ) ) {
if ( ! empty( $contact_id ) ) {
$status_span = '<span class="es_list_contact_status ' . $list_contact_status_map[ $list_id ] . '" title="' . ucwords( $list_contact_status_map[ $list_id ] ) . '">';
}
$lists_html .= '<td class="pt-4">';
$lists_html .= $status_span . '<label><input type="checkbox" class="pl-6 form-checkbox" name="' . $name . '" checked="checked" value="' . $list_value . '" /><span class="pl-1 pr-6 text-gray-500 text-sm font-normal">' . $list_name . '</span></label></td>';
} else {
$lists_html .= '<td class="pt-4"><label><input type="checkbox" class="pl-6 form-checkbox " name="' . $name . '" value="' . $list_value . '" /><span class="pl-1 pr-6 text-gray-500 text-sm font-normal">' . $list_name . '</span></label></td>';
}
$i ++;
}
}
$lists_html .= '</tr></table></div>';
return $lists_html;
}
/**
* Generate a unique form identifier based on number of forms already rendered on the page.
*
* @return string $form_identifier
*
* @since 4.7.5
*/
public static function generate_form_identifier( $form_id = 0 ) {
static $form_count = 1;
$form_identifier = '';
if ( in_the_loop() ) {
$page_id = get_the_ID();
$form_identifier = sprintf( 'f%1$d-p%2$d-n%3$d',
$form_id,
$page_id,
$form_count
);
} else {
$form_identifier = sprintf( 'f%1$d-n%2$d',
$form_id,
$form_count
);
}
$form_count++;
return $form_identifier;
}
/**
* Get form's identifier
*
* @return string
*
* @since 4.7.5
*/
public static function get_form_identifier() {
return self::$form_identifier;
}
/**
* Return true if this form is the same one as currently posted.
*
* @return boolean
*
* @since 4.7.5
*/
public static function is_posted() {
$form_identifier = ig_es_get_request_data( 'esfpx_es_form_identifier' );
if ( empty( $form_identifier ) ) {
return false;
}
return self::get_form_identifier() === $form_identifier;
}
}

View File

@@ -0,0 +1,58 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$es_page_request = ig_es_get_request_data( 'es' );
$site_title = get_option( 'blogname' );
$noerror = true;
$home_url = home_url( '/' );
?>
<html>
<head>
<title><?php echo esc_html( $site_title ); ?></title>
<?php do_action( 'es_message_head' ); ?>
<style type="text/css">
.es_center_info {
margin: auto;
width: 50%;
padding: 10px;
text-align: center;
}
</style>
</head>
<body>
<div class="es_center_info es_successfully_subscribed">
<p> <?php echo esc_html( $message ); ?> </p>
<table class="table">
<tr>
<td><?php echo esc_html__( 'Total Emails Sent', 'email-subscribers' ); ?></td>
<td><?php echo esc_html( $total_emails_sent ); ?></td>
</tr>
<tr>
<td><?php echo esc_html__( 'Total Emails In Queue', 'email-subscribers' ); ?></td>
<td>
<?php
echo esc_html( $total_emails_to_be_sent );
if ( $total_emails_to_be_sent > 0 ) {
?>
<a href="<?php echo esc_url( $cron_url ); ?>"><?php echo esc_html__( 'Send Now', 'email-subscribers' ); ?></a>
<?php
}
?>
</td>
</tr>
</table>
</div>
</body>
</html>
<?php
die();

View File

@@ -0,0 +1,20 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Provide a public-facing view for the plugin
*
* This file is used to markup the public-facing aspects of the plugin.
*
* @link http://example.com
* @since 4.0
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/public/partials
*/

View File

@@ -0,0 +1,88 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$es_page_request = ig_es_get_request_data('es');
$main_message = '';
if ( 'optin' === $es_page_request ) {
$main_message = __('Subscription confirmed !', 'email-subscribers');
} elseif ( 'unsubscribe' === $es_page_request || 'ig-newsletter-unsubscribe' === $es_page_request ) {
$main_message = __('Unsubscription confirmed !', 'email-subscribers');
}
$site_name = get_option( 'blogname' );
$noerror = true;
$home_url = home_url( '/' );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo esc_html( $site_name ); ?></title>
<meta1 http-equiv="refresh" content="10; url=<?php echo esc_url( $home_url ); ?>" charset="<?php echo esc_attr( get_option( 'blog_charset' ) ); ?>"/>
<?php do_action( 'es_message_head' ); ?>
<?php
wp_register_style( 'tailwind', ES_PLUGIN_URL . 'lite/admin/dist/main.css', array(), ES_PLUGIN_VERSION, 'all' );
$es_wp_styles = wp_styles();
$es_wp_styles->do_item( 'tailwind' );
?>
</head>
<body class="min-h-screen mt-16 px-4 pt-10 pb-12 mx-auto max-w-7xl bg-gray-200 sm:px-6 lg:px-8">
<section class="bg-indigo-600 py-12 px-12 text-white shadow-md sm:rounded-lg mx-auto sm:w-2/3 xl:w-7/12" id="ig-es-unsubscribe-message">
<div class="leading-6 tracking-wide">
<?php
if ( ! empty( $main_message ) ) {
?>
<h3 class="font-medium text-base pb-4">
<?php echo esc_html($main_message); ?>
</h3>
<?php
}
?>
<p class="font-thin text-lg">
<?php echo wp_kses_post( $message ); ?>
</p>
</div>
</section>
<!-- Start-IG-Code -->
<?php
$ig_es_powered_by = ! empty( get_option( 'ig_es_powered_by' ) ) ? get_option( 'ig_es_powered_by' ) : 'no' ;
if ( 'yes' === $ig_es_powered_by ) {
?>
<section class="bg-white mt-8 py-8 shadow-md sm:rounded-lg mx-auto sm:w-2/3 xl:w-7/12">
<div class="flex">
<div class="sm:w-1/3 xl:w-1/4 pl-6 leading-6">
<p class="uppercase text-sm text-gray-600 pl-2 pb-2 tracking-wide">
<?php echo esc_html__('Powered by', 'email-subscribers'); ?>
</p>
<img class="pt-1" src="https://www.icegram.com/wp-content/uploads/2019/10/icegram-logo-300x80-24bit.png"/>
</div>
<div class="pl-8 pr-6 text-gray-700">
<p class="pb-2 text-base font-bold text-gray-700">
<?php echo esc_html__('Want to Engage, Inspire and Convert Your Website Visitors ?', 'email-subscribers'); ?>
</p>
<p class="text-sm text-gray-700">
<?php echo esc_html__('The most loved WordPress plugins for lead capture, call to action and email marketing.', 'email-subscribers'); ?>
<a class="text-sm font-medium text-indigo-600 hover:text-indigo-500" href="https://www.icegram.com/">
<?php echo esc_html__(' Take a look here', 'email-subscribers'); ?>
<svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor" class="w-3 h-3 inline-block align-middle font-medium">
<path d="M9 5l7 7-7 7"></path>
</svg>
</a>
</p>
</div>
</div>
</section>
<?php } ?>
<!-- End-IG-Code -->
</body>
</html>
<?php
die();