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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,911 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'ES_Admin' ) ) {
/**
* The admin-specific functionality of the plugin.
*
* Admin Settings
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/admin
*/
class ES_Admin {
// class instance
public static $instance;
/**
* Campaign ID
*/
private $template_data = array();
// class constructor
public function __construct() {
$this->init();
}
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
public function init() {
$this->register_hooks();
}
public function register_hooks() {
add_action( 'admin_init', array( $this, 'process_submission' ) );
add_action( 'ig_es_before_template_settings', array( $this, 'show_template_setting_fields' ) );
// preview popup
//add_action( 'ig_es_template_preview_options_content', array( $this, 'show_campaign_preview_options_content' ) );
add_action( 'wp_ajax_ig_es_draft_campaign', array( $this, 'draft_campaign' ) );
add_action( 'wp_ajax_ig_es_get_template_preview', array( $this, 'get_template_preview' ) );
//add_action( 'media_buttons', array( $this, 'add_tag_button' ) );
}
public function setup() {
$template_id = $this->get_template_id_from_url();
if ( ! empty( $template_id ) ) {
$template = get_post( $template_id, ARRAY_A );
if ( $template ) {
$template_meta = get_post_custom( $template_id );
if ( ! empty( $template_meta ) ) {
foreach ( $template_meta as $meta_key => $meta_value ) {
$template_meta[ $meta_key ] = $meta_value[0];
}
}
if ( empty( $template_meta['es_editor_type'] ) ) {
$template_meta['es_editor_type'] = IG_ES_CLASSIC_EDITOR;
}
$template['meta'] = $template_meta;
$this->template_data = $template;
}
} else {
$this->template_data['meta']['es_editor_type'] = $this->get_editor_type_from_url();
}
}
public function get_template_id_from_url() {
$template_id = ig_es_get_request_data( 'id' );
return $template_id;
}
public function get_editor_type_from_url() {
$editor_type = ig_es_get_request_data( 'editor-type' );
if ( empty( $editor_type ) ) {
$editor_type = IG_ES_DRAG_AND_DROP_EDITOR;
}
return $editor_type;
}
public static function set_screen( $status, $option, $value ) {
return $value;
}
public function render() {
$data = ig_es_get_request_data( 'data', array(), false );
$message_data = array();
$template_action = ig_es_get_request_data( 'ig_es_template_action' );
if ( ! empty( $template_action ) ) {
if ( empty( $data['subject'] ) ) {
$message = __( 'Please add a subject.', 'email-subscribers' );
$message_data = array(
'message' => $message,
'type' => 'error',
);
}
}
$action = ig_es_get_request_data( 'action' );
if ( 'added' === $action ) {
$message = __( 'Template added successfully.', 'email-subscribers' );
$message_data = array(
'message' => $message,
'type' => 'success',
);
} elseif ( 'updated' === $action ) {
$message = __( 'Template updated successfully.', 'email-subscribers' );
$message_data = array(
'message' => $message,
'type' => 'success',
);
}
$this->show_form( $message_data );
}
/**
* Add an Tag button to WP Editor
*
* @param string $editor_id Editor id
*
* @since 5.4.10
*/
public function add_tag_button( $editor_id ) {
if ( ! ES()->is_es_admin_screen() ) {
return;
}
$template_type = isset( $this->campaign_data['type'] ) ? $this->campaign_data['type'] : '';
?>
<div id="ig-es-add-tags-button" class="merge-tags-wrapper relative bg-white inline-block">
<button type="button" class="button">
<span class="dashicons dashicons-tag"></span>
<?php echo esc_html__( 'Add Tags', 'email-subscribers' ); ?>
</button>
<div x-show="open" id="ig-es-tags-dropdown" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95" class="absolute center-0 z-10 hidden w-56 origin-top-right rounded-md shadow-lg">
<div class="bg-white rounded-md shadow-xs">
<?php $this->show_merge_tags( $template_type ); ?>
</div>
</div>
</div>
<?php
}
public function get_campaign_tags() {
$post_notification_tags = $this->get_post_notification_tags();
$template_tags = array(
'post_notification' => $post_notification_tags,
);
return apply_filters( 'ig_es_campaign_tags', $template_tags );
}
public function get_post_notification_tags() {
$post_notification_tags = array(
'{{post.date}}',
'{{post.title}}',
'{{post.image}}',
'{{post.excerpt}}',
'{{post.description}}',
'{{post.author}}',
'{{post.link}}',
'{{post.link_with_title}}',
'{{post.link_only}}',
'{{post.full}}',
'{{post.cats}}',
'{{post.more_tag}}',
'{{post.image_url}}'
);
return apply_filters( 'ig_es_post_notification_tags', $post_notification_tags );
}
public function get_subscriber_tags() {
$subscriber_tags = array(
'{{subscriber.name}}',
'{{subscriber.first_name}}',
'{{subscriber.last_name}}',
'{{subscriber.email}}',
);
return apply_filters( 'ig_es_subscriber_tags', $subscriber_tags );
}
public function get_site_tags() {
$site_tags = array(
'{{site.total_contacts}}',
'{{site.url}}',
'{{site.name}}',
);
return apply_filters( 'ig_es_site_tags', $site_tags );
}
public function render_merge_tags( $merge_tags = array() ) {
if ( empty( $merge_tags ) ) {
return;
}
foreach ( $merge_tags as $tag_key => $tag ) {
?>
<span data-tag-text="<?php echo is_string( $tag_key ) ? esc_attr( $tag ) : ''; ?>" class="ig-es-merge-tag cursor-pointer block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">
<?php echo is_string( $tag_key ) ? esc_html( $tag_key ) : esc_html( $tag ); ?>
</span>
<?php
}
}
/**
* Method to show send test email and campaign content section.
*
* @param array $template_data Broadcast data
*
* @since 5.4.4.1.
*
*/
public function show_campaign_preview_options_content( $template_data = array() ) {
$type = isset( $template_data['type'] ) ? $template_data['type'] : 'campaign';
$subject = isset( $template_data['subject'] ) ? $template_data['subject'] : '';
$test_email = ES_Common::get_admin_email();
$trim_character_count = 30;
if ( !( strlen($subject) <= $trim_character_count ) ) {
$subject = substr( $subject, 0, $trim_character_count );
$subject = substr( $subject, 0, strrpos( $subject, ' ' ) );
$subject = $subject . '...';
}
?>
<div id="campaign-email-preview-container">
<div class="campaign-email-preview-container-right">
<?php do_action( 'ig_es_template_preview_test_email_content', $template_data ); ?>
</div>
</div>
<?php
}
/**
* Method to display newsletter setting form
*
* @param array $template_data Posted campaign data
*
* @since 4.4.2 Added $template_data param
*/
public function show_form( $message_data = array() ) {
$template_data = $this->template_data;
$template_id = ! empty( $template_data['ID'] ) ? $template_data['ID'] : 0;
$template_subject = ! empty( $template_data['post_title'] ) ? $template_data['post_title'] : '';
$template_status = ! empty( $template_data['post_status'] ) ? $template_data['post_status'] : 'draft';
$template_type = ! empty( $template_data['meta']['es_template_type'] ) ? $template_data['meta']['es_template_type'] : IG_CAMPAIGN_TYPE_NEWSLETTER;
$editor_type = ! empty( $template_data['meta']['es_editor_type'] ) ? $template_data['meta']['es_editor_type'] : '';
?>
<div id="edit-campaign-form-container" data-editor-type="<?php echo esc_attr( $editor_type ); ?>" data-campaign-type="<?php echo esc_attr( $template_type ); ?>" class="<?php echo esc_attr( $editor_type ); ?> font-sans pt-1.5 wrap">
<?php
if ( ! empty( $message_data ) ) {
$message = $message_data['message'];
$type = $message_data['type'];
ES_Common::show_message( $message, $type );
}
?>
<form action="#" method="POST" id="campaign_form">
<input type="hidden" id="template_id" name="data[id]" value="<?php echo esc_attr( $template_id ); ?>"/>
<input type="hidden" id="template_status" name="data[status]" value="<?php echo esc_attr( $template_status ); ?>"/>
<input type="hidden" id="template_type" name="data[meta][es_template_type]" value="<?php echo esc_attr( $template_type ); ?>"/>
<input type="hidden" id="editor_type" name="data[meta][es_editor_type]" value="<?php echo esc_attr( $editor_type ); ?>"/>
<?php wp_nonce_field( 'ig-es-template-nonce', 'ig_es_template_nonce' ); ?>
<fieldset class="block es_fieldset">
<div class="mx-auto wp-heading-inline max-w-7xl">
<header class="mx-auto max-w-7xl">
<div class="md:flex md:items-center md:justify-between">
<div class="flex md:3/5 lg:w-7/12 xl:w-3/5">
<div class=" min-w-0 md:w-3/5 lg:w-1/2">
<nav class="text-gray-400 my-0" aria-label="Breadcrumb">
<ol class="list-none p-0 inline-flex">
<li class="flex items-center text-sm tracking-wide">
<a class="hover:underline" href="admin.php?page=es_gallery&manage-templates=yes"><?php echo esc_html__( 'Template Gallery', 'email-subscribers' ); ?>
</a>
<svg class="fill-current w-2.5 h-2.5 mx-2 mt-mx" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg>
</li>
</ol>
</nav>
</div>
</div>
<div class="flex md:mt-0 xl:ml-4">
<div class="inline-block text-left">
<button id="view_template_preview_button" type="button"
class="ig-es-inline-loader inline-flex justify-center w-full py-1.5 text-sm font-medium leading-5 text-indigo-600 transition duration-150 ease-in-out border border-indigo-500 rounded-md cursor-pointer select-none hover:text-indigo-500 hover:shadow-md focus:outline-none focus:shadow-outline-indigo focus:shadow-lg hover:border-indigo-600 md:px-2 lg:px-3 xl:px-4">
<span>
<?php
echo esc_html__( 'Preview', 'email-subscribers' );
?>
</span>
<svg class="es-btn-loader animate-spin h-4 w-4 text-indigo"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor"
stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
</button>
</div>
<div class="inline-block text-left md:mr-2 md:ml-2">
<button type="submit" id="ig_es_save_campaign_btn" name="ig_es_template_action" class="inline-flex justify-center w-full py-1.5 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-600 border border-indigo-500 rounded-md cursor-pointer select-none focus:outline-none focus:shadow-outline-indigo focus:shadow-lg hover:bg-indigo-500 hover:text-white hover:shadow-md md:px-2 lg:px-3 xl:px-4" value="save">
<span class="ig_es_campaign_send_option_text">
<?php echo esc_html__( 'Save', 'email-subscribers' ); ?>
</span>
</button>
</div>
</div>
</div>
</header>
</div>
<div class="mx-auto max-w-7xl">
<hr class="wp-header-end">
</div>
<div class="mx-auto mt-6 es_campaign_first max-w-7xl">
<div>
<div class="bg-white rounded-lg shadow-md">
<div class="md:flex">
<div class="campaign_main_content py-4 pl-2">
<div class="block px-4 py-2">
<label for="ig_es_campaign_subject" class="text-sm font-medium leading-5 text-gray-700"><?php echo esc_html__( 'Subject', 'email-subscribers' ); ?></label>
<div class="w-full mt-1 relative text-sm leading-5 rounded-md shadow-sm form-input border-gray-400">
<div>
<input id="ig_es_campaign_subject" style="width:95%;" class="outline-none" name="data[subject]" value="<?php echo esc_attr( $template_subject ); ?>"/>
</div>
</div>
</div>
<div class="w-full px-4 pt-1 pb-2 mt-1 message-label-wrapper">
<label for="message" class="text-sm font-medium leading-5 text-gray-700"><?php echo esc_html__( 'Message', 'email-subscribers' ); ?></label>
<?php
if ( IG_ES_CLASSIC_EDITOR === $editor_type ) {
$editor_id = 'edit-es-campaign-body';
$editor_content = ! empty( $template_data['post_content'] ) ? $template_data['post_content'] : '';
$editor_settings = array(
'textarea_name' => 'data[body]',
'textarea_rows' => 40,
'media_buttons' => true,
'tinymce' => true,
'quicktags' => true,
'editor_class' => 'wp-campaign-body-editor',
);
add_filter( 'tiny_mce_before_init', array( 'ES_Common', 'override_tinymce_formatting_options' ), 10, 2 );
add_filter( 'mce_external_plugins', array( 'ES_Common', 'add_mce_external_plugins' ) );
wp_editor( $editor_content, $editor_id, $editor_settings );
$this->show_avaialable_keywords();
} else {
?>
<div id="ig-es-dnd-merge-tags" class="hidden">
<div x-show="open" id="ig-es-dnd-tags-dropdown" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95" class="absolute center-0 z-10 hidden w-56 origin-top-right rounded-md shadow-lg">
<div class="bg-white rounded-md shadow-xs">
<?php $this->show_merge_tags( $template_type ); ?>
</div>
</div>
</div>
<style type="text/css">
.admin_page_es_template #ig-es-dnd-merge-tags-wrapper {
display: none;
}
</style>
<textarea id="campaign-dnd-editor-data" name="data[meta][es_dnd_editor_data]" style="display:none;">
<?php
$dnd_editor_data = ! empty( $template_data['meta']['es_dnd_editor_data'] ) ? wp_json_encode(maybe_unserialize( $template_data['meta']['es_dnd_editor_data'] )) : '';
echo esc_html( $dnd_editor_data );
?>
</textarea>
<script>
jQuery(document).ready(function($){
let editor_data = jQuery('#campaign-dnd-editor-data').val().trim();
if ( '' !== editor_data ) {
let is_valid_json = ig_es_is_valid_json( editor_data );
if ( is_valid_json ) {
editor_data = JSON.parse( `${editor_data}` );
}
jQuery(document).on("es_drag_and_drop_editor_loaded",function (event) {
window.esVisualEditor.importMjml(editor_data);
});
}
jQuery(document).on('es_drag_and_drop_editor_loaded',()=>{
window.esVisualEditor.on('change:changesCount', (editorModel, changesCount) => {
if (changesCount > 0) {
ig_es_sync_dnd_editor_content('#campaign-dnd-editor-data');
}
});
});
});
</script>
<?php
}
?>
</div>
<?php do_action( 'ig_es_after_template_left_pan_settings', $template_data ); ?>
</div>
<div class="campaign_side_content ml-2 bg-gray-100 rounded-r-lg">
<?php
do_action( 'ig_es_before_template_settings', $template_data );
?>
<div class="block pt-1 mx-4">
<div class="hidden" id="campaign-preview-popup">
<div class="fixed top-0 left-0 z-50 flex items-center justify-center w-full h-full" style="background-color: rgba(0,0,0,.5);">
<div id="campaign-preview-main-container" class="absolute h-auto pt-2 ml-16 mr-4 text-left bg-white rounded shadow-xl z-80 w-1/2 md:max-w-5xl lg:max-w-7xl md:pt-3 lg:pt-2">
<div class="py-2 px-4">
<div class="flex">
<button id="close-campaign-preview-popup" class="text-sm font-medium tracking-wide text-gray-700 select-none no-outline focus:outline-none focus:shadow-outline-red hover:border-red-400 active:shadow-lg">
<svg class="h-5 w-5 inline" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
<div id="campaign-browser-preview-container">
<?php do_action( 'ig_es_template_preview_options_content', $template_data ); ?>
<div id="campaign-preview-iframe-container" class="pt-4 list-decimal popup-preview">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
if ( IG_ES_DRAG_AND_DROP_EDITOR === $editor_type ) {
?>
<div class="campaign-drag-and-drop-editor-container">
<?php
$editor_settings = array(
'attributes' => array(
'data-html-textarea-name' => 'data[body]',
),
);
( new ES_Drag_And_Drop_Editor() )->show_editor( $editor_settings );
?>
</div>
<?php
$this->show_avaialable_keywords();
}
?>
</div>
</div>
</fieldset>
</form>
</div>
<?php
}
/**
* Show option to save campaign as template
*
* @return void
*
* @since 5.3.3
*/
public function show_template_setting_fields( $data ) {
$template_id = ! empty( $data['ID'] ) ? $data['ID'] : 0;
$values = get_post_custom( $template_id );
$selected = isset( $values['es_template_type'] ) ? esc_attr( $values['es_template_type'][0] ) : '';
$template_type = ES_Common::get_campaign_types( array( 'sequence' ) );
?>
<div class="pt-4 pb-4 mx-4">
<div class="flex w-full border-b border-gray-200 pb-2">
<div class="w-11/12 text-sm font-normal text-gray-600 leading-9"><?php esc_html_e( 'Template type', 'email-subscribers' ); ?> </div>
<div>
<label for="es_template_type" class="inline-flex items-center cursor-pointer ">
<span class="relative">
<select style="margin: 0.20rem 0;" name="data[es_template_type]" id="es_template_type">
<?php
if ( ! empty( $template_type ) ) {
foreach ( $template_type as $key => $value ) {
echo '<option value=' . esc_attr( $key ) . ' ' . selected( $selected, $key, false ) . '>' . esc_html( $value ) . '</option>';
}
}
?>
</select>
</span>
</label>
</div>
</div>
<?php
$thumbnail_url = get_the_post_thumbnail_url( $template_id );
?>
<div class="flex w-full pt-3">
<div class="w-11/12 text-sm font-normal text-gray-600 leading-8">
<?php esc_html_e( 'Preview image', 'email-subscribers' ); ?> </div>
<div>
<label for="es_template_image" class="inline-flex items-center cursor-pointer ">
<span class="relative">
<button type="button" id="ig-es-add-template-image" class="button <?php echo $thumbnail_url ? 'hidden' : ''; ?>">
<?php echo esc_html__( 'Add image', 'email-subscribers' ); ?>
</button>
<input type="hidden" id="ig_es_template_attachment_id" name="data[template_attachment_id]" value=""/>
<div id="ig-es-template-image-attachment-container" class="my-1 text-sm relative <?php echo $thumbnail_url ? '' : 'hidden'; ?>">
<span class="flex-1 flex items-center">
<img src="<?php echo $thumbnail_url ? esc_url( $thumbnail_url ) : ''; ?>" id="ig_es_template_attachment_image" style="width: 50px; height: 50px; max-width: none;">
<a id="ig-es-delete-template-image" href="#"
class="font-medium text-red-300 hover:text-red-500 absolute" style="top: -15%;right: -15%;">
<svg class="w-6 h-6 text-red-400 hover:text-red-500 " fill="none"
stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path
stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
</a>
</span>
</div>
</span>
</label>
</div>
</div>
</div>
<?php
}
public function add_campaign_body_data( $template_data ) {
$template_id = ! empty( $template_data['id'] ) ? $template_data['id'] : 0;
if ( ! empty( $template_data['body'] ) ) {
$current_user = wp_get_current_user();
$username = $current_user->user_login;
$useremail = $current_user->user_email;
$display_name = $current_user->display_name;
$contact_id = ES()->contacts_db->get_contact_id_by_email( $useremail );
$first_name = '';
$last_name = '';
// Use details from contacts data if present else fetch it from wp profile.
if ( ! empty( $contact_id ) ) {
$contact_data = ES()->contacts_db->get_by_id( $contact_id );
$first_name = $contact_data['first_name'];
$last_name = $contact_data['last_name'];
} elseif ( ! empty( $display_name ) ) {
$contact_details = explode( ' ', $display_name );
$first_name = $contact_details[0];
// Check if last name is set.
if ( ! empty( $contact_details[1] ) ) {
$last_name = $contact_details[1];
}
}
$template_body = $template_data['body'];
$template_body = ES_Common::es_process_template_body( $template_body, $template_id );
$template_body = ES_Common::replace_keywords_with_fallback( $template_body, array(
'FIRSTNAME' => $first_name,
'NAME' => $username,
'LASTNAME' => $last_name,
'EMAIL' => $useremail
) );
$template_body = ES_Common::replace_keywords_with_fallback( $template_body, array(
'subscriber.first_name' => $first_name,
'subscriber.name' => $username,
'subscriber.last_name' => $last_name,
'subscriber.email' => $useremail
) );
$template_type = $template_data['meta']['es_template_type'];
$template_data['body'] = $template_body;
if ( IG_CAMPAIGN_TYPE_POST_NOTIFICATION === $template_type ) {
$template_data = self::replace_post_notification_merge_tags_with_sample_post( $template_data );
} elseif ( IG_CAMPAIGN_TYPE_POST_DIGEST === $template_type ) {
$template_data = self::replace_post_digest_merge_tags_with_sample_posts( $template_data );
}
$template_body = ! empty( $template_data['body'] ) ? $template_data['body'] : '';
// If there are blocks in this content, we shouldn't run wpautop() on it.
$priority = has_filter( 'the_content', 'wpautop' );
if ( false !== $priority ) {
// Remove wpautop to avoid p tags.
remove_filter( 'the_content', 'wpautop', $priority );
}
$template_body = apply_filters( 'the_content', $template_body );
$template_data['body'] = $template_body;
return $template_data;
}
}
/**
* Method to get preview HTML for campaign
*
* @return $response
*
* @since 4.4.7
*/
public function get_template_preview() {
check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
$response = array();
$data = ig_es_get_request_data( 'data', array(), false );
$template_data = $this->add_campaign_body_data( $data );
$response['preview_html'] = $template_data['body'];
if ( ! empty( $response ) ) {
wp_send_json_success( $response );
} else {
wp_send_json_error();
}
}
/**
* Method to get campaign inline preview data.
*
* @param array $template_data Broadcast data.
*
* @return array $preview_data
*
* @since 4.4.7
*/
public function get_campaign_inline_preview_data( $template_data = array() ) {
$list_id = ! empty( $template_data['list_ids'] ) ? $template_data['list_ids'] : 0;
$preview_data = array();
$first_name = '';
$last_name = '';
$email = '';
if ( ! empty( $list_id ) ) {
// Check if multiple lists selection is enabled.
if ( is_array( $list_id ) && ! empty( $list_id ) ) {
// Since we need to get only one sample email for showing the preview, we can get it from the first list itself.
$list_id = $list_id[0];
}
$subscribed_contacts = ES()->lists_contacts_db->get_subscribed_contacts_from_list( $list_id );
if ( ! empty( $subscribed_contacts ) ) {
$subscribed_contact = array_shift( $subscribed_contacts );
$contact_id = ! empty( $subscribed_contact['contact_id'] ) ? $subscribed_contact['contact_id'] : 0;
if ( ! empty( $contact_id ) ) {
$subscriber_data = ES()->contacts_db->get_by_id( $contact_id );
if ( ! empty( $subscriber_data ) ) {
$first_name = ! empty( $subscriber_data['first_name'] ) ? $subscriber_data['first_name'] : '';
$last_name = ! empty( $subscriber_data['last_name'] ) ? $subscriber_data['first_name'] : '';
$email = ! empty( $subscriber_data['email'] ) ? $subscriber_data['email'] : '';
}
}
}
}
$preview_data['campaign_subject'] = ! empty( $template_data['subject'] ) ? esc_html( $template_data['subject'] ) : '';
$preview_data['contact_name'] = esc_html( $first_name . ' ' . $last_name );
$preview_data['contact_email'] = esc_html( $email );
return $preview_data;
}
public function add_post_notification_data( $template_data ) {
$categories = ! empty( $template_data['es_note_cat'] ) ? $template_data['es_note_cat'] : array();
$es_note_cat_parent = $template_data['es_note_cat_parent'];
$categories = ( ! empty( $es_note_cat_parent ) && in_array( $es_note_cat_parent, array( '{a}All{a}', '{a}None{a}' ), true ) ) ? array( $es_note_cat_parent ) : $categories;
// Check if custom post types are selected.
if ( ! empty( $template_data['es_note_cpt'] ) ) {
// Merge categories and selected custom post types.
$categories = array_merge( $categories, $template_data['es_note_cpt'] );
}
$template_data['categories'] = ES_Common::convert_categories_array_to_string( $categories );
return $template_data;
}
public static function replace_post_notification_merge_tags_with_sample_post( $template_data ) {
if ( ! empty( $template_data['id'] ) ) {
$args = array(
'numberposts' => '1',
'order' => 'DESC',
'post_status' => 'publish',
);
$recent_posts = wp_get_recent_posts( $args, OBJECT );
if ( count( $recent_posts ) > 0 ) {
$post = array_shift( $recent_posts );
$post_id = $post->ID;
$template_id = $template_data['id'];
$template_body = ! empty( $template_data['body'] ) ? $template_data['body'] : '';
$template_subject = ! empty( $template_data['subject'] ) ? $template_data['subject'] : '';
$template_subject = ES_Handle_Post_Notification::prepare_subject( $template_subject, $post );
$template_body = ES_Handle_Post_Notification::prepare_body( $template_body, $post_id, $template_id );
$template_data['subject'] = $template_subject;
$template_data['body'] = $template_body;
}
}
return $template_data;
}
public static function replace_post_digest_merge_tags_with_sample_posts( $template_data ) {
if ( ! empty( $template_data['id'] ) && class_exists( 'ES_Post_Digest' ) ) {
$ignore_stored_post_ids = true;
$ignore_last_run = true;
$template_id = $template_data['id'];
$template_body = $template_data['body'];
$post_ids = ES_Post_Digest::get_matching_post_ids( $template_id, $ignore_stored_post_ids, $ignore_last_run );
$template_body = ES_Post_Digest::process_post_digest_template( $template_body, $post_ids );
$template_data['body'] = $template_body;
}
return $template_data;
}
public function show_avaialable_keywords() {
?>
<div class="campaign-keyword-wrapper mt-1 p-4 w-full border border-gray-300">
<!-- Start-IG-Code -->
<p id="post_notification" class="pb-2 border-b border-gray-300">
<a href="https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Notification: ', 'email-subsribers' ); ?>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.first_name | fallback:'there'}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.last_name}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.name | fallback:'there'}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.email}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{DATE}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.title}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.image}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.excerpt}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.description}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.author}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.author_avatar}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.author_avatar_link}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.link}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.link_with_title}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.link_only}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.full}}</span>
</p>
<!-- End-IG-Code -->
<p id="newsletter" class="py-2 border-b border-gray-300">
<a href="https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Broadcast:', 'email-subscribers' ); ?>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.first_name | fallback:'there'}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.last_name}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.name | fallback:'there'}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.email}}</span>
</p>
<!-- Start-IG-Code -->
<div id="post_digest" class="pt-2 pb-0">
<span style="font-size: 0.8em; margin-left: 0.3em; padding: 2px; background: #e66060; color: #fff; border-radius: 2px; ">Pro</span>&nbsp;
<a href="https://www.icegram.com/send-post-digest-using-email-subscribers-plugin/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_post_digest_post" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Digest:', 'email-subscribers' ); ?>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.first_name | fallback:'there'}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.last_name}}</span>
<span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.name | fallback:'there'}}</span>
<div class="post_digest_block"> {{post.digest}} <br/><?php esc_html_e( 'Any keywords related Post Notification', 'email-subscribers' ); ?> <br/>{{/post.digest}} </div>
</div>
</div>
<!-- End-IG-Code -->
<?php
}
/**
* Save campaign as a template
*/
public function process_submission() {
$template_action = ig_es_get_request_data( 'ig_es_template_action' );
if ( ! empty( $template_action ) ) {
$template_nonce = ig_es_get_request_data( 'ig_es_template_nonce' );
// Verify nonce.
if ( wp_verify_nonce( $template_nonce, 'ig-es-template-nonce' ) ) {
$template_data = ig_es_get_request_data( 'data', array(), false );
$template_id = ! empty( $template_data['id'] ) ? $template_data['id'] : 0;
$template_type = ! empty( $template_data['es_template_type'] ) ? $template_data['es_template_type'] : IG_CAMPAIGN_TYPE_NEWSLETTER;
$template_body = ! empty( $template_data['body'] ) ? $template_data['body'] : '';
$template_subject = ! empty( $template_data['subject'] ) ? $template_data['subject'] : '';
$template_attachment_id = ! empty( $template_data['template_attachment_id'] ) ? $template_data['template_attachment_id'] : '';
$template_status = 'save' === $template_action ? 'publish' : 'draft';
$data = array(
'post_title' => $template_subject,
'post_content' => $template_body,
'post_type' => 'es_template',
'post_status' => $template_status,
);
$action = '';
if ( empty( $template_id ) ) {
$template_id = wp_insert_post( $data );
$action = 'added';
} else {
$data['ID'] = $template_id;
$template_id = wp_update_post( $data );
$action = 'updated';
}
$is_template_added = ! ( $template_id instanceof WP_Error );
if ( $is_template_added ) {
if ( ! empty( $template_attachment_id ) ) {
set_post_thumbnail( $template_id, $template_attachment_id );
}
$editor_type = ! empty( $template_data['meta']['es_editor_type'] ) ? $template_data['meta']['es_editor_type'] : '';
$is_dnd_editor = IG_ES_DRAG_AND_DROP_EDITOR === $editor_type;
if ( $is_dnd_editor ) {
$dnd_editor_data = array();
if ( ! empty( $template_data['meta']['es_dnd_editor_data'] ) ) {
$dnd_editor_data = $template_data['meta']['es_dnd_editor_data'];
$dnd_editor_data = json_decode( $dnd_editor_data );
update_post_meta( $template_id, 'es_dnd_editor_data', $dnd_editor_data );
}
} else {
$custom_css = ! empty( $template_data['meta']['es_custom_css'] ) ? $template_data['meta']['es_custom_css'] : '';
update_post_meta( $template_id, 'es_custom_css', $custom_css );
}
update_post_meta( $template_id, 'es_editor_type', $editor_type );
update_post_meta( $template_id, 'es_template_type', $template_type );
}
if ( ! empty( $template_id ) ) {
$template_url = admin_url( 'admin.php?page=es_template&id=' . $template_id . '&action=' . $action );
wp_safe_redirect( $template_url );
exit();
} else {
$message = __( 'An error has occured. Please try again later', 'email-subscribers' );
ES_Common::show_message( $message, 'error' );
}
}
}
}
/**
* Method to load admin views
*
* @since 5.5.4
*
* @param string $view View name.
* @param array $imported_variables Passed variables.
* @param mixed $path Path to view file.
*/
public static function get_view( $view, $imported_variables = array(), $path = false ) {
if ( $imported_variables && is_array( $imported_variables ) ) {
extract( $imported_variables ); // phpcs:ignore
}
if ( ! $path ) {
$path = ES_PLUGIN_DIR . 'lite/admin/views/';
}
include $path . $view . '.php';
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,72 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'ES_Dashboard' ) ) {
/**
* Get dashboard statistics
*
* @since 5.5.5
*/
class ES_Dashboard {
public function show() {
$source = 'es_dashboard';
$override_cache = true;
$days = 60;
$args = array(
'days' => $days,
);
$reports_data = ES_Reports_Data::get_dashboard_reports_data( $source, $override_cache, $args );
$can_show_ess_optin = ES_Service_Email_Sending::can_show_ess_optin();
if ( $can_show_ess_optin ) {
ES_Admin::get_view(
'dashboard/dashboard-ess',
array(
'reports_data' => $reports_data,
'days' => $days,
)
);
ES_Service_Email_Sending::set_ess_optin_shown_flag();
} else {
ES_Admin::get_view(
'dashboard/dashboard',
array(
'reports_data' => $reports_data,
'days' => $days,
)
);
}
}
public static function get_subscribers_stats() {
check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
$page = 'es_dashboard';
$days = ig_es_get_request_data( 'days' );
$list_id = ig_es_get_request_data( 'list_id' );
$args = array(
'list_id' => $list_id,
'days' => $days,
);
$override_cache = true;
$reports_data = ES_Reports_Data::get_dashboard_reports_data( $page, $override_cache, $args );
ob_start();
ES_Admin::get_view(
'dashboard/subscribers-stats',
array(
'reports_data' => $reports_data,
'days' => $days
)
);
$html = ob_get_clean();
$response['html'] = $html;
wp_send_json_success( $response );
}
}
}

View File

@@ -0,0 +1,759 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'ES_Form_Admin' ) ) {
/**
* The admin-specific functionality of the plugin.
*
* Admin Settings
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/admin
*/
class ES_Form_Admin {
// class instance
public static $instance;
// class constructor
public function __construct() {
$this->init();
}
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
public function init() {
$this->register_hooks();
}
public function register_hooks() {
add_action( 'wp_ajax_ig_es_get_form_preview', array( $this, 'get_form_preview' ) );
add_action( 'ig_es_render_dnd_form', array( $this, 'render_dnd_form' ), 10, 2 );
add_action( 'ig_es_render_classic_form', array( $this, 'render_classic_form' ), 10, 2 );
}
public function render_classic_form( $id, $data ) {
$is_new = empty( $id ) ? 1 : 0;
$action = 'new';
if ( ! $is_new ) {
$action = 'edit';
}
$form_data['name'] = ! empty( $data['name'] ) ? sanitize_text_field( $data['name'] ) : '';
$form_data['name_visible'] = ! empty( $data['name_visible'] ) ? sanitize_text_field( $data['name_visible'] ) : 'no';
$form_data['name_required'] = ! empty( $data['name_required'] ) ? sanitize_text_field( $data['name_required'] ) : 'no';
$form_data['name_label'] = ! empty( $data['name_label'] ) ? sanitize_text_field( $data['name_label'] ) : '';
$form_data['name_place_holder'] = ! empty( $data['name_place_holder'] ) ? sanitize_text_field( $data['name_place_holder'] ) : '';
$form_data['email_label'] = ! empty( $data['email_label'] ) ? sanitize_text_field( $data['email_label'] ) : '';
$form_data['email_place_holder'] = ! empty( $data['email_place_holder'] ) ? sanitize_text_field( $data['email_place_holder'] ) : '';
$form_data['button_label'] = ! empty( $data['button_label'] ) ? sanitize_text_field( $data['button_label'] ) : __( 'Subscribe', 'email-subscribers' );
$form_data['list_visible'] = ! empty( $data['list_visible'] ) ? $data['list_visible'] : 'no';
$form_data['gdpr_consent'] = ! empty( $data['gdpr_consent'] ) ? $data['gdpr_consent'] : 'no';
$form_data['gdpr_consent_text'] = ! empty( $data['gdpr_consent_text'] ) ? $data['gdpr_consent_text'] : __( 'Please read our <a href="https://www.example.com">terms and conditions</a>', 'email-subscribers' );
$form_data['list_label'] = ! empty( $data['list_label'] ) ? $data['list_label'] : '';
$form_data['lists'] = ! empty( $data['lists'] ) ? $data['lists'] : array();
$form_data['af_id'] = ! empty( $data['af_id'] ) ? $data['af_id'] : 0;
$form_data['desc'] = ! empty( $data['desc'] ) ? wp_kses_post( trim( wp_unslash( $data['desc'] ) ) ) : '';
$form_data['captcha'] = ES_Common::get_captcha_setting( 0, $data );
$form_data['show_in_popup'] = ! empty( $data['show_in_popup'] ) ? $data['show_in_popup'] : 'no';
$form_data['popup_headline'] = ! empty( $data['popup_headline'] ) ? $data['popup_headline'] : '';
$lists = ES()->lists_db->get_list_id_name_map();
$nonce = wp_create_nonce( 'es_form' );
?>
<div class="max-w-full -mt-3 font-sans">
<header class="wp-heading-inline">
<nav class="text-gray-400 my-0" aria-label="Breadcrumb">
<div class="flex">
<div class="w-1/2">
<ol class="list-none p-0 inline-flex">
<li class="flex items-center text-sm tracking-wide">
<a class="hover:underline" href="admin.php?page=es_forms"><?php esc_html_e( 'Forms ', 'email-subscribers' ); ?></a>
<svg class="fill-current w-2.5 h-2.5 mx-2 mt-mx" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg>
</li>
</ol>
</div>
</div>
</nav>
<div class="flex">
<div class="w-1/2">
<h2 class="-mt-1 text-2xl font-medium text-gray-700 sm:leading-7 sm:truncate">
<?php
if ( $is_new ) {
esc_html_e( ' New Form', 'email-subscribers' );
} else {
esc_html_e( ' Edit Form', 'email-subscribers' );
}
?>
</h2>
</div>
<div class="w-1/2 -mt-2.5 inline text-right">
<a class="px-1.5 py-2 mt-2 es-documentation" href="https://www.icegram.com/documentation/how-to-create-a-form-in-email-subscribers/?utm_source=in_app&utm_medium=es_forms&utm_campaign=es_doc" target="_blank">
<svg class="w-6 h-6 -mt-1 inline text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title><?php esc_html_e( 'Documentation ', 'email-subscribers' ); ?></title>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path>
</svg>
</a>
</div>
</header>
<div class=""><hr class="wp-header-end"></div>
<div id="poststuff">
<div id="post-body" class="metabox-holder column-1">
<div id="post-body-content" class="pt-0.5">
<div class="bg-white shadow-md rounded-lg mt-5 pt-1">
<form class="pt-8 ml-5 mr-4 text-left mt-2 item-center " method="post" action="admin.php?page=es_forms&action=<?php echo esc_attr( $action ); ?>&form=<?php echo esc_attr( $id ); ?>&_wpnonce=<?php echo esc_attr( $nonce ); ?>">
<div class="flex flex-row border-b border-gray-100">
<div class="flex w-1/5">
<div class="ml-4 pt-6">
<label for="tag-link"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Form name', 'email-subscribers' ); ?></span></label>
</div>
</div>
<div class="flex">
<div class="ml-16 mb-4 h-10 mr-4 mt-4">
<div class="h-10 relative">
<input id="ig_es_title" class="form-input block border-gray-400 w-full pl-3 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php echo esc_html__( 'Enter form name', 'email-subscribers' ); ?>" name="form_data[name]" value="<?php echo esc_html( stripslashes( $form_data['name'] ) ); ?>" size="30" maxlength="100"/>
</div>
</div>
</div>
</div>
<div class="flex flex-row border-b border-gray-100">
<div class="flex w-1/5">
<div class="ml-4 pt-6">
<label for="tag-link"><span class="block pt-1 ml-4 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Description', 'email-subscribers' ); ?></span></label>
</div>
</div>
<div class="flex ">
<div class="ml-16 mb-4 h-10 mr-4 mt-4">
<div class="h-10 relative ">
<input id="ig_es_title" class="form-input block border-gray-400 w-full pl-3 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php echo esc_html__( 'Enter description', 'email-subscribers' ); ?>" name="form_data[desc]" id="ig_es_title" value="<?php echo esc_html( stripslashes( $form_data['desc'] ) ); ?>" size="30" />
</div>
</div>
</div>
</div>
<div class="flex flex-row border-b border-gray-100">
<div class="flex w-1/5">
<div class="ml-4 pt-4 mb-2">
<label for="tag-link"><span class="block ml-4 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Form fields', 'email-subscribers' ); ?></span></label>
</div>
</div>
<div class="flex ">
<div class="ml-16 mr-4 mt-4">
<table class="ig-es-form-table">
<tr class="form-field">
<td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Field', 'email-subscribers' ); ?></b></td>
<td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Show?', 'email-subscribers' ); ?></b></td>
<td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Required?', 'email-subscribers' ); ?></b></td>
<td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Label', 'email-subscribers' ); ?></b></td>
<td class="pr-6 pb-8"><b class="font-medium text-gray-500 pb-2"><?php esc_html_e( 'Placeholder', 'email-subscribers' ); ?></b></td>
</tr>
<tr class="form-field ">
<td class="pr-6 pb-8"><b class="text-gray-500 text-sm font-normal pb-2"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></b></td>
<td class="pr-6 pb-8">
<input type="checkbox" class="form-checkbox opacity-0" name="form_data[email_visible]" value="yes" disabled="disabled" checked="checked" />
</td>
<td class="pr-6 pb-8">
<input type="checkbox" class="form-checkbox opacity-0" name="form_data[email_required]" value="yes" disabled="disabled" checked="checked"></td>
<td class="pr-6 pb-8">
<input class="form-input block border-gray-400 w-5/6 pr-12 h-8 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" name="form_data[email_label]" value="<?php echo esc_attr( $form_data['email_label'] ); ?>">
</td>
<td class="pr-6 pb-8">
<input class="form-input block border-gray-400 w-5/6 pr-12 h-8 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" name="form_data[email_place_holder]" value="<?php echo esc_attr( $form_data['email_place_holder'] ); ?>">
</td>
</tr>
<tr class="form-field">
<td class="pr-6 pb-8"><b class="text-gray-500 text-sm font-normal pb-2"><?php esc_html_e( 'Name', 'email-subscribers' ); ?></b></td>
<td class="pr-6 pb-8">
<input type="checkbox" class="form-checkbox es_visible" name="form_data[name_visible]" value="yes"
<?php
if ( 'yes' === $form_data['name_visible'] ) {
echo 'checked="checked"';
}
?>
/>
</td>
<td class="pr-6 pb-8">
<input type="checkbox" class="form-checkbox es_required" name="form_data[name_required]" value="yes"
<?php
if ( 'yes' === $form_data['name_required'] ) {
echo 'checked="checked"';
}
?>
/>
</td>
<td class="pr-6 pb-8"><input class="es_name_label form-input block border-gray-400 w-5/6 pr-12 h-8 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" name="form_data[name_label]" value="<?php echo esc_attr( $form_data['name_label'] ); ?>"
<?php
if ( 'yes' === $form_data['name_required'] ) {
echo 'disabled=disabled';
}
?>
></td>
<td class="pr-6 pb-8"><input class="es_name_label form-input block border-gray-400 w-5/6 pr-12 h-8 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" name="form_data[name_place_holder]" value="<?php echo esc_attr( $form_data['name_place_holder'] ); ?>"
<?php
if ( 'yes' === $form_data['name_required'] ) {
echo 'disabled=disabled';
}
?>
></td>
</tr>
<?php do_action('ig_es_additional_form_fields', $form_data, $data ); ?>
<tr class="form-field">
<td class="pr-6 pb-6"><b class="text-gray-500 text-sm font-normal pb-2"><?php esc_html_e( 'Button', 'email-subscribers' ); ?></b></td>
<td class="pr-6 pb-6"><input type="checkbox" class="form-checkbox" name="form_data[button_visible]" value="yes" disabled="disabled" checked="checked"></td>
<td class="pr-6 pb-6"><input type="checkbox" class="form-checkbox" name="form_data[button_required]" value="yes" disabled="disabled" checked="checked"></td>
<td class="pr-6 pb-6"><input class="form-input block border-gray-400 w-5/6 pr-12 h-8 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" name="form_data[button_label]" value="<?php echo esc_attr( $form_data['button_label'] ); ?>"></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flex flex-row border-b border-gray-100">
<div class="flex w-1/5">
<div class="ml-4 pt-4 mb-2">
<label for="tag-link"><span class="block ml-4 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Lists', 'email-subscribers' ); ?></span></label>
<p class="italic text-xs text-gray-400 mt-2 ml-4 leading-snug pb-8"><?php esc_html_e( 'Contacts will be added into selected list(s)', 'email-subscribers' ); ?></p>
</div>
</div>
<div class="flex">
<div class="ml-16 mb-6 mr-4 mt-4">
<?php
$allowedtags = ig_es_allowed_html_tags_in_esc();
if ( count( $lists ) > 0 ) {
$lists_checkboxes = ES_Shortcode::prepare_lists_checkboxes( $lists, array_keys( $lists ), 3, (array) $form_data['lists'] );
echo wp_kses( $lists_checkboxes, $allowedtags );
} else {
$create_list_link = admin_url( 'admin.php?page=es_lists&action=new' );
?>
<span><b class="text-sm font-normal text-gray-600 pb-2">
<?php
/* translators: %s: Create list page url */
echo sprintf( esc_html__( 'List not found. Please %s', 'email-subscribers' ), '<a href="' . esc_url( $create_list_link ) . '"> ' . esc_html__( 'create your first list', 'email-subscribers' ) . '</a>' );
?>
</b></span>
<?php } ?>
</div>
</div>
</div>
<div class="flex flex-row border-b border-gray-100">
<div class="flex w-1/5">
<div class="ml-4 pt-4 mb-2">
<label for="tag-link"><span class="block ml-4 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Allow contact to choose list(s)', 'email-subscribers' ); ?></span></label>
<p class="italic text-xs text-gray-400 mt-2 ml-4 leading-snug pb-4"><?php esc_html_e( 'Allow contacts to choose list(s) in which they want to subscribe.', 'email-subscribers' ); ?></p>
</div>
</div>
<div class="flex ">
<div class="ml-16 mb-4 mr-4 mt-12">
<label for="es_allow_contact" class=" inline-flex items-center cursor-pointer">
<span class="relative">
<input id="es_allow_contact" type="checkbox" class=" absolute es-check-toggle opacity-0 w-0 h-0" name="form_data[list_visible]" value="yes"
<?php
if ( 'yes' === $form_data['list_visible'] ) {
echo 'checked="checked"';
}
?>
/>
<span class="es-mail-toggle-line"></span>
<span class="es-mail-toggle-dot"></span>
</span>
</label>
</div>
<div class="ml-8 mb-4 mr-4 mt-10" id="es_list_label" style="display:none">
<input id="list_label" class="form-input block border-gray-400 w-full pl-3 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php echo esc_html__( 'Enter label', 'email-subscribers' ); ?>" name="form_data[list_label]" value="<?php echo esc_html( stripslashes( $form_data['list_label'] ) ); ?>" size="30" maxlength="100"/>
</div>
</div>
</div>
<?php do_action( 'ig_es_additional_form_options', $form_data, $data ); ?>
<div class="flex flex-row border-b border-gray-100">
<div class="flex w-1/5">
<div class="ml-4 pt-4 mb-2">
<label for="tag-link"><span class="block ml-4 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Show GDPR consent checkbox', 'email-subscribers' ); ?></span></label>
<p class="italic text-xs text-gray-400 mt-2 ml-4 leading-snug pb-8"><?php esc_html_e( 'Show consent checkbox to get the consent of a contact before adding them to list(s)', 'email-subscribers' ); ?></p>
</div>
</div>
<div class="flex ">
<div class="ml-16 mb-2 mr-4 mt-6">
<table class="ig_es_form_table">
<tr>
<td>
<label for="gdpr_consent" class=" inline-flex items-center cursor-pointer">
<span class="relative">
<input id="gdpr_consent" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0" name="form_data[gdpr_consent]" value="yes"
<?php
if ( 'yes' === $form_data['gdpr_consent'] ) {
echo 'checked="checked"';
}
?>
/>
<span class="es-mail-toggle-line"></span>
<span class="es-mail-toggle-dot"></span>
</span>
</label>
</td>
</tr>
<tr>
<td>
<textarea class="form-textarea text-sm" rows="2" cols="50" name="form_data[gdpr_consent_text]"><?php echo wp_kses_post( $form_data['gdpr_consent_text'] ); ?></textarea>
<p class="italic text-xs text-gray-400 mt-2 leading-snug pb-4"><?php esc_html_e( 'Consent text will show up at subscription form next to consent checkbox.', 'email-subscribers' ); ?></p>
</td>
</tr>
</table>
</div>
</div>
</div>
<input type="hidden" name="form_data[af_id]" value="<?php echo esc_attr( $form_data['af_id'] ); ?>"/>
<input type="hidden" name="submitted" value="submitted"/>
<?php
$submit_button_text = $is_new ? __( 'Save Form', 'email-subscribers' ) : __( 'Save Changes', 'email-subscribers' );
if ( count( $lists ) > 0 ) {
?>
<p class="submit"><input type="submit" name="submit" id="ig_es_dnd_form_submit_button" class="cursor-pointer align-middle ig-es-primary-button px-4 py-2 ml-6 mr-2" value="<?php echo esc_attr( $submit_button_text ); ?>"/>
<a href="admin.php?page=es_forms" class="cursor-pointer align-middle rounded-md border border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo text-sm leading-5 font-medium transition ease-in-out duration-150 px-4 my-2 py-2 mx-2 "><?php esc_html_e( 'Cancel', 'email-subscribers' ); ?></a></p>
<?php
} else {
$lists_page_url = admin_url( 'admin.php?page=es_lists' );
/* translators: %s: List Page url */
$message = __( sprintf( 'List(s) not found. Please create a first list from <a href="%s">here</a>', $lists_page_url ), 'email-subscribers' );
$status = 'error';
ES_Common::show_message( $message, $status );
}
?>
</form>
</div>
</div>
</div>
</div>
</div>
<?php
}
public function render_dnd_form( $id, $data ) {
$form_data = $data;
$form_id = ! empty( $form_data['form_id'] ) ? $form_data['form_id'] : 0;
$form_name = ! empty( $form_data['name'] ) ? $form_data['name'] : __( 'Untitled Form', 'email-subscribers' );
$editor_type = ! empty( $form_data['settings']['editor_type'] ) ? $form_data['settings']['editor_type'] : '';
$form_style = ! empty( $form_data['settings']['form_style'] ) ? $form_data['settings']['form_style'] : '';
$action = 'new';
if ( $form_id ) {
$action = 'edit';
}
$nonce = wp_create_nonce( 'es_form' );
?>
<div id="es-edit-form-container" data-editor-type="<?php echo esc_attr( $editor_type ); ?>" class="<?php echo esc_attr( $editor_type ); ?> font-sans pt-1.5 wrap">
<?php
if ( ! empty( $message_data ) ) {
$message = $message_data['message'];
$type = $message_data['type'];
ES_Common::show_message( $message, $type );
}
?>
<form id="es-edit-form" method="POST" action="admin.php?page=es_forms&action=<?php echo esc_attr( $action ); ?>&form=<?php echo esc_attr( $form_id ); ?>&_wpnonce=<?php echo esc_attr( $nonce ); ?>">
<input type="hidden" id="form_id" name="form_data[id]" value="<?php echo esc_attr( $form_id ); ?>"/>
<input type="hidden" id="editor_type" name="form_data[settings][editor_type]" value="<?php echo esc_attr( $editor_type ); ?>"/>
<input type="hidden" id="form_style" name="form_data[settings][form_style]" value="<?php echo esc_attr( $form_style ); ?>"/>
<?php wp_nonce_field( 'ig-es-form-nonce', 'ig_es_form_nonce' ); ?>
<fieldset class="block es_fieldset">
<div class="mx-auto wp-heading-inline max-w-7xl">
<header class="mx-auto max-w-7xl">
<div class="md:flex md:items-center md:justify-between">
<div class="flex md:3/5 lg:w-7/12 xl:w-3/5">
<div class=" min-w-0 md:w-3/5 lg:w-1/2">
<nav class="text-gray-400 my-0" aria-label="Breadcrumb">
<ol class="list-none p-0 inline-flex">
<li class="flex items-center text-sm tracking-wide">
<a class="hover:underline" href="admin.php?page=es_forms"><?php echo esc_html__( 'Forms', 'email-subscribers' ); ?>
</a>
</li>
</ol>
</nav>
<input name="form_data[name]" value="<?php echo esc_html( $form_name ); ?>" id="es-form-name" class="form-heading-label bg-transparent outline-0 -mt-1 text-2xl font-medium text-gray-700 sm:leading-7 sm:truncate inline-block w-1/2" readonly="readonly">
<span id="es-toggle-form-name-edit" class="dashicons dashicons-edit cursor-pointer"></span>
</div>
<div class="flex pt-4 md:-mr-8 lg:-mr-16 xl:mr-0 md:ml-8 lg:ml-16 xl:ml-20">
<ul class="ig-es-tabs overflow-hidden">
<li id="form_design_menu" class="es-first-step-tab relative float-left px-1 pb-2 text-center list-none cursor-pointer active ">
<span class="mt-1 text-base font-medium tracking-wide text-gray-400 active"><?php echo esc_html__( 'Design', 'email-subscribers' ); ?></span>
</li>
<li id="form_settings_menu" class="es-second-step-tab relative float-left px-1 pb-2 ml-5 text-center list-none cursor-pointer hover:border-2 ">
<span class="mt-1 text-base font-medium tracking-wide text-gray-400"><?php echo esc_html__( 'Settings', 'email-subscribers' ); ?></span>
</li>
</ul>
</div>
</div>
<div class="flex md:mt-0 xl:ml-4">
<div class="es-first-step-buttons-wrapper inline-block text-left md:mr-2 md:ml-2">
<button id="view_form_summary_button" type="button"
class="inline-flex justify-center w-full py-1.5 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-600 border border-indigo-500 rounded-md cursor-pointer select-none focus:outline-none focus:shadow-outline-indigo focus:shadow-lg hover:bg-indigo-500 hover:text-white hover:shadow-md md:px-2 lg:px-3 xl:px-4">
<?php
echo esc_html__( 'Next', 'email-subscribers' );
?>
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20" class="w-3 h-3 my-1 ml-2 -mr-1 text-white hover:text-white">
<path d="M9 5l7 7-7 7"></path>
</svg>
</button>
</div>
<div id="view_form_content_button" class="es-second-step-buttons-wrapper flex hidden mt-4 md:mt-0">
<button type="button"
class="inline-flex justify-center w-full py-1.5 text-sm font-medium leading-5 text-indigo-600 transition duration-150 ease-in-out border border-indigo-500 rounded-md cursor-pointer select-none pre_btn md:px-1 lg:px-3 xl:px-4 hover:text-indigo-500 hover:border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo focus:shadow-lg ">
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" viewBox="0 0 20 20" class="w-3 h-3 my-1 mr-1"><path d="M15 19l-7-7 7-7"></path></svg><?php echo esc_html__( 'Previous', 'email-subscribers' ); ?>
</button>
</div>
<span id="form_summary_actions_buttons_wrapper" class="es-second-step-buttons-wrapper hidden md:ml-2 xl:ml-2">
<input type="hidden" name="submitted" value="submitted"/>
<button type="submit" id="ig_es_save_form_btn" name="ig_es_form_action" class="inline-flex justify-center w-24 py-1.5 text-sm font-medium leading-5 text-indigo-600 transition duration-150 ease-in-out border border-indigo-500 rounded-md cursor-pointer select-none pre_btn md:px-1 lg:px-3 xl:px-4 hover:text-indigo-500 hover:border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo focus:shadow-lg" value="save">
<span class="ig_es_form_send_option_text">
<?php echo esc_html__( 'Save', 'email-subscribers' ); ?>
</span>
</button>
</span>
</div>
</div>
</header>
</div>
<div class="mx-auto max-w-7xl">
<hr class="wp-header-end">
</div>
<div class="mx-auto mt-6 es_form_first es-first-step max-w-7xl">
<div>
<textarea id="form-dnd-editor-data" name="form_data[settings][dnd_editor_data]" style="display:none;">
<?php
$dnd_editor_data = ! empty( $form_data['settings']['dnd_editor_data'] ) ? $form_data['settings']['dnd_editor_data'] : '';
if ( ! empty( $dnd_editor_data ) ) {
echo esc_html( $dnd_editor_data );
}
?>
</textarea>
<script>
jQuery(document).ready(function($){
if ( 'undefined' !== typeof wp && 'undefined' !== typeof wp.i18n ) {
window.__ = wp.i18n.__;
} else {
// Create a dummy fallback function incase i18n library isn't available.
window.__ = ( text, textDomain ) => {
return text;
}
}
let editorData = $('#form-dnd-editor-data').val().trim();
$(document).on('es_drag_and_drop_editor_loaded',function (event) {
let frontendCSS = ig_es_js_data.frontend_css;
let canvasHeadHTML = esVisualEditor.Canvas.getDocument().head.innerHTML;
canvasHeadHTML += frontendCSS; // Append links/styles tags in Canvas head section
esVisualEditor.Canvas.getDocument().head.innerHTML = canvasHeadHTML;
if ( '' !== editorData ) {
let is_valid_json = ig_es_is_valid_json( editorData );
if ( is_valid_json ) {
editorData = JSON.parse( editorData );
window.esVisualEditor.importMjml(editorData);
}
}
let formStyles = ig_es_js_data.form_styles;
let commonCSS = ig_es_js_data.common_css;
let currentStyleId = $('#form_style').val();
currentStyleId = currentStyleId ? currentStyleId : 'theme-styling'; // Set default styling to theme style.
let currentStyle = formStyles.find( style => currentStyleId === style.id );
let currentStyleCSS = '';
if ( currentStyle ) {
currentStyleCSS = currentStyle ? currentStyle.css : '';
} else {
// Set default style to theme styling.
let themeStyle = formStyles.find( style => style.id === 'theme-styling' );
currentStyleCSS = themeStyle.css;
}
esVisualEditor.setStyle( commonCSS + currentStyleCSS);
let esPlan = ig_es_js_data.es_plan;
let isPremium = ig_es_js_data.is_premium;
let canUpsellFormStyle = ! isPremium;
let formStylesHTML = `<div class="es-form-editor-options-sidebar">
<div class="pt-2 pb-4 mx-4">
<div class="flex w-full border-b border-gray-200 pb-2">
<div class="w-1/3 text-sm font-normal text-gray-600 leading-9">${__( 'Form style', 'email-subscribers' )}</div>
<div class="w-2/3 text-right">
<span class="relative inline-block">
<button id="form-style-button" type="button" class="py-1 px-2 ig-es-title-button">
<span>${currentStyle ? currentStyle.name : __( 'Theme style', 'email-subscribers' ) }</span>
<svg class="w-5 h-5 ml-2 -mr-1" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/>
</svg>
</button>
${canUpsellFormStyle ? '<span class="premium-icon ml-1 align-text-bottom"></span>' : ''}
<div x-show="open" id="form-styles-options" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95" class="absolute z-50 right-0 hidden w-56 mt-2 origin-top-right rounded-md shadow-lg text-left">
<div class="bg-white rounded-md shadow-xs">
<div class="py-1">
${formStyles.map( style => `<span data-style-id="${style.id}" class="style-option block px-4 py-2 text-sm leading-5 text-gray-700 cursor-pointer hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">${style.name}</span>`).join("")}
</div>
</div>
</div>
</span>
</div>
</div>
</div>
</div>`;
$(formStylesHTML).insertBefore('.es-content');
$('form#es-edit-form #form-style-button').on('click',()=>{
if ( canUpsellFormStyle ) {
window.open('https://www.icegram.com/express/pricing/?utm_source=in_app&utm_medium=form_styles&utm_campaign=es_upsell', '_blank');
} else {
$('form#es-edit-form #form-styles-options').toggle();
}
});
$(document).on("click", function (event) {
var $trigger = $("form#es-edit-form #form-style-button");
if ($trigger !== event.target && !$trigger.has(event.target).length) {
$("form#es-edit-form #form-styles-options").hide();
}
});
$('form#es-edit-form .style-option').on('click', (e) => {
e.preventDefault();
let style_id = $(e.target).data('style-id');
let style_text = $(e.target).text();
$('#form_style').val(style_id).trigger('change');
$('#form-style-button span').text(style_text);
$('#ig-es-styles-options').toggle();
});
$('form#es-edit-form #form_style').on('change',function(){
let selected_style_id = $(this).val();
let selected_style = formStyles.find(style => style.id === selected_style_id);
let selected_style_css = selected_style.css ? selected_style.css : '';
esVisualEditor.setStyle( commonCSS + selected_style_css );
});
var editor_type='DND_editor_form';
ig_es_add_dnd_rte_tags( editor_type );
});
});
</script>
<div class="bg-white rounded-lg shadow-md">
<div class="form-drag-and-drop-editor-container">
<textarea id="ig-es-export-css-data-textarea" name="form_data[settings][dnd_editor_css]" style="display:none;"></textarea>
<?php
$form_editor_settings = array(
'attributes' => array(
'data-html-textarea-name' => 'form_data[body]',
'data-page' => 'form',
),
);
( new ES_Drag_And_Drop_Editor() )->show_editor( $form_editor_settings );
?>
</div>
</div>
</div>
</fieldset>
<fieldset class="es_fieldset">
<div class="mt-7 hidden mx-auto es_form_second max-w-7xl es-second-step">
<div class="max-w-7xl">
<div class="bg-white rounded-lg shadow md:flex">
<div class="py-4 my-4 form_main_content pt-3 pl-2">
<div class="block pb-2 mx-4">
<span class="text-sm font-medium text-gray-500">
<?php echo esc_html__( 'Form Preview', 'email-subscribers' ); ?>
</span>
</div>
<div class="block pb-2 mx-4 mt-4 inline_form-popup-preview-container">
<div class="block mt-3 form_preview_content"></div>
</div>
</div>
<?php
$allowedtags = ig_es_allowed_html_tags_in_esc();
$lists = ES()->lists_db->get_list_id_name_map();
?>
<div class="form_side_content bg-gray-100 rounded-r-lg">
<div class="pt-4 pb-4 mx-4 border-b border-gray-200 es-form-lists ">
<div class="flex w-full ">
<div class="w-4/12">
<label for="tag-link">
<span class="block pr-4 text-sm font-medium text-gray-600 pb-2">
<?php esc_html_e( 'Lists', 'email-subscribers' ); ?>
</span>
</label>
</div>
<div class="w-8/12">
<?php
$allowedtags = ig_es_allowed_html_tags_in_esc();
if ( count( $lists ) > 0 ) {
$form_lists = ! empty( $form_data['settings']['lists'] ) ? $form_data['settings']['lists'] : array();
$lists_checkboxes = ES_Shortcode::prepare_lists_checkboxes( $lists, array_keys( $lists ), 3, (array) $form_lists, '', '', 'form_data[settings][lists][]' );
echo wp_kses( $lists_checkboxes, $allowedtags );
} else {
$create_list_link = admin_url( 'admin.php?page=es_lists&action=new' );
?>
<span><b class="text-sm font-normal text-gray-600 pb-2">
<?php
/* translators: %s: Create list page url */
echo sprintf( esc_html__( 'List not found. Please %s', 'email-subscribers' ), '<a href="' . esc_url( $create_list_link ) . '"> ' . esc_html__( 'create your first list', 'email-subscribers' ) . '</a>' );
?>
</b></span>
<?php } ?>
</div>
</div>
</div>
<?php
do_action( 'ig_es_additional_form_options', $form_data, $data );
?>
</div>
</div>
</div>
</div>
</fieldset>
</form>
</div>
<?php
}
/**
* Method to get preview HTML for form
*
* @return $response
*
* @since 4.4.7
*/
public function get_form_preview() {
check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
$response = array();
$form_data = ig_es_get_request_data( 'form_data', array(), false );
$template_data = array();
$template_data['content'] = ! empty( $form_data['body'] ) ? $form_data['body'] : '';
$template_data['form_id'] = ! empty( $form_data['id'] ) ? $form_data['id'] : 0;
$editor_css = ! empty( $form_data['settings']['dnd_editor_css'] ) ? $form_data['settings']['dnd_editor_css'] : '';
$form_body = ! empty( $form_data['body'] ) ? do_shortcode( $form_data['body'] ) : '';
$preview_html = '<style>' . $editor_css . '</style>' . $form_body;
$response['preview_html'] = $preview_html;
$response = self::process_form_body( $response);
if ( ! empty( $response ) ) {
wp_send_json_success( $response );
} else {
wp_send_json_error();
}
}
//The code to replace the keywords in DND editor
public static function process_form_body( $content) {
if (!empty($content)) {
// Define the replacements as an associative array
$replacements = array(
'{{TOTAL-CONTACTS}}' => ES()->contacts_db->count_active_contacts_by_list_id(),
'{{site.total_contacts}}' => ES()->contacts_db->count_active_contacts_by_list_id(),
'{{SITENAME}}' => get_option('blogname'),
'{{site.name}}' => get_option('blogname'),
'{{SITEURL}}' => home_url('/'),
'{{site.url}}' => home_url('/'),
);
// Perform the replacements
$content = str_replace(array_keys($replacements), array_values($replacements), $content);
}
return $content;
}
public static function get_styles_path() {
$form_styles_path = ES_PLUGIN_DIR . 'lite/admin/css/form-styles/';
return $form_styles_path;
}
public static function get_form_styles() {
$form_styles_path = self::get_styles_path();
$form_styles = array(
array(
'id' => 'theme-styling',
'name' => __( 'Theme styling', 'email-subscribers' ),
'css' => file_get_contents( $form_styles_path . 'theme-styling.css' ),
),
);
$form_styles = apply_filters( 'ig_es_form_styles', $form_styles );
return $form_styles;
}
public static function get_frontend_css() {
$css_html = '';
$response = wp_remote_get(get_home_url());
if ( is_wp_error( $response )) {
return $css_html;
}
$content = $response['body'];
preg_match_all( '/<link\s+rel=[\'"]stylesheet[\'"]\s+.*?>/', $content, $matches );
$mateched_link_tags = $matches[0];
if ( ! empty( $mateched_link_tags ) ) {
$css_html .= implode( '', $mateched_link_tags );
}
preg_match_all('/<style[^>]*>[\s\S]*?<\/style>/', $content, $matches );
$matched_style_tags = $matches[0];
if ( ! empty( $matched_style_tags ) ) {
$css_html .= implode( '', $matched_style_tags );
}
return $css_html;
}
public static function get_common_css() {
$form_styles_path = self::get_styles_path();
$common_css = file_get_contents( $form_styles_path . 'common.css' );
return $common_css;
}
}
}
ES_Form_Admin::get_instance();

View File

@@ -0,0 +1,166 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'ES_Gallery' ) ) {
/**
* The admin-specific functionality of the plugin.
*
* Admin Settings
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/admin
*/
class ES_Gallery {
// class instance
public static $instance;
// class constructor
public function __construct() {
$this->init();
}
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
public function init() {
$this->register_hooks();
}
public function register_hooks() {
add_action( 'admin_init', array( $this, 'import_gallery_item' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
}
/**
* Register the JavaScript for ES gallery.
*/
public function enqueue_scripts() {
$current_page = ig_es_get_request_data( 'page' );
if ( in_array( $current_page, array( 'es_gallery', 'es_campaigns' ), true ) ) {
wp_register_script( 'mithril', plugins_url( '/js/mithril.min.js', __FILE__ ), array(), '2.0.4', true );
wp_enqueue_script( 'mithril' );
$campaign_types = ES_Common::get_campaign_type_key_name_map();
$main_js_data = array(
'dnd_editor_slug' => esc_attr( IG_ES_DRAG_AND_DROP_EDITOR ),
'classic_editor_slug' => esc_attr( IG_ES_CLASSIC_EDITOR ),
'post_notification_campaign_type' => esc_attr( IG_CAMPAIGN_TYPE_POST_NOTIFICATION ),
'newsletter_campaign_type' => esc_attr( IG_CAMPAIGN_TYPE_NEWSLETTER ),
'post_digest_campaign_type' => esc_attr( IG_CAMPAIGN_TYPE_POST_DIGEST ),
'sequence_campaign_type' => esc_attr( IG_CAMPAIGN_TYPE_SEQUENCE ),
'workflow_campaign_type' => esc_attr( IG_CAMPAIGN_TYPE_WORKFLOW ),
'local_gallery_type' => 'local',
'remote_gallery_type' => 'remote',
'es_plan' => ES()->get_plan(),
'image_path' => ES_PLUGIN_URL,
'campaign_types' => $campaign_types,
'tags' => ES_Common::get_tags(),
);
if ( 'es_campaigns' === $current_page ) {
$campaign_status_names = ES_Common::get_campaign_statuses_key_name_map();
$campaign_status_codes = ES_Common::get_campaign_status_code_map();
$post_categories = ES_Common::get_post_categories();
$post_types_name = ES_Common::get_post_types_name();
$main_js_data['campaign_status_names'] = $campaign_status_names;
$main_js_data['campaign_status_codes'] = $campaign_status_codes;
$main_js_data['post_categories'] = $post_categories;
if ( ! empty( $post_types_name) && ES()->is_pro() ) {
$custom_post_types_categories = array();
$custom_post_types = array_keys( $post_types_name );
foreach ( $custom_post_types as $custom_post_type ) {
$custom_post_type_categories = ES_Common::get_post_type_categories( $custom_post_type );
if ( ! empty( $custom_post_type_categories ) ) {
$custom_post_types_categories[ $custom_post_type ] = $custom_post_type_categories;
}
}
if ( ! empty( $custom_post_types_categories ) ) {
$main_js_data['custom_post_types_categories'] = $custom_post_types_categories;
}
}
$main_js_data['post_types_name'] = $post_types_name;
$recipient_rules_obj = new ES_Recipient_Rules();
$recipient_rules = $recipient_rules_obj->get_rules();
$main_js_data['recipient_rules'] = $recipient_rules;
$campaigns_default_data = array();
foreach ( $campaign_types as $campaign_type => $campaign_name ) {
$campaign_default_data = ES_Common::get_campaign_default_data( $campaign_type );
$campaigns_default_data[ $campaign_type ] = $campaign_default_data;
}
$main_js_data['campaigns_default_data'] = $campaigns_default_data;
}
if ( ! wp_script_is( 'wp-i18n' ) ) {
wp_enqueue_script( 'wp-i18n' );
}
wp_register_script( 'ig-es-main-js', plugins_url( '/dist/index.js', __FILE__ ), array( 'mithril' ), '2.0.4', true );
// wp_register_script( 'ig-es-main-js', plugins_url( '/dist/main.js', __FILE__ ), array( 'mithril' ), '2.0.4', true );
wp_enqueue_script( 'ig-es-main-js' );
wp_localize_script( 'ig-es-main-js', 'ig_es_main_js_data', $main_js_data );
}
}
public function import_gallery_item() {
$action = ig_es_get_request_data( 'action' );
if ( 'ig_es_import_gallery_item' === $action ) {
check_admin_referer( 'ig-es-admin-ajax-nonce' );
$gallery_type = ig_es_get_request_data( 'gallery-type' );
$template_id = ig_es_get_request_data( 'template-id' );
$campaign_id = ig_es_get_request_data( 'campaign-id' );
$campaign_type = ig_es_get_request_data( 'campaign-type' );
$imported_campaign_id = ES_Gallery_Controller::import_gallery_item_handler( $gallery_type, $template_id, $campaign_type, $campaign_id );
if ( ! empty( $imported_campaign_id ) ) {
$redirect_url = admin_url( 'admin.php?page=es_campaigns#!/campaign/edit/' . $imported_campaign_id );
wp_safe_redirect( $redirect_url );
exit();
}
} elseif ( 'ig_es_import_remote_gallery_template' === $action ) {
check_admin_referer( 'ig-es-admin-ajax-nonce' );
$template_id = ig_es_get_request_data( 'template-id' );
$imported_template_id = ES_Gallery_Controller::import_remote_gallery_template( $template_id );
if ( ! empty( $imported_template_id ) ) {
$redirect_url = admin_url( 'admin.php?page=es_campaigns#!/template/edit/' . $imported_template_id );
wp_safe_redirect( $redirect_url );
exit();
}
} elseif ( 'ig_es_duplicate_template' === $action ) {
check_admin_referer( 'ig-es-admin-ajax-nonce' );
$template_id = ig_es_get_request_data( 'template-id' );
$duplicate_template_id = ES_Gallery_Controller::duplicate_template( $template_id );
if ( ! empty( $duplicate_template_id ) ) {
$redirect_url = admin_url( 'admin.php?page=es_campaigns#!/template/edit/' . $duplicate_template_id );
wp_safe_redirect( $redirect_url );
exit();
}
}
}
}
}
ES_Gallery::get_instance();

View File

@@ -0,0 +1,95 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* The admin-specific functionality of the plugin.
*
* @link http://example.com
* @since 4.0
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/admin
*/
/**
* The admin-specific functionality of the plugin.
*
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the admin-specific stylesheet and JavaScript.
*
* @package Email_Subscribers
* @subpackage Email_Subscribers/admin
*/
class ES_GB_Subscription_Form_Block {
// class instance
public static $instance;
// class constructor
public function __construct() {
$this->init();
}
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
public function init() {
add_action( 'init', array( $this, 'register_gb_subscription_form_block' ) );
add_action( 'enqueue_block_editor_assets', array($this,'enqueue_assets') );
}
public function enqueue_assets() {
wp_register_style( 'ig-es-gb-subscription-form-block-css', plugin_dir_url( __FILE__ ) . 'css/gb-subscription-form-block.css', array('wp-edit-blocks'), ES_PLUGIN_VERSION, 'all' );
wp_register_script( 'ig-es-gb-subscription-form-block-js', plugin_dir_url( __FILE__ ) . 'js/gb-subscription-form-block.js', array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-i18n', 'wp-server-side-render' ), ES_PLUGIN_VERSION, true );
$es_forms = ES()->forms_db->get_all();
wp_localize_script( 'ig-es-gb-subscription-form-block-js', 'es_forms', $es_forms );
}
public function register_gb_subscription_form_block() {
if ( ! function_exists( 'register_block_type' ) ) {
// Block editor is not available.
return;
}
register_block_type(
'email-subscribers/subscription-form-block',
array(
'editor_style' => 'ig-es-gb-subscription-form-block-css',
'editor_script' => 'ig-es-gb-subscription-form-block-js',
'api_version' => 2,
'render_callback' => array( $this, 'render_form' ),
'attributes' => array(
'formID' => array(
'type' => 'number'
)
),
)
);
}
public function render_form( $attributes ) {
ob_start();
$formID = isset( $attributes['formID'] ) ? $attributes['formID'] : '';
if ( ! empty( $formID ) ) {
echo do_shortcode( '[email-subscribers-form id="' . $formID . '"]' );
}
$search_form_html = ob_get_clean();
return $search_form_html;
}
}
ES_GB_Subscription_Form_Block::get_instance();

View File

@@ -0,0 +1,237 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class to handle Icegram site's weekly newsletter summary automation
*/
class ES_Newsletter_Summary_Automation {
protected $cron_hook = 'ig_es_newsletter_summary_automation';
protected $option_name = 'ig_es_enable_newsletter_summary_automation';
/**
* Class constructor
*/
public function __construct() {
add_action( $this->cron_hook, array( $this, 'send_newsletter_summary_email' ) );
add_action( 'ig_es_plugin_activate', array( $this, 'maybe_enable_newsletter_summary_automation' ) );
add_action( 'ig_es_enable_newsletter_summary_automation', array( $this, 'maybe_enable_newsletter_summary_automation' ) );
add_action( 'ig_es_plugin_deactivate', array( $this, 'clear_scheduled_automation' ) );
add_action( 'admin_init' , array( $this, 'maybe_disable_automation' ) );
}
/**
* Handle automation while saving the settings.This action may clear or reschedule the automation as per need.
*
* @param $settings
*/
public function maybe_enable_newsletter_summary_automation() {
$is_automation_enabled = get_option( $this->option_name, 'yes' );
if ( 'yes' === $is_automation_enabled ) {
$this->schedule_summary_automation( true, false );
} else {
$this->clear_scheduled_automation();
}
}
/**
* Handle the cron event
*
* @return bool
*/
public function send_newsletter_summary_email() {
// Return if pro since we are already doing this in the pro.
if ( ES()->is_pro() ) {
$this->clear_scheduled_automation();
return;
}
$email_data = self::get_email_data();
if ( ! empty( $email_data ) ) {
ES()->mailer->can_track_open_clicks = false;
ES()->mailer->add_unsubscribe_link = false;
return ES()->mailer->send( $email_data['subject'], $email_data['content'], $email_data['email'] );
}
return false;
}
public static function get_email_data() {
$admin_email = ES_Common::get_admin_email();
if ( is_email( $admin_email ) ) {
$user = get_user_by( 'email', $admin_email );
$admin_name = '';
if ( $user instanceof WP_User ) {
$admin_name = $user->display_name;
}
$interval = 7;
$today = time();
$plan = ES()->get_plan();
$data = array(
'plan' => ES()->get_plan(),
'site_name' => get_option( 'blogname' ),
'admin_name' => $admin_name,
'logo_url' => ES_PLUGIN_URL . 'lite/admin/images/es-logo-64x64.png',
'start_date' => gmdate( 'F d', $today - ( $interval * DAY_IN_SECONDS ) ),
'end_date' => gmdate( 'F d, Y', $today ),
);
$admin_url = admin_url();
if ( 'pro' === $plan ) {
$reports_url = $admin_url . 'admin.php?page=es_reports';
$data['reports_url'] = $reports_url;
} else {
$unsubscribe_url = $admin_url . '?es=ig-newsletter-unsubscribe';
$data['unsubscribe_url'] = $unsubscribe_url;
}
$email_stats = self::get_email_stats( $interval );
$data = array_merge( $data, $email_stats );
$content = self::get_content( $data );
$email_data = array(
'subject' => __( 'Weekly Report from Icegram Express', 'email-subscribers' ),
'email' => $admin_email,
'content' => $content,
);
return $email_data;
}
return false;
}
public static function get_email_stats( $interval = 7 ) {
$args = array(
'days' => $interval
);
$distinct_count = false;
$email_stats = array(
'total_subscribed' => ES_Reports_Data::get_total_subscribed_contacts( $args, $distinct_count ),
'total_sent_mails' => ES_Reports_Data::get_total_emails_sent( $args, $distinct_count ),
'total_opened_mails' => ES_Reports_Data::get_total_contacts_opened_emails( $args, $distinct_count ),
);
if ( ES()->is_pro() ) {
$pro_email_stats = array(
'contacts_growth' => ES_Reports_Data::get_contacts_growth_percentage( $args ),
'total_unsubscribed' => ES_Reports_Data::get_total_unsubscribed_contacts( $args ),
'total_clicked_mails' => ES_Reports_Data::get_total_contacts_clicks_links( $args ),
);
$email_stats = array_merge( $email_stats, $pro_email_stats );
}
return $email_stats;
}
/**
* Get the HTML content required for email
*
* @param array $data
*
* @return false|string
*/
public static function get_content( $data ) {
ob_start();
ES_Admin::get_view(
'newsletter-summary',
$data
);
$content = ob_get_clean();
return $content;
}
/**
* Handles scheduling the automation
*
* @param false $force_clear Do I need to clear the scheduled event before scheduling the event
*/
public function schedule_summary_automation( $force_clear = false, $check_setting_before_schedule = true ) {
//Don't give workload to site users
if ( ! is_admin() ) {
return false;
}
if ( $check_setting_before_schedule ) {
$ig_es_enable_newsletter_summary_automation = get_option( $this->option_name, 'yes' );
if ( 'no' === $ig_es_enable_newsletter_summary_automation ) {
return false;
}
}
$run_cron_on = 'thursday';
$run_cron_time = '9am';
$day_and_time = "{$run_cron_on} {$run_cron_time}";
//Schedule an action if it's not already scheduled
if ( ! wp_next_scheduled( $this->cron_hook ) ) {
$scheduled_time = $this->get_schedule_time( $day_and_time );
if ( ! is_null( $scheduled_time ) ) {
$response = wp_schedule_event( $scheduled_time, 'weekly', $this->cron_hook, array(), true );
if ( $response instanceof WP_Error ) {
return false;
}
}
}
return true;
}
/**
* Get the schedule time from the day
*
* @param $day_and_time string
*
* @return false|float|int
*/
public function get_schedule_time( $day_and_time ) {
try {
$date = new DateTime( $day_and_time );
$scheduled_datetime = $date->format( 'Y-m-d h:i:s A' );
$scheduled_datetime_gmt = get_gmt_from_date( $scheduled_datetime );
return strtotime( $scheduled_datetime_gmt );
} catch ( Exception $e ) {
return null;
}
}
/**
* Clear the scheduled automation
*/
public function clear_scheduled_automation() {
wp_clear_scheduled_hook( $this->cron_hook );
}
public function maybe_disable_automation() {
$action = ig_es_get_request_data( 'es' );
if ( 'ig-newsletter-unsubscribe' === $action ) {
$status = 'no';
$this->update_newsletter_summary_automation( $status );
$this->clear_scheduled_automation();
$this->show_unsubscribe_success_message();
}
}
public function update_newsletter_summary_automation( $status = 'no' ) {
update_option( $this->option_name, $status, false );
}
public function show_unsubscribe_success_message() {
$message = __( 'You have been unsubscribed from Icegram Express\'s Weekly Report.', 'email-subscribers' );
include ES_PLUGIN_DIR . 'lite/public/partials/subscription-successfull.php';
die();
}
}
new ES_Newsletter_Summary_Automation();

View File

@@ -0,0 +1,121 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class to allow admin to manage REST API Keys(creating,revoking,deleting API keys)
*
* @since 5.4.18
*/
class ES_Rest_API_Admin {
public static function init() {
self::register_hooks();
}
public static function register_hooks() {
add_action( 'wp_ajax_ig_es_generate_rest_api_key', array( __CLASS__, 'handle_generate_rest_api_key_request' ) );
add_action( 'wp_ajax_ig_es_delete_rest_api_key', array( __CLASS__, 'handle_delete_rest_api_key_request' ) );
}
public static function handle_generate_rest_api_key_request() {
check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
$response = array();
$user_id = ig_es_get_request_data( 'user_id', 0 );
if ( empty( $user_id ) ) {
$response['status'] = 'error';
$response['message'] = __( 'Please select a user.', 'email-subscribers' );
}
$user = get_user_by( 'id', absint( $user_id ) );
if ( ! $user ) {
$response['status'] = 'error';
$response['message'] = __( 'Selected user doesn\'t exists. Please select a different user.', 'email-subscribers' );
} else {
$generated_api_key = self::generate_rest_api_key( $user_id );
if ( $generated_api_key ) {
$rest_api_keys = get_user_meta( $user_id, 'ig_es_rest_api_keys', true );
$rest_api_keys = ! empty( $rest_api_keys ) ? $rest_api_keys : array();
$rest_api_keys[] = $generated_api_key;
update_user_meta( $user_id, 'ig_es_rest_api_keys', $rest_api_keys );
$response['status'] = 'success';
/* Translators: %s: new API key */
$message = sprintf( __( 'Here is your new API key: %s.', 'email-subscribers' ), '<code class="es-code">' . $generated_api_key . '</code>' );
$message .= '<br/>' . __( 'Be sure to save this in a safe location. You will not be able to retrieve it later on.', 'email-subscribers' );
$response['message'] = $message;
}
}
wp_send_json( $response );
}
/**
* Generate a new REST API key from the user email
*/
public static function generate_rest_api_key( $user_id = 0 ) {
if ( empty( $user_id ) ) {
return false;
}
$user = get_userdata( $user_id );
if ( ! $user ) {
return false;
}
$user_email = $user->user_email;
$auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';
$generated_api_key = hash( 'md5', $user_email . $auth_key . gmdate( 'U' ) );
return $generated_api_key;
}
public static function handle_delete_rest_api_key_request() {
check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
$response = array();
$user_id = ig_es_get_request_data( 'user_id', 0 );
if ( empty( $user_id ) ) {
$response['status'] = 'error';
$response['message'] = __( 'User missing.', 'email-subscribers' );
}
$user = get_user_by( 'id', absint( $user_id ) );
if ( ! $user ) {
$response['status'] = 'error';
$response['message'] = __( 'User missing.', 'email-subscribers' );
} else {
$api_index = ig_es_get_request_data( 'api_index', 0 );
$api_key_deleted = self::delete_rest_api_key( $user_id, $api_index );
if ( $api_key_deleted ) {
$response['status'] = 'success';
}
}
wp_send_json( $response );
}
public static function delete_rest_api_key( $user_id, $index = 0 ) {
$rest_api_keys = get_user_meta( $user_id, 'ig_es_rest_api_keys', true );
unset( $rest_api_keys[ $index ] );
if ( empty( $rest_api_keys ) ) {
$success = delete_user_meta( $user_id, 'ig_es_rest_api_keys' );
} else {
$success = update_user_meta( $user_id, 'ig_es_rest_api_keys', $rest_api_keys );
}
if ( true === $success ) {
return true;
}
return false;
}
}
ES_Rest_API_Admin::init();

View File

@@ -0,0 +1,66 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class ES_Template_Admin extends ES_Admin {
public static $instance;
public function __construct() {
$this->init();
}
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
public function show_merge_tags( $template_type ) {
$subscriber_tags = $this->get_subscriber_tags();
if ( ! empty( $subscriber_tags ) ) {
?>
<div id="ig-es-subscriber-tags">
<?php
$this->render_merge_tags( $subscriber_tags );
?>
</div>
<?php
}
$site_tags = $this->get_site_tags();
if ( ! empty( $site_tags ) ) {
?>
<div id="ig-es-site-tags">
<?php
$this->render_merge_tags( $site_tags );
?>
</div>
<?php
}
$template_tags = $this->get_campaign_tags();
if ( ! empty( $template_tags ) ) {
?>
<div id="ig-es-campaign-tags">
<?php foreach ($template_tags as $type => $tags ) : ?>
<?php
$class = $type !== $template_type ? 'hidden' : '';
?>
<div class="ig-es-campaign-tags <?php echo esc_attr( $type ); ?> <?php echo esc_attr( $class ); ?>">
<?php
$this->render_merge_tags( $tags );
?>
</div>
<?php endforeach; ?>
</div>
<?php
}
}
}
ES_Template_Admin::get_instance();

View File

@@ -0,0 +1,892 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'IG_ES_Campaign_Rules' ) ) {
/**
* Class IG_ES_Campaign_Rules
*
* @since 4.6.11
*/
class IG_ES_Campaign_Rules {
/**
* Campaign rules
*/
private $campaign_rules = array();
/**
* Subscriber related fields
*/
private $fields = array();
/**
* Campaign related fields
*/
private $campaign_related = array();
/**
* Aggregate campaigns fields
*/
private $aggregate_campaigns = array();
/**
* Rule operators
*/
private $operators = array();
/**
* Simple operators
*/
private $simple_operators = array();
/**
* String operators
*/
private $string_operators = array();
/**
* Boolean operators
*/
private $bool_operators = array();
/**
* IG_ES_Campaign_Rules constructor.
*/
public function __construct() {
add_action( 'init', array( $this, 'init' ) );
}
/**
* Initialize campaign rules
*
* @since 4.6.12
*/
public function init() {
$this->fields = $this->get_fields();
$this->campaign_related = $this->get_campaign_related();
$this->aggregate_campaigns = $this->get_aggregate_campaigns();
$this->operators = $this->get_operators();
$this->simple_operators = $this->get_simple_operators();
$this->string_operators = $this->get_string_operators();
$this->bool_operators = $this->get_bool_operators();
$this->campaign_rules = self::get_campaign_rules();
add_action( 'ig_es_show_campaign_rules', array( $this, 'show_campaign_rules' ), 10, 2 );
add_action( 'ig_es_campaign_show_conditions', array( $this, 'show_conditions' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
}
/**
* Register the JavaScript for campaign rules.
*/
public function enqueue_scripts() {
$current_page = ig_es_get_request_data( 'page' );
if ( in_array( $current_page, array( 'es_notifications', 'es_newsletters', 'es_sequence' ), true ) ) {
wp_register_script( 'alpine', plugins_url( '/js/alpine.js', __FILE__ ), array(), '2.8.2', false );
wp_enqueue_script( 'alpine' );
}
}
/**
* Method to show campaign rules
*
* @param array $campaign_data Broadcast data
*
* @since 4.6.11
*/
public function show_campaign_rules( $campaign_id = 0, $campaign_data = array() ) {
$current_page = ig_es_get_request_data( 'page' );
$campaign_type = '';
if ( 'es_newsletters' === $current_page ) {
$campaign_type = 'newsletter';
} elseif ( 'es_notifications' === $current_page ) {
$campaign_type = 'post_notification';
} else {
$campaign_type = 'sequence_message';
}
$conditions = array();
if ( ! empty( $campaign_data['meta'] ) ) {
$campaign_meta = maybe_unserialize( $campaign_data['meta'] );
$conditions = ! empty( $campaign_meta['list_conditions'] ) ? $campaign_meta['list_conditions'] : array();
}
$args = array();
if ( IG_CAMPAIGN_TYPE_NEWSLETTER === $campaign_type ) {
$args = array(
'include_types' => array(
IG_CAMPAIGN_TYPE_NEWSLETTER,
),
'status' => array(
IG_ES_CAMPAIGN_STATUS_QUEUED,
IG_ES_CAMPAIGN_STATUS_FINISHED,
),
);
} elseif ( IG_CAMPAIGN_TYPE_POST_NOTIFICATION === $campaign_type ) {
$args = array(
'include_types' => array(
IG_CAMPAIGN_TYPE_POST_NOTIFICATION,
),
);
} elseif ( IG_CAMPAIGN_TYPE_POST_DIGEST === $campaign_type ) {
$args = array(
'include_types' => array(
IG_CAMPAIGN_TYPE_POST_DIGEST,
),
);
} else {
$args = array(
'include_types' => array(
'sequence_message',
),
);
}
if ( ! empty( $campaign_id ) ) {
$args['campaigns_not_in'] = array( $campaign_id );
}
$all_campaigns = ES()->campaigns_db->get_campaigns( $args );
$lists = ES()->lists_db->get_list_id_name_map();
$countries_data = ES_Geolocation::get_countries();
if ( 'es_newsletters' === $current_page ) {
$input_name = 'data[meta][list_conditions]';
} elseif ( 'es_notifications' === $current_page ) {
$input_name = 'data[meta][list_conditions]';
} else {
$input_name = 'seq_data[' . $campaign_id . '][list_conditions]';
}
$select_list_attr = ES()->is_pro() ? 'multiple="multiple"' : '';
$select_list_class = ES()->is_pro() ? 'ig-es-campaign-rule-form-multiselect' : 'form-select';
$sidebar_id = 'sidebar_' . $campaign_id;
?>
<style>
.select2-container{
width: 100%!important;
}
.select2-search__field {
width: 100%!important;
}
</style>
<div class="ig-es-campaign-rules my-2" data-campaign-id="<?php echo esc_attr( $campaign_id ); ?>" data-campaign-type="<?php echo esc_attr( $campaign_type ); ?>" x-data="{ <?php echo esc_attr( $sidebar_id ); ?>: false }">
<label for="es-campaign-condition" class="text-sm font-medium leading-5 text-gray-700 recipient-text"><?php esc_html_e( 'Recipients', 'email-subscribers' ); ?>:</label>
<div class="ig-es-conditions-render-wrapper">
<?php
if ( ! empty( $conditions ) ) {
do_action( 'ig_es_campaign_show_conditions', $conditions );
}
?>
</div>
<p class="clear">
<a class="block edit-conditions rounded-md border text-indigo-600 border-indigo-500 text-sm leading-5 font-medium transition ease-in-out duration-150 select-none inline-flex justify-center hover:text-indigo-500 hover:border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo focus:shadow-lg mt-1 px-1.5 py-1 mr-1 cursor-pointer" x-on:click="<?php echo esc_attr( $sidebar_id ); ?>=true">
<?php esc_html_e( 'Add recipients', 'email-subscribers' ); ?>
</a>
<span class="remove-all-conditions-wrapper<?php echo empty( $conditions ) ? ' hidden' : ''; ?>">
<?php esc_html_e( 'or', 'email-subscribers' ); ?>
<a class="remove-conditions hover:underline" href="#">
<?php esc_html_e( 'remove all', 'email-subscribers' ); ?>
</a>
</span>
</p>
<div class="fixed inset-0 overflow-hidden z-50" id='ig-es-campaign-rules-<?php echo esc_attr( $sidebar_id ); ?>' style="display: none;" x-show="<?php echo esc_attr( $sidebar_id ); ?>">
<div class="absolute inset-0 overflow-hidden">
<div class="absolute inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
<section class="absolute inset-y-0 right-0 pl-10 max-w-full flex" aria-labelledby="slide-over-heading">
<div class="relative w-screen max-w-3xl mt-8"
x-transition:enter="ease-out duration-300"
x-transition:enter-start="opacity-0 -translate-x-full"
x-transition:enter-end="opacity-100 translate-x-0"
x-transition:leave="ease-in duration-200"
x-transition:leave-start="opacity-100 translate-x-0"
x-transition:leave-end="opacity-0 -translate-x-full">
<div class="h-full flex flex-col bg-gray-50 shadow-xl overflow-y-auto">
<div class="flex py-5 px-6 bg-gray-100 shadow-sm sticky">
<div class="w-9/12">
<span id="slide-over-heading" class="text-xl font-medium text-gray-600">
<?php echo esc_html__( 'Campaign Rules', 'email-subscribers' ); ?>
</span>
</div>
<div class="w-3/12 text-right">
<span class="es_spinner_image_admin inline-block align-middle -mt-1 mr-1" id="spinner-image" style="display:none"><img src="<?php echo esc_url( ES_PLUGIN_URL . 'lite/public/images/spinner.gif' ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'email-subscribers' ); ?>"/></span>
<a class="-mt-1 mr-2 px-3 py-0.5 ig-es-primary-button cursor-pointer close-conditions" x-on:click=" <?php echo esc_attr( $sidebar_id ); ?> = false"><?php esc_html_e( 'Save Rules', 'email-subscribers' ); ?></a>
<a x-on:click=" <?php echo esc_attr( $sidebar_id ); ?> = false" class="-mt-1 rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-white cursor-pointer">
<span class="sr-only"><?php echo esc_html__( 'Close panel', 'email-subscribers' ); ?></span>
<!-- Heroicon name: outline/x -->
<svg class="h-6 w-6 inline" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</a>
</div>
</div>
<div class="mt-3 px-6 pb-6 relative flex-1 w-full">
<!-- Replace with your content -->
<div class="h-full rounded-md" aria-hidden="true">
<div class="absolute inset-0 z-50">
<div class="foot pt-2 px-6 text-right">
<div class="campaign-conditions-total-contacts">
<p class="inline font-medium text-base tracking-wide pr-2 text-gray-400"><?php esc_html_e( 'Total recipients', 'email-subscribers' ); ?>: </span> <span class="ig-es-total-contacts">&ndash;</span></div>
</div>
<div class="ig-es-conditions px-6 h-full">
<div class="ig-es-condition-container"></div>
<div class="ig-es-conditions-wrap mt-1 mb-3 overflow-auto">
<?php
array_unshift(
$conditions,
array(
array(
'field' => '',
'operator' => '',
'value' => '',
),
)
);
foreach ( $conditions as $i => $condition_group ) :
?>
<div class="ig-es-condition-group bg-white border border-gray-200 rounded-md my-2 pb-12 relative block px-4 rounded-lg pt-2 mt-2 mb-12" data-id="<?php echo esc_attr( $i ); ?>" data-operator="<?php esc_attr_e( 'and', 'email-subscribers' ); ?>"<?php echo ( ! $i ) ? ' style="display:none"' : ''; ?>>
<?php
foreach ( $condition_group as $j => $condition ) :
$value = isset( $condition['value'] ) ? $condition['value'] : '';
$field = isset( $condition['field'] ) ? $condition['field'] : '';
$field_operator = $this->get_field_operator( $condition['operator'] );
?>
<div class="add-or-condition absolute z-10 bottom-5">
<a class="es-add-or-condition bg-gray-100 py-1 px-1 rounded-md leading-4 font-medium cursor-pointer hover:bg-gray-50"><?php esc_html_e( 'Add Condition', 'email-subscribers' ); ?> [<span class="uppercase"><?php esc_html_e( 'or', 'email-subscribers' ); ?></span>]</a>
</div>
<div class="ig-es-condition border-b border-gray-200 relative py-5" data-id="<?php echo esc_attr( $j ); ?>" data-operator="<?php esc_attr_e( 'or', 'email-subscribers' ); ?>">
<a class="remove-condition cursor-pointer float-right mb-2 px-1" title="<?php esc_attr_e( 'remove condition', 'email-subscribers' ); ?>">&#10005;</a>
<div class="ig-es-conditions-field-fields">
<select name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][field]" class="condition-field form-select" disabled>
<?php
foreach ( $this->campaign_rules as $rule_group => $rules ) {
?>
<optgroup label="<?php echo esc_attr( $rule_group ); ?>">
<?php
foreach ( $rules as $key => $rule ) {
echo '<option value="' . esc_attr( $key ) . '"' . selected( $condition['field'], $key, false ) . ( ! empty( $rule['disabled'] ) ? ' disabled="' . esc_attr( 'disabled' ) . '"' : '' ) . ( isset( $rule['count'] ) ? ' data-count="' . esc_attr( $rule['count'] ) . '"' : '' ) . '>' . esc_html( $rule['name'] ) . '</option>';
}
?>
</optgroup>
<?php
}
?>
</select>
</div>
<div class="ig-es-conditions-operator-fields">
<div class="ig-es-conditions-operator-field ig-es-conditions-operator-field-default">
<select name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][operator]" class="condition-operator form-select" disabled>
<?php
foreach ( $this->operators as $key => $name ) :
echo '<option value="' . esc_attr( $key ) . '"' . selected( $field_operator, $key, false ) . '>' . esc_html( $name ) . '</option>';
endforeach;
?>
</select>
</div>
<?php
$campaign_rules_data_fields = array(
'string_fields' => array( 'email' ),
);
$campaign_rules_data_fields = apply_filters( 'ig_es_campaign_rules_data_fields', $campaign_rules_data_fields );
if ( ! empty( $campaign_rules_data_fields['string_fields'] ) ) {
?>
<div class="ig-es-conditions-operator-field" data-fields=",<?php echo esc_attr( implode( ',', $campaign_rules_data_fields['string_fields'] ) ); ?>,">
<select name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][operator]" class="condition-operator form-select" disabled>
<?php
foreach ( $this->string_operators as $key => $name ) :
echo '<option value="' . esc_attr( $key ) . '"' . selected( $field_operator, $key, false ) . '>' . esc_html( $name ) . '</option>';
endforeach;
?>
</select>
</div>
<?php
}
?>
<?php
if ( ! empty( $campaign_rules_data_fields['simple_fields'] ) ) {
?>
<div class="ig-es-conditions-operator-field" data-fields=",<?php echo esc_attr( implode( ',', $campaign_rules_data_fields['simple_fields'] ) ); ?>,">
<select name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][operator]" class="condition-operator form-select" disabled>
<?php
foreach ( $this->simple_operators as $key => $name ) :
echo '<option value="' . esc_attr( $key ) . '"' . selected( $field_operator, $key, false ) . '>' . esc_html( $name ) . '</option>';
endforeach;
?>
</select>
</div>
<?php
}
?>
<?php
if ( ! empty( $campaign_rules_data_fields['date_fields'] ) ) {
?>
<div class="ig-es-conditions-operator-field" data-fields=",<?php echo esc_attr( implode( ',', $campaign_rules_data_fields['date_fields'] ) ); ?>,">
<select name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][operator]" class="condition-operator form-select" disabled>
<?php
foreach ( $this->simple_operators as $key => $name ) :
echo '<option value="' . esc_attr( $key ) . '"' . selected( $field_operator, $key, false ) . '>' . esc_html( $name ) . '</option>';
endforeach;
?>
</select>
</div>
<?php
}
if ( ! empty( $campaign_rules_data_fields['boolean_fields'] ) ) {
?>
<div class="ig-es-conditions-operator-field" data-fields=",<?php echo esc_attr( implode( ',', $campaign_rules_data_fields['boolean_fields'] ) ); ?>,">
<select name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][operator]" class="condition-operator form-select" disabled>
<?php
foreach ( $this->bool_operators as $key => $name ) :
echo '<option value="' . esc_attr( $key ) . '"' . selected( $field_operator, $key, false ) . '>' . esc_html( $name ) . '</option>';
endforeach;
?>
</select>
</div>
<?php
}
?>
<div class="ig-es-conditions-operator-field" data-fields=",_sent,_sent__not_in,_open,_open__not_in,_click,_click__not_in,_lists__not_in,_lists__in,">
<input type="hidden" name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][operator]" class="condition-operator" disabled value="is">
</div>
</div>
<div class="ig-es-conditions-value-fields w-full">
<?php
if ( is_array( $value ) ) {
$value_arr = $value;
$value = $value[0];
} else {
$value_arr = array( $value );
}
?>
<div class="ig-es-conditions-value-field ig-es-conditions-value-field-default">
<input type="text" class="regular-text condition-value form-input h-5 text-sm" disabled value="<?php echo esc_attr( $value ); ?>" name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][value]">
</div>
<div class="ig-es-conditions-value-field" data-fields=",id,wp_user_id,">
<input type="text" class="regular-text condition-value form-input h-5 text-sm" disabled value="<?php echo esc_attr( $value ); ?>" name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][value]">
</div>
<div class="ig-es-conditions-value-field" data-fields=",country_code,">
<select class="regular-text condition-value form-select" disabled name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][value]">
<option value="">--</option>
<?php
foreach ( $countries_data as $country_code => $country_name ) {
?>
<option value="<?php echo esc_attr( $country_code ); ?>" <?php selected( $country_code, $value ); ?>><?php echo esc_html( $country_name ); ?></option>
<?php
}
?>
</select>
</div>
<div class="ig-es-conditions-value-field" data-fields=",_sent,_sent__not_in,_open,_open__not_in,_click,_click__not_in,">
<div class="-mr-3">
<select name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][value][]" class="condition-value ig-es-campaign-select-field <?php echo esc_attr( $select_list_class ); ?>" <?php echo esc_attr( $select_list_attr ); ?>>
<option value="0"><?php echo esc_html__( 'Any campaign', 'email-subscribers' ); ?></option>
<?php if ( $all_campaigns ) : ?>
<?php foreach ( $value_arr as $k => $v ) : ?>
<?php
foreach ( $all_campaigns as $campaign ) :
?>
<option value="<?php echo esc_attr( $campaign['id'] ); ?>" <?php selected( $v, $campaign['id'] ); ?>><?php echo $campaign['name'] ? esc_html( $campaign['name'] ) : '[' . esc_html__( 'no title', 'email-subscribers' ) . '] (# ' . esc_attr( $campaign['id'] ) . ')'; ?></option>
<?php endforeach; ?>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
</div>
<div class="ig-es-conditions-value-field" data-fields=",_lists__not_in,_lists__in,">
<?php if ( $lists ) : ?>
<select name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][value][]" class="condition-value <?php echo esc_attr( $select_list_class ); ?>" <?php echo esc_attr( $select_list_attr ); ?>>
<?php
if ( ES()->is_pro() ) :
?>
<option value="0"><?php echo esc_html__( 'Select list', 'email-subscribers' ); ?></option>
<?php
endif;
foreach ( $lists as $list_id => $list_name ) :
?>
<option value="<?php echo esc_attr( $list_id ); ?>" <?php echo ( in_array( $list_id, $value_arr ) ? 'selected="' . esc_attr( 'selected' ) . '"' : '' ); ?>><?php echo $list_name ? esc_html( $list_name ) : '[' . esc_html__( 'no title', 'email-subscribers' ) . ']'; ?></option>
<?php endforeach; ?>
</select>
<?php else : ?>
<p><?php esc_html_e( 'No campaigns available', 'email-subscribers' ); ?><input type="hidden" class="condition-value" disabled value="0" name="<?php echo esc_attr( $input_name ); ?>[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( $j ); ?>][value]"></p>
<?php endif; ?>
</div>
<?php
do_action( 'ig_es_campaigns_extra_filters', $input_name, $value_arr, $value, $i, $j, $select_list_class, $select_list_attr );
?>
</div>
<div class="clear"></div>
</div><?php endforeach; ?>
</div><?php endforeach; ?>
</div>
<div class="mt-5">
<a class="ig-es-primary-button py-1 px-2 cursor-pointer add-condition">
<svg class="w-4 h-4 mt-0.5 inline text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
<?php esc_html_e( 'Add Condition', 'email-subscribers' ); ?></a>
</div>
<div class="ig-es-condition-empty">
</div>
</div>
</div>
<!-- /End replace -->
</div>
</div>
<?php do_action( 'ig_es_upsell_campaign_rules' ); ?>
</div>
</section>
</div>
</div>
</div>
<?php
}
/**
* Show selected conditions
*/
public function show_conditions( $conditions ) {
$allowedtags = ig_es_allowed_html_tags_in_esc();
?>
<?php
if ( ! empty( $conditions ) ) :
?>
<div class="ig-es-conditions-render">
<?php
foreach ( $conditions as $i => $condition_group ) :
if ( ! empty( $condition_group ) ) :
?>
<div class="ig-es-condition-render-group">
<?php
if ( $i ) {
echo '<span class="clear float-left pr-1 ig-es-condition-operators text-xs font-medium text-gray-400 tracking-wide uppercase mt-1 mr-1">' . esc_html__( 'and', 'email-subscribers' );
if ( count( $condition_group ) > 1 ) {
echo esc_html( ' ( ' );
}
echo wp_kses( '</span>', $allowedtags );
}
foreach ( $condition_group as $j => $condition ) :
$condition_html = $this->get_condition_html( $condition );
?>
<div class="ig-es-condition-render ig-es-condition-render-<?php echo esc_attr( $condition['field'] ); ?>" title="<?php echo esc_attr( strip_tags( sprintf( '%s %s %s', $condition_html['field'], $condition_html['operator'], $condition_html['value'] ) ) ); ?>">
<?php
if ( $j ) {
echo '<span class="ig-es-condition-type ig-es-condition-operators text-xs font-medium text-gray-400 tracking-wide uppercase mt-1 mr-1">' . esc_html__( ' or', 'email-subscribers' ) . '</span>';
}
?>
<span class="ig-es-condition-type ig-es-condition-field mt-1"><?php echo wp_kses( $condition_html['field'], $allowedtags ); ?></span>
<span class="ig-es-condition-type ig-es-condition-operator mt-1"><?php echo wp_kses( $condition_html['operator'], $allowedtags ); ?></span>
<span class="ig-es-condition-type ig-es-condition-value mt-1 pl-2"><?php echo wp_kses( $condition_html['value'], $allowedtags ); ?></span>
</div>
<?php
endforeach;
if ( $i && count( $condition_group ) > 1 ) {
echo '<span class="float-left pr-1 text-xs font-medium text-gray-400 tracking-wide uppercase mt-1">' . esc_html__( ') ', 'email-subscribers' ) . '</span>';
}
?>
</div>
<?php
endif;
endforeach;
?>
</div>
<?php
endif;
?>
<?php
}
/**
* Get field operator
*
* @return string $operator Field operator
*/
public function get_field_operator( $operator ) {
$operator = esc_sql( stripslashes( $operator ) );
switch ( $operator ) {
case '=':
return 'is';
case '!=':
return 'is_not';
case '<>':
return 'contains';
case '!<>':
return 'contains_not';
case '^':
return 'begin_with';
case '$':
return 'end_with';
case '>=':
return 'is_greater_equal';
case '<=':
return 'is_smaller_equal';
case '>':
return 'is_greater';
case '<':
return 'is_smaller';
case '%':
return 'pattern';
case '!%':
return 'not_pattern';
}
return $operator;
}
/**
* Get condition HTML
*
* @return string Get condition HTML
*/
private function get_condition_html( $condition, $formated = true ) {
$field = isset( $condition['field'] ) ? $condition['field'] : ( isset( $condition[0] ) ? $condition[0] : '' );
$operator = isset( $condition['operator'] ) ? $condition['operator'] : ( isset( $condition[1] ) ? $condition[1] : '' );
$value = stripslashes_deep( isset( $condition['value'] ) ? $condition['value'] : ( isset( $condition[2] ) ? $condition[2] : '' ) );
$return = array(
'field' => '<span class="leading-5 text-gray-700 text-sm tracking-wide mr-1">' . $this->nice_name( $field, 'field', $field ) . '</span>',
'operator' => '',
'value' => '',
);
$opening_quote = esc_html_x( '&#8220;', 'opening curly double quote', 'email-subscribers' );
$closing_quote = esc_html_x( '&#8221;', 'closing curly double quote', 'email-subscribers' );
if ( isset( $this->campaign_rules['Campaign'][ $field ] ) ) {
if ( ! is_array( $value ) ) {
$value = array( $value );
}
$return['value'] = '<span class="font-medium text-gray-500 tracking-wide mr-1">' . $opening_quote . implode( $closing_quote . ' </span><span class="uppercase text-gray-400 pr-1 text-xs font-medium tracking-wide mt-1 mr-1">' . esc_html__( 'or', 'email-subscribers' ) . ' </span><span class="font-medium text-gray-500 tracking-wide mr-1"> ' . $opening_quote, array_map( array( $this, 'get_campaign_name' ), $value ) ) . $closing_quote . '</span>';
} elseif ( isset( $this->campaign_rules['List'][ $field ] ) ) {
if ( ! is_array( $value ) ) {
$value = array( $value );
}
$return['value'] = '<span class="font-medium text-gray-500 tracking-wide mr-1">' . $opening_quote . implode( $closing_quote . ' </span><span class="uppercase text-gray-400 pr-1 text-xs font-medium tracking-wide mt-1 mr-1">' . esc_html__( 'or', 'email-subscribers' ) . ' </span><span class="font-medium text-gray-500 tracking-wide mr-1"> ' . $opening_quote, array_map( array( $this, 'get_list_name' ), $value ) ) . $closing_quote . '</span>';
} elseif ( 'country_code' === $field ) {
if ( ! is_array( $value ) ) {
$value = array( $value );
}
$return['operator'] = '<em>' . $this->nice_name( $operator, 'operator', $field ) . '</em>';
$return['value'] = $opening_quote . implode( $closing_quote . ' ' . esc_html__( 'or', 'email-subscribers' ) . ' ' . $opening_quote, array_map( array( $this, 'get_country_name' ), $value ) ) . $closing_quote;
} elseif ( 'bounce_status' === $field ) {
if ( ! is_array( $value ) ) {
$value = array( $value );
}
$return['operator'] = '<em>' . $this->nice_name( $operator, 'operator', $field ) . '</em>';
$return['value'] = $opening_quote . implode( $closing_quote . ' ' . esc_html__( 'or', 'email-subscribers' ) . ' ' . $opening_quote, array_map( array( $this, 'get_bounce_status_name' ), $value ) ) . $closing_quote;
} elseif ( false !== strpos( $field, 'cf_' ) ) {
if ( ! is_array( $value ) ) {
$value = array( $value );
}
$return['operator'] = '<em>' . $this->nice_name( $operator, 'operator', $field ) . '</em>';
$return['value'] = $opening_quote . implode( $closing_quote . ' ' . esc_html__( 'or', 'email-subscribers' ) . ' ' . $opening_quote, $value ) . $closing_quote;
} else {
$return['operator'] = '<em>' . $this->nice_name( $operator, 'operator', $field ) . '</em>';
$return['value'] = $opening_quote . '<span class="font-medium text-gray-500 tracking-wide mr-1">' . $this->nice_name( $value, 'value', $field ) . '</span>' . $closing_quote;
}
return $formated ? $return : strip_tags( $return );
}
/**
* Get names for field, operator and value
*
* @return string Formatted string
*/
private function nice_name( $string, $type = null, $field = null ) {
switch ( $type ) {
case 'field':
foreach ( $this->campaign_rules as $rule_group => $rules ) {
foreach ( $rules as $rule_slug => $rule ) {
if ( $string === $rule_slug ) {
return $rule['name'];
}
}
}
break;
case 'operator':
if ( isset( $this->operators[ $string ] ) ) {
return $this->operators[ $string ];
}
if ( 'AND' == $string ) {
return esc_html__( 'and', 'email-subscribers' );
}
if ( 'OR' == $string ) {
return esc_html__( 'or', 'email-subscribers' );
}
break;
}
return $string;
}
/**
* Get list of campaign rules
*
* @return array List of campaign rules
*/
public static function get_campaign_rules() {
$campaign_rules = array(
'List' => array(
'_lists__in' => array(
'name' => esc_html__( 'is in List', 'email-subscribers' ),
),
),
);
$campaign_rules = apply_filters( 'ig_es_campaign_rules', $campaign_rules );
return $campaign_rules;
}
/**
* Get list of subscribers data based rules
*
* @return array List of subscribers data based rules
*/
private function get_fields() {
$fields = array(
'email' => esc_html__( 'Email', 'email-subscribers' ),
'country_code' => esc_html__( 'Country', 'email-subscribers' ),
);
return $fields;
}
/**
* Get list of campaign related rules
*
* @return array List of aggregate campaigns related rules
*/
private function get_campaign_related() {
return array(
'_sent' => esc_html__( 'has received', 'email-subscribers' ),
'_sent__not_in' => esc_html__( 'has not received', 'email-subscribers' ),
'_open' => esc_html__( 'has received and opened', 'email-subscribers' ),
'_open__not_in' => esc_html__( 'has received but not opened', 'email-subscribers' ),
'_click' => esc_html__( 'has received and clicked', 'email-subscribers' ),
'_click__not_in' => esc_html__( 'has received and not clicked', 'email-subscribers' ),
);
}
/**
* Get list of aggregate campaigns related rules
*
* @return array List of aggregate campaigns related rules
*/
private function get_aggregate_campaigns() {
return array(
'_last_5' => esc_html__( 'Any of the Last 5 Campaigns', 'email-subscribers' ),
'_last_7_day' => esc_html__( 'Any Campaigns within the last 7 days', 'email-subscribers' ),
'_last_1_month' => esc_html__( 'Any Campaigns within the last 1 month', 'email-subscribers' ),
'_last_3_months' => esc_html__( 'Any Campaigns within the last 3 months', 'email-subscribers' ),
'_last_6_months' => esc_html__( 'Any Campaigns within the last 6 months', 'email-subscribers' ),
'_last_12_months' => esc_html__( 'Any Campaigns within the last 12 months', 'email-subscribers' ),
);
}
/**
* Get list of comparison operators
*
* @return array List of comparison operators
*/
public function get_operators() {
return array(
'is' => esc_html__( 'is', 'email-subscribers' ),
'is_not' => esc_html__( 'is not', 'email-subscribers' ),
'contains' => esc_html__( 'contains', 'email-subscribers' ),
'contains_not' => esc_html__( 'contains not', 'email-subscribers' ),
'begin_with' => esc_html__( 'begins with', 'email-subscribers' ),
'end_with' => esc_html__( 'ends with', 'email-subscribers' ),
'is_greater' => esc_html__( 'is greater than', 'email-subscribers' ),
'is_smaller' => esc_html__( 'is smaller than', 'email-subscribers' ),
'is_greater_equal' => esc_html__( 'is greater or equal', 'email-subscribers' ),
'is_smaller_equal' => esc_html__( 'is smaller or equal', 'email-subscribers' ),
'pattern' => esc_html__( 'match regex pattern', 'email-subscribers' ),
'not_pattern' => esc_html__( 'does not match regex pattern', 'email-subscribers' ),
);
}
/**
* Get list of simple operators
*
* @return array Simple operators
*/
public function get_simple_operators() {
return array(
'is' => esc_html__( 'is', 'email-subscribers' ),
'is_not' => esc_html__( 'is not', 'email-subscribers' ),
'is_greater' => esc_html__( 'is greater than', 'email-subscribers' ),
'is_smaller' => esc_html__( 'is smaller than', 'email-subscribers' ),
'is_greater_equal' => esc_html__( 'is greater or equal', 'email-subscribers' ),
'is_smaller_equal' => esc_html__( 'is smaller or equal', 'email-subscribers' ),
);
}
/**
* Get list of string operators
*
* @return array String operators
*/
public function get_string_operators() {
return array(
'is' => esc_html__( 'is', 'email-subscribers' ),
'is_not' => esc_html__( 'is not', 'email-subscribers' ),
'contains' => esc_html__( 'contains', 'email-subscribers' ),
'contains_not' => esc_html__( 'contains not', 'email-subscribers' ),
'begin_with' => esc_html__( 'begins with', 'email-subscribers' ),
'end_with' => esc_html__( 'ends with', 'email-subscribers' ),
'pattern' => esc_html__( 'match regex pattern', 'email-subscribers' ),
'not_pattern' => esc_html__( 'does not match regex pattern', 'email-subscribers' ),
);
}
/**
* Get list of boolean operators
*
* @return array Boolean operator
*/
public function get_bool_operators() {
return array(
'is' => esc_html__( 'is', 'email-subscribers' ),
'is_not' => esc_html__( 'is not', 'email-subscribers' ),
);
}
/**
* Get campaign name
*
* @param int $campaign_id Campaign ID
*
* @return string $name Campaign name
*/
public function get_campaign_name( $campaign_id ) {
if ( ! $campaign_id ) {
return esc_html__( 'Any campaign', 'email-subscribers' );
}
if ( isset( $this->aggregate_campaigns[ $campaign_id ] ) ) {
return $this->aggregate_campaigns[ $campaign_id ];
}
$campaign = ES()->campaigns_db->get( $campaign_id );
if ( empty( $campaign['name'] ) ) {
$name = '#' . $campaign_id;
} else {
$name = $campaign['name'];
}
return '<span class="campaign-name" data-campaign-id="' . esc_attr( $campaign_id ) . '">' . $name . '</span>';
}
/**
* Get list name
*
* @param int $list_id list ID
*
* @return string $list_name list name
*/
public function get_list_name( $list_id ) {
if ( ! $list_id ) {
return esc_html__( 'Any list', 'email-subscribers' );
}
$lists = ES()->lists_db->get_list_id_name_map();
$list_name = isset( $lists[ $list_id ] ) ? $lists[ $list_id ] : $list_id;
return $list_name;
}
/**
* Get bounce status
*
* @param string $bounce_status bounce status code
*
* @return string bounce status
*/
public function get_bounce_status_name( $bounce_status ) {
switch ( $bounce_status ) {
case '2':
return esc_html__( 'Hard bounced', 'email-subscribers' );
case '1':
return esc_html__( 'Soft bounced', 'email-subscribers' );
case '0':
return esc_html__( 'Un-bounced', 'email-subscribers' );
default:
return esc_html__( 'Any status', 'email-subscribers' );
}
}
/**
* Get country name
*
* @param string $code country code
*
* @return string $country_name country name
*/
public function get_country_name( $code ) {
$country_name = ES_Geolocation::get_country_name_from_country_code( $code );
return $country_name;
}
/**
* Remove empty conditions from campaign data
* We check condition field and condition value to check for empty conditions
*
* @param array $conditions_data
*
* @return array $conditions_data
*/
public static function remove_empty_conditions( $conditions_data = array() ) {
if ( ! empty( $conditions_data ) ) {
$list_conditions = $conditions_data;
foreach ( $list_conditions as $i => $and_cond ) {
foreach ( $and_cond as $j => $cond ) {
if ( ! isset( $list_conditions[ $i ][ $j ]['field'] ) || ! isset( $list_conditions[ $i ][ $j ]['value'] ) ) {
unset( $list_conditions[ $i ][ $j ] );
} elseif ( is_array( $list_conditions[ $i ][ $j ]['value'] ) ) {
$list_conditions[ $i ][ $j ]['value'] = array_values( array_unique( $list_conditions[ $i ][ $j ]['value'] ) );
}
}
}
// Remove any empty value array.
$conditions_data = array_values( array_filter( $list_conditions ) );
}
return $conditions_data;
}
}
}
new IG_ES_Campaign_Rules();

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,201 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url("Inter-Thin.woff2?v=3.19") format("woff2"),
url("Inter-Thin.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url("Inter-ThinItalic.woff2?v=3.19") format("woff2"),
url("Inter-ThinItalic.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 200;
font-display: swap;
src: url("Inter-ExtraLight.woff2?v=3.19") format("woff2"),
url("Inter-ExtraLight.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 200;
font-display: swap;
src: url("Inter-ExtraLightItalic.woff2?v=3.19") format("woff2"),
url("Inter-ExtraLightItalic.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url("Inter-Light.woff2?v=3.19") format("woff2"),
url("Inter-Light.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url("Inter-LightItalic.woff2?v=3.19") format("woff2"),
url("Inter-LightItalic.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("Inter-Regular.woff2?v=3.19") format("woff2"),
url("Inter-Regular.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url("Inter-Italic.woff2?v=3.19") format("woff2"),
url("Inter-Italic.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("Inter-Medium.woff2?v=3.19") format("woff2"),
url("Inter-Medium.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url("Inter-MediumItalic.woff2?v=3.19") format("woff2"),
url("Inter-MediumItalic.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("Inter-SemiBold.woff2?v=3.19") format("woff2"),
url("Inter-SemiBold.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url("Inter-SemiBoldItalic.woff2?v=3.19") format("woff2"),
url("Inter-SemiBoldItalic.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("Inter-Bold.woff2?v=3.19") format("woff2"),
url("Inter-Bold.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url("Inter-BoldItalic.woff2?v=3.19") format("woff2"),
url("Inter-BoldItalic.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 800;
font-display: swap;
src: url("Inter-ExtraBold.woff2?v=3.19") format("woff2"),
url("Inter-ExtraBold.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 800;
font-display: swap;
src: url("Inter-ExtraBoldItalic.woff2?v=3.19") format("woff2"),
url("Inter-ExtraBoldItalic.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url("Inter-Black.woff2?v=3.19") format("woff2"),
url("Inter-Black.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url("Inter-BlackItalic.woff2?v=3.19") format("woff2"),
url("Inter-BlackItalic.woff?v=3.19") format("woff");
}
/* -------------------------------------------------------
Variable font.
Usage:
html { font-family: 'Inter', sans-serif; }
@supports (font-variation-settings: normal) {
html { font-family: 'Inter var', sans-serif; }
}
*/
@font-face {
font-family: 'Inter var';
font-weight: 100 900;
font-display: swap;
font-style: normal;
font-named-instance: 'Regular';
src: url("Inter-roman.var.woff2?v=3.19") format("woff2");
}
@font-face {
font-family: 'Inter var';
font-weight: 100 900;
font-display: swap;
font-style: italic;
font-named-instance: 'Italic';
src: url("Inter-italic.var.woff2?v=3.19") format("woff2");
}
/* --------------------------------------------------------------------------
[EXPERIMENTAL] Multi-axis, single variable font.
Slant axis is not yet widely supported (as of February 2019) and thus this
multi-axis single variable font is opt-in rather than the default.
When using this, you will probably need to set font-variation-settings
explicitly, e.g.
* { font-variation-settings: "slnt" 0deg }
.italic { font-variation-settings: "slnt" 10deg }
*/
@font-face {
font-family: 'Inter var experimental';
font-weight: 100 900;
font-display: swap;
font-style: oblique 0deg 10deg;
src: url("Inter.var.woff2?v=3.19") format("woff2");
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
.es-form-field-container .gjs-row {
display: flex;
justify-content: flex-start;
align-items: stretch;
flex-wrap: nowrap;
}
.es-form-field-container .gjs-cell {
flex-grow: 1;
flex-basis: 100%;
}
.es-form-field-container .gjs-cell[data-highlightable="1"]:empty {
border: 1px dashed #ccc;
height: 30px;
}
.es-form-field-container .gjs-row .gjs-cell input[type="checkbox"],
.es-form-field-container .gjs-row .gjs-cell input[type="radio"] {
margin-top: 0px;
margin-right: 5px;
margin-bottom: 0px;
margin-left: 0px;
width: auto;
}

View File

@@ -0,0 +1,13 @@
.es-form-field-container .gjs-row {
margin-bottom: 0.6em;
}
.es-form-field-container label.es-field-label {
display: block;
}
@media (max-width: 320px) {
.es-form-field-container {
padding: 1rem;
}
}

View File

@@ -0,0 +1,3 @@
.es_spinner_image {
display: none;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,84 @@
/**
* jQuery Timepicker
* http://timepicker.co
*
* Enhances standard form input fields helping users to select (or type) times.
*
* Copyright (c) 2016 Willington Vega; Licensed MIT, GPL
*/
.ui-timepicker-container {
position: absolute;
overflow: hidden;
box-sizing: border-box;
}
.ui-timepicker {
box-sizing: content-box;
display: block;
height: 205px;
list-style: none outside none;
margin: 0;
padding: 0 1px;
text-align: center;
}
.ui-timepicker-viewport {
box-sizing: content-box;
display: block;
height: 205px;
margin: 0;
padding: 0;
overflow: auto;
overflow-x: hidden; /* IE */
}
.ui-timepicker-standard {
/* overwrites .ui-widget */
font-family: Verdana,Arial,sans-serif;
font-size: 1.1em;
/* overwrites .ui-widget-content */
background-color: #FFF;
border: 1px solid #AAA;
color: #222;
/* overwrites .ui-menu */
margin: 0;
padding: 2px;
}
.ui-timepicker-standard a {
border: 1px solid transparent;
color: #222;
display: block;
padding: 0.2em 0.4em;
text-decoration: none;
}
.ui-timepicker-standard .ui-state-hover {
/* overwrites .ui-state-hover */
background-color: #DADADA;
border: 1px solid #999;
font-weight: normal;
color: #212121;
}
.ui-timepicker-standard .ui-menu-item {
/* overwrites .ui-menu and .ui-menu-item */
/*clear: left;
float: left;*/
margin: 0;
padding: 0;
}
.ui-timepicker-corners,
.ui-timepicker-corners .ui-corner-all {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
}
.ui-timepicker-hidden {
/* overwrites .ui-helper-hidden */
display: none;
}
.ui-timepicker-no-scrollbar .ui-timepicker {
border: none;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,676 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--brand-color: #5e19cf; /*brand color*/
--brand-color-2 : #7230DF; /*brand color 2*/
--secondary: #f9f6ff; /*CTA bg light gray*/
--light-gray: #f8f8f8; /*BG light gray*/
--lighter-gray: #ececec; /*border light gray*/
--tab-bg: #f7f6f8; /*tab bg*/
}
@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("./fonts/inter/Inter-Regular.woff2") format("woff2"),
url("./fonts/inter/Inter-Regular.woff") format("woff");
}
@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("./fonts/inter/Inter-SemiBold.woff2") format("woff2"),
url("./fonts/inter/Inter-SemiBold.woff") format("woff");
}
@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("./fonts/inter/Inter-Bold.woff2") format("woff2"),
url("./fonts/inter/Inter-Bold.woff") format("woff");
}
@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("./fonts/inter/Inter-Medium.woff2") format("woff2"),
url("./fonts/inter/Inter-Medium.woff") format("woff");
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
label,
button,
li,
span,
table td
{
font-family: "Inter", sans-serif;
}
@layer components {
h1 {
@apply font-semibold text-lg;
}
h2 {
@apply font-semibold text-sm;
}
p {
@apply text-sm;
}
header {
@apply bg-white;
}
nav {
@apply mx-auto flex max-w-full items-center justify-between gap-x-6 px-5 border-b-2 border-lighter-gray;
.brand-logo {
@apply flex lg:flex-1;
.divide {
@apply w-5 h-px rotate-90 border border-lighter-gray;
}
span {
@apply -m-1.5 p-1.5 flex items-center gap-2.5;
img {
@apply h-8 w-auto;
}
}
}
.links, .ig-es-nav-tabs {
@apply flex gap-x-5 md:gap-x-8 xl:gap-x-12;
a {
@apply text-sm leading-6 text-gray-900 py-5;
}
}
.links{
a.active {
@apply border-b-2 font-semibold py-5 border-primary;
}
}
.ig-es-nav-tabs{
@apply gap-x-8;
a{
@apply px-2;
}
a.active {
@apply bg-gray-100;
}
}
.cta {
@apply flex flex-1 items-center justify-end gap-x-2.5;
}
}
button,
.tab {
@apply rounded-md px-4 py-2 text-sm font-semibold focus:ring-[0.5px] focus:ring-tertiary;
&.primary {
@apply bg-primary text-white hover:bg-tertiary;
}
&.secondary {
@apply bg-secondary text-gray-900 hover:ring-[0.5px] hover:ring-tertiary;
}
&.cross {
@apply rounded-md bg-secondary px-0.5 text-gray-900 focus:ring-[0.5px] focus:ring-tertiary hover:ring-[0.5px] hover:ring-tertiary;
}
&.outline{
@apply bg-transparent text-white outline-none ring-[0.5px] ring-white focus:ring-[0.5px] focus:ring-tertiary hover:ring-[0.5px] hover:ring-tertiary;
}
&.white{
@apply bg-white hover:ring-[0.5px] hover:ring-tertiary;
}
}
select {
@apply py-1.5 px-3 text-sm bg-white border border-lighter-gray rounded-sm appearance-none truncate hover:border-light-gray focus:outline-none cursor-pointer focus:ring-[0.5px] focus:ring-tertiary hover:ring-[0.5px] hover:ring-tertiary !important;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
background-position: right 0.5rem center !important;
background-repeat: no-repeat !important;
background-size: 1.5rem 1.5rem !important;
/* option{
@apply bg-white !important;
} */
}
input[type="time"]{
@apply cursor-pointer;
}
/* main {
@apply space-y-5;
} */
#dropdown {
@apply z-10 w-40 bg-white divide-y divide-gray-100 rounded-lg shadow dark:bg-gray-700;
ul {
@apply py-2 text-sm text-gray-700 dark:text-gray-200;
li {
a {
@apply block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white;
}
}
}
}
.tabs {
@apply flex justify-between p-4 items-start;
ul {
@apply flex flex-row flex-wrap justify-start gap-3 items-start w-full;
}
.tab {
@apply font-normal text-xs border border-lighter-gray truncate;
background-color: var(--tab-bg);
&.active, &:hover {
@apply bg-white font-medium ring-[0.5px] ring-tertiary;
}
}
}
.templates {
@apply flex flex-row gap-5 px-5 pb-5 justify-start w-full flex-wrap;
.create-new{
@apply flex flex-col text-center items-center w-60 max-w-xs justify-center rounded-md outline-2 outline-dashed outline-lighter-gray p-5 space-y-8;
background-color: var(--tab-bg);
}
.ig-es-card {
@apply rounded-md w-60 max-w-xs border border-lighter-gray overflow-hidden;
height: 350px;
background-color: var(--tab-bg);
.card-head {
background-image: url('data:image/svg+xml,<svg width="240" height="131" viewBox="0 0 240 131" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.8" d="M73.3763 45.7677C168.735 42.6747 170.508 75.1248 176.424 93.7568C188.998 119.214 208.95 131.193 269.498 130.966L267.014 -5.53127L0.653799 -4.53028C-2.58553 22.7607 17.2441 46.8768 73.3763 45.7677Z" fill="%23EBE5F7"/></svg>');
@apply mx-auto py-1.5 w-full bg-no-repeat bg-right-top bg-contain opacity-80 relative h-2/3;
.group{
@apply w-full h-full;
}
img {
@apply mx-auto my-2 relative object-contain;
width:99%;
height:90%;
}
svg{
}
}
.card-desc{
@apply py-5 px-3 space-y-4 bg-white h-1/3;
.title{
@apply flex flex-row justify-between items-center;
}
ul.meta-tags{
@apply flex flex-row gap-2.5 justify-start items-center;
li{
@apply px-2 py-1 rounded-sm font-normal text-xs truncate;
}
}
.saved{
button{
@apply focus:ring-0 px-0;
}
}
}
}
}
.dropdown {
@apply relative inline-block text-left w-full;
button.dropdown-button {
@apply inline-flex w-full justify-between gap-x-1.5 rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50;
}
.dropdown-menu {
@apply left-0 z-30 mt-2 origin-top-left rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-transform transform duration-100;
p.heading {
@apply truncate text-sm px-4 py-2 bg-gray-100 text-gray-900;
}
a {
@apply text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100 hover:text-gray-900 active:bg-gray-100 active:text-gray-900;
}
}
}
.template-editor {
@apply w-2/3 flex flex-col gap-5 border-r-2 border-lighter-gray overflow-y-auto;
&.dnd-editor {
@apply p-5 w-2/3;
}
.tags-list-hidden {
display: none !important;
}
.all-tags {
@apply flex justify-between items-start w-full rounded-sm p-3 bg-light-gray;
li {
@apply bg-white text-gray-600 py-2 px-3 rounded-sm;
span {
@apply font-medium text-xs;
}
}
}
.inline-editor {
@apply flex font-medium border-b border-t border-lighter-gray justify-between items-center flex-row text-sm p-5;
background-color: var(--light-gray);
.editor-cta:hover {
color: var(--brand-color);
}
}
}
.template-editor,
.sidebar,
.form-fields{
label {
@apply block text-sm font-medium leading-6 text-gray-900;
}
input:not([type="radio"]) {
@apply block w-full rounded-sm border-0 py-1.5 text-gray-900 shadow-sm ring-[0.5px] ring-inset ring-lighter-gray placeholder:text-gray-400 focus:ring-1 focus:ring-inset focus:ring-tertiary sm:text-sm sm:leading-6;
}
input[type="radio"]:checked {
@apply bg-primary;
}
}
.sidebar {
@apply flex flex-col w-1/3 right-0 bg-light-gray;
.side-editor{
@apply w-full bg-white;
}
.switch {
@apply flex justify-between px-8 py-3 border-b-2 border-lighter-gray;
}
p {
@apply text-sm font-medium;
}
a {
@apply text-xs font-medium hover:underline hover:text-primary;
}
nav {
@apply bg-white;
.links {
@apply gap-0;
a {
@apply py-2.5;
}
a.active {
@apply py-2.5;
}
}
}
.nav-child {
@apply bg-white;
}
.ig-es-post-settings {
@apply px-8 pt-5;
background-color: var(--light-gray);
}
.ig-es-campaign-tags-list{
@apply bg-gray-50 border-b text-sm border-lighter-gray justify-between;
.campaign-tags-title{
@apply font-medium px-8 py-3 border-b border-lighter-gray cursor-pointer hover:bg-gray-100;
}
}
.all-tags {
@apply flex justify-between text-xs bg-white items-start w-full rounded-sm p-3;
ul {
@apply flex flex-wrap gap-3;
}
li {
@apply text-gray-600 py-1 px-3 rounded-sm;
background-color: var(--light-gray);
}
svg {
@apply cursor-pointer -mt-1 ml-2 w-3.5 h-3.5 inline-flex;
}
}
a {
@apply text-xs font-medium hover:underline hover:text-primary;
}
.radio-section {
@apply p-3 rounded-sm;
background-color: white;
}
input[type="radio"] {
@apply -mt-1;
}
.ig-es-grid-division {
@apply text-center px-4 py-1 hover:bg-gray-100;
}
}
.overview {
@apply flex flex-col bg-white space-y-5 p-4 mt-5 mr-5 border border-lighter-gray rounded-md;
.kpi {
@apply flex justify-between w-full px-3 py-2 items-center rounded-md bg-light-gray;
.stats {
@apply flex flex-col space-y-1.5;
}
.kpi-title {
@apply text-xs font-medium text-gray-500;
}
.kpi-stats {
@apply text-lg font-semibold;
}
.change {
@apply rounded-full flex flex-row space-x-0.5 px-1.5 py-0.5 items-center;
&.up {
@apply text-green-600 bg-green-600/20;
}
&.down {
@apply text-red-600 bg-red-600/20;
}
span.value {
@apply font-semibold text-xs;
}
}
}
}
.dot {
@apply w-1.5 h-1.5 rounded-full mr-1;
}
.search-icon {
@apply absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none;
}
.search {
@apply block w-full px-4 py-1.5 pl-10 text-sm text-gray-900 border border-gray-300 rounded-sm bg-white focus:ring-[0.5px] focus:ring-tertiary !important;
}
.ig-es-list-table {
@apply flex flex-col bg-white space-y-5 p-4 mt-5;
.table {
@apply -mx-4 ring-1 ring-lighter-gray sm:mx-0 sm:rounded-sm w-full;
table {
@apply min-w-full divide-y divide-lighter-gray w-full;
}
input.checkbox {
@apply absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 focus:ring-transparent text-primary;
}
thead {
@apply text-xs font-medium text-gray-600;
th:first-of-type {
@apply relative px-7 sm:w-12 sm:px-6;
}
th:nth-child(2) {
@apply py-2 pl-4 pr-3 text-left sm:pl-6;
}
th {
@apply px-3 py-2 text-left lg:table-cell;
}
th:nth-child(6) {
@apply px-3 py-2 text-center lg:table-cell;
}
th:last-of-type {
@apply relative py-2 pl-3 pr-4 sm:pr-6 text-right;
}
}
tbody {
@apply divide-y divide-lighter-gray;
td:first-of-type {
@apply relative px-7 sm:w-12 sm:px-6;
}
td:nth-child(2) {
@apply relative py-4 pl-4 pr-3 text-sm sm:pl-6;
}
td {
@apply px-3 py-3.5 text-sm text-gray-800 lg:table-cell text-[15px];
}
td:nth-child(6) {
@apply px-3 py-3.5 text-sm text-center text-gray-500;
}
td:last-of-type {
@apply relative py-3.5 pl-3 pr-4 text-right text-sm font-medium sm:pr-6;
}
.list-item {
@apply flex flex-row space-x-2.5 items-center;
.avatar {
@apply bg-lighter-gray rounded-md p-4;
img {
@apply h-full w-full max-w-full overflow-hidden max-h-full object-contain;
}
}
.item-details {
@apply flex flex-col gap-1.5;
p {
@apply font-semibold text-[15px];
}
.item-meta {
@apply flex flex-col text-gray-400 text-[13px];
}
}
}
.status {
@apply flex flex-col gap-1.5 text-center mx-auto justify-center items-center;
p {
@apply font-semibold inline-flex items-center text-[15px];
}
.sub-text {
@apply text-gray-400 text-[13px];
}
}
}
}
}
.ig-es-popup-container{
@apply fixed inset-x-0 bottom-0 sm:inset-0 sm:flex sm:items-center sm:justify-center fixed inset-0 transition-opacity;
z-index: 999999;
}
.ig-es-popup-overlay{
@apply absolute inset-0 bg-gray-500 opacity-75;
}
.ig-es-popup{
@apply font-medium relative overflow-hidden rounded bg-white text-left shadow-xl sm:my-8 sm:max-w-3xl;
.ig-es-popup-title{
@apply px-6 py-3;
}
.ig-es-popup-close-container{
@apply absolute right-3 top-3;
.cross{
@apply px-0.5 py-1 !important;
}
}
.ig-es-popup-close-cta{
@apply rounded text-gray-700 hover:text-gray-900 focus:outline-none bg-gray-100 p-0;
}
.ig-es-popup-cta-container{
@apply p-3 float-right;
}
.ig-es-new-campaign-type-tab{
@apply cursor-pointer p-6 text-center rounded bg-white hover:scale-105 hover:shadow-md;
}
.ig-es-campaign-type-title{
@apply pt-4 text-sm font-medium;
}
h3.modal-headline{
@apply text-base font-semibold leading-6 text-gray-900;
}
}
}
#timePickerDropdown {
top: 100%;
}
/* Custom Dropdown Arrow */
#timePicker::after {
content: "▼";
position: absolute;
top: 50%;
right: 0.75rem;
transform: translateY(-50%);
}
/* Responsive Breakpoints (optional) */
@media (max-width: 640px) {
#timePickerDropdown {
width: 100%;
left: 0;
}
}
.select2-container {
@apply text-sm !important;
width: 100% !important;
}
.select2-container--default .select2-selection--multiple {
@apply text-black !important;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='color: rgb(156 163 175 /1)' viewBox='0 0 20 20' fill='currentColor' aria-hidden='true'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'%3E%3C/path%3E%3C/svg%3E");
background-size: 1.25rem;
background-position: calc(100% - 0.45rem);
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
background-repeat: no-repeat;
border: 1px solid var(--lighter-gray) !important;
border-radius: 0.125rem !important;
padding-left: 0.35rem !important;
padding-right: 0.75rem !important;
}
.select2-results__option {
@apply pr-5 align-middle;
}
.select2-container--default
.select2-results__option--highlighted.select2-results__option--selectable {
@apply text-gray-600 bg-white !important;
}
.select2-container--default
.select2-results__option--highlighted.select2-results__option--selectable:hover {
@apply text-gray-600 !important;
background-color: var(--light-gray);
}
.select2-container--default .select2-results__option--selected {
@apply bg-white !important;
}
.select2-results__option:before {
@apply inline-block relative bg-white h-5 w-5 ml-1 mr-3 rounded align-middle border-2 border-solid;
content: "";
}
.select2-results__option[aria-selected="true"]:before,
.select2-container--default .select2-results__option--selected:before {
@apply text-white border-0 inline-block pr-0.5;
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
background-color: var(--brand-color);
}
.select2-container--default
.select2-selection--multiple
.select2-selection__choice {
@apply pl-1 border-0 text-sm !important;
background-color: var(--light-gray) !important;
}
.select2-selection__choice__remove {
@apply float-right border-0 relative !important;
}
.icegram-express_page_es_gallery, .icegram-express_page_es_campaigns{
#wpcontent{
padding-left: 0;
background-color: white;
}
}
.wp-core-ui select {
background-image: url('data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e') !important;
background-position: right 0.5rem center !important;
background-repeat: no-repeat !important;
background-size: 1.5rem 1.5rem !important;
}
.icegram-express_page_es_campaigns [data-placeholder]::after {
content: " ";
box-shadow: 0 0 50px 9px rgba(254,254,254);
position: absolute;
top: 0;
left: -100%;
height: 100%;
animation: load 1s infinite;
}
@keyframes load {
0%{ left: -100%}
100%{ left: 150%}
}
/* Editor CSS by Kaushal START */
.gjs-block:hover{
box-shadow: 0 1px 8px -1px var(--brand-color-2) , 0 1px 2px -1px rgb(0 0 0 / 0.1);
}
.gjs-block-categories{
nav{
@apply mx-0;
.links{
@apply w-full;
a{
@apply w-full text-center;
}
}
}
.gjs-blocks-c.active{
@apply grid grid-cols-3 gap-4 p-5 bg-light-gray;
.gjs-block{
@apply w-full m-0 items-center space-y-3.5;
.gjs-block-media{
svg{
@apply w-6 h-6;
}
}
.gjs-block-label{
@apply text-[13px] font-medium font-inter;
}
}
}
}
.prev-sector-cta{
@apply bg-white -mx-4 px-4 py-1.5 flex justify-start gap-2 items-start;
a{
@apply p-1 rounded-md bg-secondary;
}
span{
@apply text-sm font-medium font-inter;
}
}
.ig-es-color-picker{
@apply flex w-auto items-center;
input{
@apply w-auto;
}
.ig-es-color-picker-input{
input{
@apply pr-1.5 py-0 h-8 w-8 !important;
}
}
}
.es-sidebar{
.gjs-field-composite{
@apply bg-light-gray !important;
}
.gjs-sm-sector{
@apply bg-light-gray;
}
.gjs-field input:not([type="radio"]), .gjs-field select, .gjs-field textarea, {
@apply block w-full rounded-sm bg-white border-0 py-1 text-gray-900 shadow-sm ring-[0.5px] ring-inset ring-lighter-gray placeholder:text-gray-400 focus:ring-[0.5px] focus:ring-inset focus:ring-tertiary sm:text-[13px] font-inter font-normal sm:leading-6;
}
.gjs-sm-properties{
@apply bg-light-gray px-0 border-b-2 border-lighter-gray;
}
.gjs-sm-title{
@apply text-sm font-semibold my-2;
}
.gjs-sm-label{
@apply mt-0.5 text-[13px] font-inter font-medium w-full justify-between items-start !important;
}
.gjs-label{
@apply text-xs font-medium font-inter;
}
.gjs-fields, .gjs-field{
@apply w-full;
}
}
/* Editor CSS by Kaushal END */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="#E5E7EB"/>
</svg>

After

Width:  |  Height:  |  Size: 166 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 180"><path d="M84.4 65.4c0 3.7.4 6.7 1.1 8.9.8 2.2 1.8 4.6 3.2 7.2.5.8.7 1.6.7 2.3 0 1-.6 2-1.9 3L81.2 91c-.9.6-1.8.9-2.6.9-1 0-2-.5-3-1.4a31 31 0 01-3.6-4.7l-3.1-5.9a37 37 0 01-29.4 13.8c-8.4 0-15.1-2.4-20-7.2a25.7 25.7 0 01-7.4-19.2c0-8.5 3-15.4 9.1-20.6s14.2-7.8 24.5-7.8c3.4 0 6.9.3 10.6.8s7.5 1.3 11.5 2.2v-7.3c0-7.6-1.6-12.9-4.7-16-3.2-3.1-8.6-4.6-16.3-4.6-3.5 0-7.1.4-10.8 1.3A79.7 79.7 0 0021.7 20l-1.6.3c-1.4 0-2.1-1-2.1-3.1v-4.9c0-1.6.2-2.8.7-3.5s1.4-1.4 2.8-2.1A60.6 60.6 0 0149.7.3C61.6.3 70.3 3 75.9 8.4c5.5 5.4 8.3 13.6 8.3 24.6v32.4h.2zM43.8 80.6c3.3 0 6.7-.6 10.3-1.8 3.6-1.2 6.8-3.4 9.5-6.4 1.6-1.9 2.8-4 3.4-6.4.6-2.4 1-5.3 1-8.7v-4.2a83.5 83.5 0 00-18.6-2.3c-6.7 0-11.6 1.3-14.9 4-3.3 2.7-4.9 6.5-4.9 11.5 0 4.7 1.2 8.2 3.7 10.6 2.4 2.5 5.9 3.7 10.5 3.7zm80.3 10.8c-1.8 0-3-.3-3.8-1-.8-.6-1.5-2-2.1-3.9L94.7 9.2c-.6-2-.9-3.3-.9-4 0-1.6.8-2.5 2.4-2.5h9.8c1.9 0 3.2.3 3.9 1 .8.6 1.4 2 2 3.9l16.8 66.2 15.6-66.2c.5-2 1.1-3.3 1.9-3.9.8-.6 2.2-1 4-1h8c1.9 0 3.2.3 4 1 .8.6 1.5 2 1.9 3.9l15.8 67 17.3-67c.6-2 1.3-3.3 2-3.9.8-.6 2.1-1 3.9-1h9.3c1.6 0 2.5.8 2.5 2.5l-.2 1.6-.7 2.5-24.1 77.3c-.6 2-1.3 3.3-2.1 3.9s-2.1 1-3.8 1h-8.6c-1.9 0-3.2-.3-4-1-.8-.7-1.5-2-1.9-4L154 22l-15.4 64.4c-.5 2-1.1 3.3-1.9 4-.8.7-2.2 1-4 1h-8.6zm128.5 2.7a66.2 66.2 0 01-26.9-5.8c-1.6-.9-2.7-1.9-3.1-2.8a7 7 0 01-.6-2.8v-5.1c0-2.1.8-3.1 2.3-3.1l1.8.3 2.5 1a54.4 54.4 0 0022.9 4.7 27 27 0 0014.6-3.3c3.4-2.2 5.2-5.4 5.2-9.5 0-2.8-.9-5.1-2.7-7a25 25 0 00-10.1-5.2L244 51a30.5 30.5 0 01-16-10.2A23.8 23.8 0 01232.9 7c3-2.3 6.4-4 10.4-5.2A43.6 43.6 0 01262.6.5l6.5 1.1 5.7 1.6c1.8.6 3.2 1.2 4.2 1.8 1.4.8 2.4 1.6 3 2.5.6.8.9 1.9.9 3.3v4.7c0 2.1-.8 3.2-2.3 3.2-.8 0-2.1-.4-3.8-1.2a45.7 45.7 0 00-19.2-3.9c-5.7 0-10.2.9-13.3 2.8-3.1 1.9-4.7 4.8-4.7 8.9 0 2.8 1 5.2 3 7.1 2 1.9 5.7 3.8 11 5.5l14.2 4.5c7.2 2.3 12.4 5.5 15.5 9.6s4.6 8.8 4.6 14c0 4.3-.9 8.2-2.6 11.6a26.9 26.9 0 01-7.3 8.8 32.2 32.2 0 01-11.1 5.6 47.6 47.6 0 01-14.3 2.1z" fill="#262f3e"/><path d="M271.5 142.7c-32.9 24.3-80.7 37.2-121.8 37.2A220.3 220.3 0 011 123.2c-3.1-2.8-.3-6.6 3.4-4.4a299.9 299.9 0 00148.8 39.5 297 297 0 00113.5-23.2c5.5-2.5 10.2 3.6 4.8 7.6zm13.7-15.6c-4.2-5.4-27.8-2.6-38.5-1.3-3.2.4-3.7-2.4-.8-4.5 18.8-13.2 49.7-9.4 53.3-5 3.6 4.5-1 35.4-18.6 50.2-2.7 2.3-5.3 1.1-4.1-1.9 4-9.9 12.9-32.2 8.7-37.5z" fill="#f59931"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 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: 3.8 KiB

View File

@@ -0,0 +1 @@
<svg image-rendering="optimizeQuality" shape-rendering="geometricPrecision" viewBox="0 0 140 42" xmlns="http://www.w3.org/2000/svg"><path d="M59.1 13.8c0-1.2-1-2.1-2.3-2.1-1.2 0-2.2 1-2.2 2.1s1 2.1 2.2 2.1 2.3-.9 2.3-2.1m-.2 17.4V17.8h-4.1v13.4zm12-.7l-1.3-3c-.4.3-1.1.5-1.8.5-1.4 0-2.5-1.4-2.5-3.6 0-2.3 1-3.6 2.5-3.6.7 0 1.3.2 1.8.5l1.3-2.9c-.9-.6-1.9-.9-3.7-.9-3.3 0-6.1 2.3-6.1 7s2.8 7 6.1 7c1.8 0 2.8-.4 3.7-1m13.3-6.7c0-3.7-2.1-6.3-6-6.3-4 0-6.4 2.9-6.4 7 0 4 2.3 7 6.9 7 2 0 4-.4 5.2-1l-1.1-3c-1 .5-2.4.8-3.8.8-1.7 0-2.9-.7-3.3-2.2L84 25c.2-.4.2-.8.2-1.2m-3.9-.8l-4.7.6c0-2.2 1.1-3.2 2.6-3.2 1.3 0 2.1.9 2.1 2.6m16.8 8.2V18.5c-1-.6-2.6-.9-4.2-.9-3.7 0-6.4 2.1-6.4 6.8 0 4.1 2.4 6.4 5.7 6.4 1 0 2.2-.3 2.9-.6v1.1c0 2.4-1.2 3.8-3.6 3.8-1.4 0-2.8-.4-3.7-.9l-.6 1.6c1 .5 2.7 1 4.5 1 3.4 0 5.4-2.1 5.4-5.6m-2-2.7c-.6.3-1.6.5-2.5.5-2.3 0-4-1.6-4-4.8 0-3.6 1.9-5 4.2-5 .9 0 1.8.2 2.3.4zm11.8-10.9c-.4-.1-.8-.1-1.3-.1-1.8 0-3.7.4-4.9.9v12.7h2.1V19.7c.6-.3 1.6-.4 2.5-.4.4 0 .8 0 1.2.1zM118 30.5v-8.6c0-3.2-2-4.4-5-4.4-1.7 0-3.4.5-4.4.9l.5 1.4c.9-.4 2.4-.8 3.7-.8 1.9 0 3.2.6 3.2 2.6v1c-4 .2-8.2.8-8.2 4.6 0 2.5 1.8 4.1 5.5 4.1 1.8.1 3.7-.3 4.7-.8m-2-1c-.5.2-1.7.4-2.7.4-2.3 0-3.5-1-3.5-2.6 0-2.8 3.2-3 6.2-3.1zm22.7 1.7v-9.4c0-2.6-1.8-4.3-4.6-4.3-1.9 0-3.5.8-4.4 1.5-.7-.8-2.2-1.5-4.3-1.5-1.7 0-3.3.4-4.6.9v12.7h2.1V19.7c.7-.3 1.6-.5 2.7-.5 1.9 0 3.1.9 3.1 2.4v9.5h2.1V20.4c.7-.7 1.7-1.1 2.9-1.1 1.7 0 2.9 1 2.9 2.8v9.2z" fill="#373435"/><path clip-rule="evenodd" d="M21.3 1c-11.1 0-20 9-20 20s9 20 20 20 20-9 20-20-8.9-20-20-20m0 6.3C13.8 7.3 7.7 13.4 7.7 21c0 2.6.7 4.9 1.9 7l-1.3 5.8c-.1.4.4.8.7.8l6-1.4c1.9 1 4.1 1.6 6.4 1.6C28.9 34.7 35 28.6 35 21S28.9 7.3 21.3 7.3m-5.6 7.5H27c.5 0 .9.4.9.9s-.4.9-.9.9H15.7c-.5 0-.9-.4-.9-.9s.4-.9.9-.9m0 5.4H27c.5 0 .9.4.9.9s-.4.9-.9.9H15.7c-.5 0-.9-.4-.9-.9s.4-.9.9-.9m0 5.4H27c.5 0 .9.4.9.9s-.4.9-.9.9H15.7c-.5 0-.9-.4-.9-.9s.4-.9.9-.9" fill="#32009d" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="171px" height="30px" viewBox="0 0 171 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
<title>MailerSend Copy 2</title>
<desc>Created with Sketch.</desc>
<g id="Website" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Desktop-HD-Copy-25" transform="translate(-230.000000, -30.000000)">
<g id="MailerSend-Copy-2" transform="translate(230.000000, 30.000000)">
<g id="symbol-copy-2">
<path d="M29.5793151,10.1663649 C29.4628886,9.99688216 29.2691772,9.90994232 29.0738683,9.90994232 L17.9522395,9.90994232 L23.498176,1.04527667 C23.6409633,0.817634197 23.6489514,0.506049814 23.4756097,0.256222694 C23.3579849,0.0865401142 23.1622765,0 22.9661687,0 L13.3890387,0 C12.4274714,0 11.5290101,0.515643175 10.9904126,1.3764475 L0.106230039,18.7748078 C-0.0361578035,19.0026502 -0.0421488768,19.3142345 0.129395522,19.5640617 C0.245622344,19.7333445 0.439333714,19.8200845 0.634842406,19.8200845 L11.7508795,19.8200845 L6.20434385,28.6869486 C6.10449263,28.846838 6.07393815,29.0480987 6.11947031,29.2399659 C6.18956587,29.5371603 6.45277369,29.7322253 6.73655086,29.7322253 L16.3080893,29.7322253 C17.2768458,29.7322253 18.182097,29.2125849 18.7244888,28.345385 L24.0563444,19.8200845 L24.0565441,19.8200845 L29.6020812,10.9554189 C29.7446688,10.7277764 29.7506598,10.4157923 29.5793151,10.1663649" id="Fill-1" fill="#4E48E0"></path>
<path d="M24.0576142,19.8181059 L18.7245604,28.3452051 C18.1821686,29.2126049 17.2767177,29.7320454 16.3081608,29.7320454 L6.73662243,29.7320454 C6.45284526,29.7320454 6.18963744,29.5371803 6.11954188,29.2399859 C6.07400973,29.0481187 6.1045642,28.846858 6.20441542,28.6869686 L11.7519496,19.8181059 L24.0576142,19.8181059 Z" id="Fill-3" fill="#4E48E0"></path>
<path d="M17.9450419,9.90992233 L29.0738599,9.90992233 C29.2691689,9.90992233 29.4628803,9.99686217 29.5793068,10.166145 C29.7508512,10.4157723 29.7444608,10.7275565 29.6022726,10.9553989 L24.0567355,19.8200645 L11.746278,19.8200645 L17.9450419,9.90992233 Z" id="Fill-5" fill="#1C81C1"></path>
<path d="M0.634794157,19.8200445 C0.439485167,19.8200445 0.245773797,19.7333046 0.129546975,19.5640217 C-0.0421971263,19.3141946 -0.036206053,19.0026102 0.106381492,18.7749677 L10.9905641,1.37640753 C11.5289618,0.515603203 12.4276228,-3.99723392e-05 13.3889904,-3.99723392e-05 L22.9661205,-3.99723392e-05 C23.1622283,-3.99723392e-05 23.3581364,0.0867000036 23.4757611,0.256182722 C23.6489031,0.506009841 23.640915,0.817594225 23.4983275,1.04543656 L11.7520295,19.8200445 L0.634794157,19.8200445 Z" id="Fill-7" fill="#5CC4CD"></path>
</g>
<g id="logo" transform="translate(41.937513, 6.195713)" fill="#3A3945">
<path d="M53.7579806,10.2010809 L54.0445536,10.2010809 L59.7304816,10.2010809 C59.9383718,10.2010809 60.5560515,10.2040788 60.5560515,10.2040788 C60.5560515,10.2040788 60.5558518,10.1639066 60.5211036,10.001419 C60.397288,9.41962162 60.1736213,8.88719006 59.7836024,8.43350402 C58.8769533,7.37983316 57.2675513,7.02048183 55.8914018,7.57529789 C54.7105613,8.05116859 54.0665209,8.9715317 53.7579806,10.2010809 M58.6045592,12.5132808 C57.068448,12.5132808 55.5327362,12.5166785 53.9968247,12.5092836 C53.7963235,12.5080844 53.7585797,12.5500554 53.8122997,12.747119 C54.2148998,14.216702 55.3849564,15.2248044 56.8909125,15.3884912 C58.5851881,15.5725638 60.1368761,15.1472581 61.5877143,14.2916502 L61.8471278,14.138756 L63.0715035,16.3122519 C63.0715035,16.3122519 63.0365555,16.3318384 62.9073481,16.4179788 C61.0828665,17.6383343 59.0740597,18.1663689 56.8875176,18.0386572 C55.9117715,17.9816967 54.9733697,17.7720417 54.0922825,17.3435383 C52.7894238,16.7101766 51.8304526,15.7290555 51.2569072,14.4003749 C50.4592956,12.5528534 50.4117665,10.6655594 51.1211095,8.78506074 C52.0319524,6.36973215 54.2528433,4.86617261 56.9514224,4.78323 C58.3427493,4.7404596 59.6635813,4.99868091 60.8484159,5.75935453 C62.5217226,6.83361114 63.314741,8.43090581 63.5166402,10.364168 C63.582542,10.9961307 63.5487923,11.625695 63.4940738,12.2574578 C63.4743033,12.4866992 63.4683122,12.517278 63.4683122,12.517278 C63.4683122,12.517278 60.1322829,12.5132808 58.6045592,12.5132808" id="Fill-1"></path>
<path d="M89.0300452,10.2010809 L89.3164185,10.2010809 L95.0025462,10.2010809 C95.2104364,10.2010809 95.8281161,10.2040788 95.8281161,10.2040788 C95.8281161,10.2040788 95.8277167,10.1639066 95.7931682,10.001419 C95.669153,9.41962162 95.4454862,8.88719006 95.0554674,8.43350402 C94.149018,7.37983316 92.5394163,7.02048183 91.1634664,7.57529789 C89.9826259,8.05116859 89.3385855,8.9715317 89.0300452,10.2010809 M93.8764241,12.5132808 C92.3405126,12.5132808 90.8046011,12.5166785 89.2686897,12.5092836 C89.0681884,12.5080844 89.0304446,12.5500554 89.0843643,12.747119 C89.4867647,14.216702 90.6568213,15.2248044 92.1629772,15.3884912 C93.857053,15.5725638 95.4089407,15.1472581 96.8597789,14.2916502 L97.1189927,14.138756 L98.3435681,16.3122519 C98.3435681,16.3122519 98.3086202,16.3318384 98.179213,16.4179788 C96.3547315,17.6383343 94.3461243,18.1663689 92.1593825,18.0386572 C91.1836364,17.9816967 90.2452346,17.7720417 89.3643471,17.3435383 C88.0614884,16.7101766 87.1023175,15.7290555 86.5287721,14.4003749 C85.7311606,12.5528534 85.6836314,10.6655594 86.3931742,8.78506074 C87.304017,6.36973215 89.5247082,4.86617261 92.2232873,4.78323 C93.6148139,4.7404596 94.9354462,4.99868091 96.1204805,5.75935453 C97.7935876,6.83361114 98.5868057,8.43090581 98.7885051,10.364168 C98.8544069,10.9961307 98.8206572,11.625695 98.7659388,12.2574578 C98.7461682,12.4866992 98.7401771,12.517278 98.7401771,12.517278 C98.7401771,12.517278 95.4041478,12.5132808 93.8764241,12.5132808" id="Fill-3"></path>
<path d="M79.9145274,4.78119142 C81.3104474,4.80797288 82.7061678,5.29743418 83.8378816,6.4478381 C83.9676881,6.57974682 84.0128209,6.62491556 84.0128209,6.62491556 L82.4297796,8.55398065 C82.4297796,8.55398065 82.4056156,8.53079669 82.2782055,8.41028009 C81.5460963,7.71875862 80.6893728,7.29844947 79.6672957,7.25927658 C79.3465736,7.24708502 79.0348381,7.28985542 78.7426734,7.42955875 C77.9522511,7.80749721 77.8364237,8.73565493 78.508023,9.29706643 C78.7302919,9.48273795 78.9917024,9.59346132 79.257706,9.69758927 C80.2148798,10.0709309 81.1876304,10.4064987 82.108059,10.8687788 C82.7810562,11.2067449 83.3853558,11.6348487 83.8097235,12.2730071 C84.6007449,13.4627838 84.4693407,15.2551434 83.5161609,16.397353 C82.6826029,17.3958621 81.5768505,17.869934 80.3209218,18.021629 C78.5265954,18.2382791 76.8780517,17.8625391 75.4371986,16.7271248 C75.0687476,16.4367258 74.7520195,16.0947624 74.4624509,15.7258177 C74.3767786,15.6164934 74.3520155,15.5815176 74.3520155,15.5815176 L76.0722523,13.7287997 C76.0722523,13.7287997 76.0936205,13.7541821 76.2066521,13.8900881 C76.8982216,14.7217126 77.7679258,15.2653364 78.8399285,15.4568039 C79.4522162,15.5659284 80.0559167,15.543344 80.6180791,15.2393544 C81.1870313,14.9321669 81.4348621,14.3909415 81.2583251,13.8581102 C81.1618688,13.5669117 80.9551768,13.3630528 80.7083446,13.1945694 C80.3790352,12.9695251 80.007389,12.8316205 79.6419335,12.6829234 C78.8589002,12.3647436 78.0586925,12.0879351 77.2952301,11.7229877 C76.2791441,11.2373238 75.5142837,10.5168224 75.2337018,9.38500558 C74.7859689,7.5800546 75.7193781,5.85684706 77.4945331,5.17212089 C78.214061,4.894513 78.9595503,4.78279031 79.9145274,4.78119142" id="Fill-5"></path>
<path d="M29.226173,15.099651 C27.2055837,15.099651 25.5616332,13.4545894 25.5616332,11.4321889 C25.5616332,9.40998829 27.2055837,7.76492667 29.226173,7.76492667 C31.2467623,7.76492667 32.8907128,9.40998829 32.8907128,11.4321889 C32.8907128,13.4545894 31.2467623,15.099651 29.226173,15.099651 L29.226173,15.099651 Z M33.2164275,4.77959252 L32.9166742,6.31493007 C31.9846629,5.35099711 30.5909395,4.79038505 29.226173,4.79038505 C25.5668254,4.79038505 22.5896614,7.76992321 22.5896614,11.4321889 C22.5896614,15.0946545 25.5668254,18.0741927 29.226173,18.0741927 C30.5909395,18.0741927 31.9227551,17.5291698 32.9166742,16.5498475 L33.2164275,18.0801885 L35.8888456,18.0801885 L35.8888456,4.77959252 L33.2164275,4.77959252 Z" id="Fill-7"></path>
<path d="M122.063246,15.099651 C120.042656,15.099651 118.398706,13.4545894 118.398706,11.4321889 C118.398706,9.40998829 120.042656,7.76492667 122.063246,7.76492667 C124.083835,7.76492667 125.727586,9.40998829 125.727586,11.4321889 C125.727586,13.4545894 124.083835,15.099651 122.063246,15.099651 L122.063246,15.099651 Z M125.753747,0.340864122 L125.753747,6.31493007 C124.814946,5.45192727 123.428012,4.79038505 122.063246,4.79038505 C118.403898,4.79038505 115.426734,7.76992321 115.426734,11.4321889 C115.426734,15.0946545 118.403898,18.0741927 122.063246,18.0741927 C123.428012,18.0741927 124.733667,17.4464271 125.753747,16.5496476 L126.053301,18.0801885 L128.725918,18.0801885 L128.725918,0.340864122 L125.753747,0.340864122 Z" id="Fill-10"></path>
<polygon id="Fill-13" points="39.1462721 18.0801685 42.1184435 18.0801685 42.1184435 5.40513964 39.1462721 5.40513964"></polygon>
<path d="M107.336269,4.78948568 C106.235509,4.78948568 104.973989,5.4880023 104.317167,6.33421672 L103.817911,4.77869314 L101.344996,4.77869314 L101.344996,10.6084589 L101.344996,18.0792891 L104.317167,18.0792891 L104.341132,18.0792891 L104.341132,10.6084589 C104.341132,9.04014422 105.68453,7.76402729 107.336269,7.76402729 C108.987608,7.76402729 110.331007,9.04014422 110.331007,10.6084589 L110.331007,18.0792891 L113.327143,18.0792891 L113.327143,10.6084589 C113.327143,7.40007915 110.639547,4.78948568 107.336269,4.78948568" id="Fill-1"></path>
<polygon id="Fill-16" points="45.2152293 18.0801685 48.1874008 18.0801685 48.1874008 0.341043998 45.2152293 0.341043998"></polygon>
<path d="M42.5730861,1.94215603 C42.5730861,0.869698169 41.7039811,-9.99308479e-05 40.6323778,-9.99308479e-05 C39.5605747,-9.99308479e-05 38.6916694,0.869698169 38.6916694,1.94215603 C38.6916694,3.01481375 39.5605747,3.88441199 40.6323778,3.88441199 C41.7039811,3.88441199 42.5730861,3.01481375 42.5730861,1.94215603" id="Fill-17"></path>
<path d="M71.5361911,4.80247669 C70.5452676,4.88142206 69.6440104,5.44683079 68.8649712,5.99744976 L68.5654175,4.77969245 L65.8927997,4.77969245 L65.8927997,10.891663 C65.8658399,11.1263006 65.8504628,11.3595392 65.8504628,11.58958 L65.8504628,17.9963465 L65.8927997,17.9963465 L65.8927997,18.0802884 L68.8649712,18.0802884 L68.8649712,17.9963465 L68.9073081,17.9963465 L68.9073081,11.58958 C68.9073081,10.1767577 70.1129118,7.98487447 71.7782304,7.85236616 C72.1916145,7.81998857 72.5840298,7.87055358 73.1368062,8.02764487 L73.9729603,5.08508112 C73.3640675,4.91180103 72.5363009,4.72333145 71.5361911,4.80247669" id="Fill-18"></path>
<path d="M14.4844781,4.78490884 C12.7632428,4.78490884 11.2149497,5.53818757 10.1495372,6.73156176 C9.08392495,5.53818757 7.53563191,4.78490884 5.81439655,4.78490884 C2.60837352,4.78490884 5.9910733e-05,7.39550231 5.9910733e-05,10.6038821 L5.9910733e-05,18.0747123 L2.97223138,18.0747123 L2.97223138,10.6038821 C2.97223138,9.03556739 4.24713177,7.75945046 5.81439655,7.75945046 C7.38166132,7.75945046 8.65656172,9.03556739 8.65656172,10.6038821 L8.65656172,18.0747123 L8.67014149,18.0747123 L10.1495372,18.0747123 L11.6287332,18.0747123 L11.642313,18.0747123 L11.642313,10.6038821 C11.642313,9.03556739 12.9172134,7.75945046 14.4844781,7.75945046 C16.0517429,7.75945046 17.3266433,9.03556739 17.3266433,10.6038821 L17.3266433,18.0747123 L20.2988148,18.0747123 L20.2988148,10.6038821 C20.2988148,7.39550231 17.6905012,4.78490884 14.4844781,4.78490884" id="Fill-19"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -0,0 +1,3 @@
<svg width="192" height="192" viewBox="0 0 192 192" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M95.5 0C43.1067 0 1 42.972 1 95.5088C1 148.045 43.5181 191.018 95.5 191.018C147.482 191.018 190 148.045 190 95.5088C190 42.972 148.03 0 95.5 0ZM95.5 30.0804C60.1139 30.0804 31.1742 59.1905 31.1742 95.5088C31.1742 107.984 34.4659 118.935 40.0893 128.916L33.9173 156.64C33.5058 158.581 35.8374 160.521 37.209 160.521L65.6001 153.868C74.5152 158.581 84.939 161.492 95.9115 161.492C131.298 161.076 160.237 131.827 160.237 95.5088C160.237 59.1905 131.435 30.0804 95.5 30.0804ZM69.029 65.9828H122.382C124.714 65.9828 126.634 67.9235 126.634 70.28C126.634 72.6366 124.714 74.5772 122.382 74.5772H69.029C66.6974 74.5772 64.7772 72.6366 64.7772 70.28C64.7772 67.9235 66.6974 65.9828 69.029 65.9828ZM69.029 91.766H122.382C124.714 91.766 126.634 93.7067 126.634 96.0632C126.634 98.4198 124.714 100.36 122.382 100.36H69.029C66.6974 100.36 64.7772 98.4198 64.7772 96.0632C64.7772 93.5681 66.6974 91.766 69.029 91.766ZM69.029 117.549H122.382C124.714 117.549 126.634 119.49 126.634 121.846C126.634 124.203 124.714 126.144 122.382 126.144H69.029C66.6974 126.144 64.7772 124.203 64.7772 121.846C64.7772 119.351 66.6974 117.549 69.029 117.549Z" fill="#32009D"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,4 @@
<svg width="469" height="138" viewBox="0 0 469 138" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M197.096 44.1004C197.096 40.0004 193.732 36.9004 189.28 36.9004C185.223 36.9004 181.76 40.3004 181.76 44.1004C181.76 47.9004 185.124 51.3004 189.28 51.3004C193.435 51.3004 197.096 48.2004 197.096 44.1004ZM196.404 104.1V57.9004H182.453V104.1H196.404ZM237.267 101.6L232.815 91.3004C231.43 92.3004 229.055 93.0004 226.68 93.0004C221.931 93.0004 218.171 88.2004 218.171 80.6004C218.171 72.7004 221.535 68.2004 226.68 68.2004C229.055 68.2004 231.133 68.9004 232.815 69.9004L237.267 59.9004C234.2 57.8004 230.836 56.8004 224.702 56.8004C213.422 56.8004 203.923 64.7004 203.923 80.9004C203.923 97.1004 213.422 105 224.702 105C230.836 105.1 234.2 103.7 237.267 101.6ZM282.584 78.6004C282.584 65.9004 275.46 56.9004 262.102 56.9004C248.448 56.9004 240.236 66.9004 240.236 81.0004C240.236 94.8004 248.052 105.1 263.784 105.1C270.612 105.1 277.439 103.7 281.495 101.7L277.735 91.4004C274.371 93.1004 269.523 94.2004 264.774 94.2004C258.936 94.2004 254.879 91.8004 253.494 86.6004L281.792 82.8004C282.584 81.3004 282.584 79.9004 282.584 78.6004ZM269.325 75.8004L253.296 77.9004C253.296 70.3004 257.056 66.9004 262.201 66.9004C266.654 66.8004 269.325 69.9004 269.325 75.8004ZM326.614 104.1V60.3004C323.25 58.2004 317.709 57.2004 312.267 57.2004C299.701 57.2004 290.4 64.4004 290.4 80.6004C290.4 94.7004 298.613 102.7 309.793 102.7C313.157 102.7 317.313 101.7 319.688 100.6V104.4C319.688 112.7 315.631 117.5 307.419 117.5C302.669 117.5 297.92 116.1 294.853 114.4L292.775 119.9C296.139 121.6 301.977 123.3 308.111 123.3C319.787 123.4 326.614 116.1 326.614 104.1ZM319.787 94.8004C317.709 95.8004 314.345 96.5004 311.277 96.5004C303.461 96.5004 297.623 91.0004 297.623 80.0004C297.623 67.6004 304.055 62.8004 311.97 62.8004C315.037 62.8004 318.105 63.5004 319.787 64.2004V94.8004ZM360.057 57.2004C358.672 56.9004 357.286 56.9004 355.604 56.9004C349.47 56.9004 343.038 58.3004 338.883 60.0004V103.8H346.007V64.4004C348.085 63.4004 351.449 63.0004 354.516 63.0004C355.901 63.0004 357.286 63.0004 358.573 63.3004L360.057 57.2004ZM397.853 101.6V72.0004C397.853 61.0004 391.026 56.8004 380.835 56.8004C374.997 56.8004 369.259 58.5004 365.795 59.9004L367.478 64.7004C370.545 63.3004 375.69 61.9004 380.043 61.9004C386.475 61.9004 390.927 64.0004 390.927 70.9004V74.3004C377.273 75.0004 362.926 77.1004 362.926 90.2004C362.926 98.8004 369.061 104.3 381.725 104.3C387.959 104.7 394.489 103.4 397.853 101.6ZM391.026 98.2004C389.344 98.9004 385.188 99.6004 381.824 99.6004C374.008 99.6004 369.852 96.2004 369.852 90.6004C369.852 81.0004 380.736 80.3004 391.026 79.9004V98.2004ZM468.4 104.1V71.7004C468.4 62.7004 462.266 56.9004 452.668 56.9004C446.237 56.9004 440.696 59.7004 437.629 62.1004C435.254 59.3004 430.109 56.9004 422.985 56.9004C417.147 56.9004 411.705 58.3004 407.253 60.0004V103.8H414.377V64.4004C416.752 63.4004 419.819 62.7004 423.579 62.7004C430.01 62.7004 434.166 65.8004 434.166 71.0004V103.7H441.29V66.8004C443.664 64.4004 447.127 63.0004 451.184 63.0004C457.022 63.0004 461.078 66.4004 461.078 72.6004V104.3L468.4 104.1Z" fill="#373435"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M68.1723 0C30.3758 0 0 31 0 68.9C0 106.8 30.6726 137.8 68.1723 137.8C105.672 137.8 136.345 106.8 136.345 68.9C136.345 31 106.068 0 68.1723 0ZM68.1723 21.7C42.6448 21.7 21.7676 42.7 21.7676 68.9C21.7676 77.9 24.1423 85.8 28.199 93L23.7465 113C23.4497 114.4 25.1317 115.8 26.1212 115.8L46.6025 111C53.0339 114.4 60.5536 116.5 68.4691 116.5C93.9966 116.2 114.874 95.1 114.874 68.9C114.874 42.7 94.0956 21.7 68.1723 21.7ZM49.0761 47.6H87.5653C89.2473 47.6 90.6325 49 90.6325 50.7C90.6325 52.4 89.2473 53.8 87.5653 53.8H49.0761C47.3941 53.8 46.0089 52.4 46.0089 50.7C46.0089 49 47.3941 47.6 49.0761 47.6ZM49.0761 66.2H87.5653C89.2473 66.2 90.6325 67.6 90.6325 69.3C90.6325 71 89.2473 72.4 87.5653 72.4H49.0761C47.3941 72.4 46.0089 71 46.0089 69.3C46.0089 67.5 47.3941 66.2 49.0761 66.2ZM49.0761 84.8H87.5653C89.2473 84.8 90.6325 86.2 90.6325 87.9C90.6325 89.6 89.2473 91 87.5653 91H49.0761C47.3941 91 46.0089 89.6 46.0089 87.9C46.0089 86.1 47.3941 84.8 49.0761 84.8Z" fill="#32009D"/>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -0,0 +1,3 @@
<svg width="240" height="131" viewBox="0 0 240 131" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.8" d="M73.3763 45.7677C168.735 42.6747 170.508 75.1248 176.424 93.7568C188.998 119.214 208.95 131.193 269.498 130.966L267.014 -5.53127L0.653799 -4.53028C-2.58553 22.7607 17.2441 46.8768 73.3763 45.7677Z" fill="#EBE5F7"/>
</svg>

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Some files were not shown because too many files have changed in this diff Show More