Exemplo n.º 1
0
function popmake_shortcode_popup($atts, $content = null)
{
    $atts = shortcode_atts(apply_filters('popmake_shortcode_popup_default_atts', array('id' => "", 'theme_id' => null, 'theme' => null, 'title' => "", 'overlay_disabled' => 0, 'size' => "small", 'width' => "", 'width_unit' => "px", 'height' => "", 'height_unit' => "px", 'location' => "center top", 'position_top' => 100, 'position_left' => 0, 'position_bottom' => 0, 'position_right' => 0, 'position_fixed' => 0, 'animation_type' => "slide", 'animation_speed' => 350, 'animation_origin' => 'top', 'overlay_click' => 0, 'esc_press' => 1)), apply_filters('popmake_shortcode_popup_atts', $atts), 'popup');
    if (!$atts['theme_id']) {
        if (!$atts['theme']) {
            $atts['theme_id'] = popmake_get_default_popup_theme();
        } else {
            $atts['theme_id'] = $atts['theme'];
        }
    }
    $popup_fields = apply_filters('popmake_shortcode_data_attr', array('id' => $atts['id'], 'theme' => $atts['theme_id'], 'meta' => array('display' => array('size' => $atts['size'], 'overlay_disabled' => $atts['overlay_disabled'], 'custom_width' => $atts['width'], 'custom_width_unit' => $atts['width_unit'], 'custom_height' => $atts['height'], 'custom_height_unit' => $atts['height_unit'], 'custom_height_auto' => $atts['width'] > 0 ? 0 : 1, 'location' => $atts['location'], 'position_top' => $atts['position_top'], 'position_left' => $atts['position_left'], 'position_bottom' => $atts['position_bottom'], 'position_right' => $atts['position_right'], 'position_fixed' => $atts['position_fixed'], 'animation_type' => $atts['animation_type'], 'animation_speed' => $atts['animation_speed'], 'animation_origin' => $atts['animation_origin']), 'close' => array('overlay_click' => $atts['overlay_click'], 'esc_press' => $atts['esc_press']))), $atts);
    $classes = array('popmake', 'theme-' . $atts['theme_id']);
    if (in_array($atts['size'], array('normal', 'nano', 'tiny', 'small', 'medium', 'large', 'xlarge'))) {
        $classes[] = 'responsive';
        $classes[] = 'size-' . $atts['size'];
    } elseif ($atts['size'] == 'custom') {
        $classes[] = 'size-custom';
    }
    $return = "<div id='popmake-" . $atts['id'] . "' class='" . implode(' ', $classes) . "' data-popmake='" . json_encode($popup_fields) . "'>";
    if ($atts['title'] != '') {
        $return .= '<div class="popmake-title">' . $atts['title'] . '</div>';
    }
    $return .= '<div class="popmake-content">' . do_shortcode($content) . '</div>';
    $return .= '<a class="popmake-close">' . __('&#215;', 'popup-maker') . '</a>';
    $return .= '</div>';
    return $return;
}
Exemplo n.º 2
0
function popmake_get_the_popup_theme($popup_id = null)
{
    if (!$popup_id) {
        $popup_id = popmake_get_the_popup_ID();
    }
    $theme = get_post_meta($popup_id, 'popup_theme', true);
    if (empty($theme)) {
        $theme = popmake_get_default_popup_theme();
    }
    return apply_filters('popmake_get_the_popup_theme', $theme, $popup_id);
}
Exemplo n.º 3
0
/**
 * Load Admin Scripts
 *
 * Enqueues the required admin scripts.
 *
 * @since 1.0
 *
 * @param string $hook Page hook
 *
 * @return void
 */
function popmake_load_admin_scripts()
{
    $js_dir = POPMAKE_URL . '/assets/js/';
    // Use minified libraries if SCRIPT_DEBUG is turned off
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.js' : '.min.js';
    if (popmake_is_admin_popup_page() || popmake_is_admin_popup_theme_page()) {
        add_action('popmake_admin_footer', 'popmake_admin_popup_preview');
    }
    if (popmake_is_admin_page()) {
        wp_enqueue_script('popup-maker-admin', $js_dir . 'popup-maker-admin' . $suffix, array('jquery', 'wp-color-picker', 'jquery-ui-slider'), POPMAKE_VERSION);
        wp_localize_script('popup-maker-admin', 'popmake_admin_ajax_nonce', wp_create_nonce(POPMAKE_NONCE));
    }
    if (popmake_is_admin_popup_page()) {
        wp_enqueue_script('popup-maker-site', $js_dir . 'popup-maker-site' . $suffix . '?defer', array('jquery', 'jquery-ui-core', 'jquery-ui-position'), POPMAKE_VERSION, true);
        wp_localize_script('popup-maker-site', 'ajaxurl', admin_url('admin-ajax.php'));
        wp_localize_script('popup-maker-site', 'popmake_default_theme', (string) popmake_get_default_popup_theme());
    }
    if (popmake_is_admin_popup_theme_page()) {
        wp_localize_script('popup-maker-admin', 'popmake_google_fonts', popmake_get_google_webfonts_list());
    }
}
Exemplo n.º 4
0
function popmake_getting_started_page()
{
    list($display_version) = explode('-', POPMAKE_VERSION);
    ?>
	<div class="wrap about-wrap">
	<h1><?php 
    printf(__('Welcome to Popup Maker %s', 'popup-maker'), $display_version);
    ?>
</h1>

	<div class="about-text"><?php 
    _e('Thank you for updating to the latest version! Are you ready to destroy your old conversion rates and transform your website? We sure are!', 'popup-maker');
    ?>
</div>
	<div class="popmake-badge"><?php 
    printf(__('Version %s', 'popup-maker'), $display_version);
    ?>
</div>

	<?php 
    popmake_welcome_page_tabs();
    ?>


	<p class="about-description"><?php 
    _e('Use the tips below to get started using Popup Maker. You will have those high performance popups up and running in no time!', 'popup-maker');
    ?>
</p>

	<div class="changelog">
		<h3><?php 
    _e('Creating Your First Popup Maker Popup', 'popup-maker');
    ?>
</h3>

		<div class="feature-section">


			<h4><?php 
    printf(__('<a href="%s">%s &rarr; Add New</a>', 'popup-maker'), admin_url('post-new.php?post_type=popup'), popmake_get_label_plural());
    ?>
</h4>
			<img src="<?php 
    echo POPMAKE_URL . '/assets/images/welcome/getting-started-1.jpg';
    ?>
" class="popmake-welcome-screenshots" width="540"/>

			<p><?php 
    printf(__('The %s menu is your access point for all aspects of your Popup Maker product creation and setup. To create your first popup, simply click Add New and then choose from many available options to get it just right.', 'popup-maker'), popmake_get_label_plural());
    ?>
</p>

			<h4><?php 
    _e('Display Options', 'popup-maker');
    ?>
</h4>

			<p><?php 
    _e('Display options control how your popup shows and how it behaves, respectively. Set the size, how the background operates, animation options, and positioning positioning.', 'popup-maker');
    ?>
</p>

			<h4><?php 
    _e('Close Option', 'popup-maker');
    ?>
</h4>

			<p><?php 
    _e('These settings allow you to control how a user is able to close your popups: clicking on the background overlay, pressing ESC, or pressing F4. You can enable or disable all of these settings, or pick and choose based on your preference. Also, you can prevent users from closing your popups using our Forced Interaction Extension.', 'popup-maker');
    ?>
</p>

			<h4><?php 
    _e('Targeting Conditions', 'popup-maker');
    ?>
</h4>

			<p><?php 
    _e('Use Targeting Conditions to load your popups wherever you please! If you’re not running some type of auto open popup extension (Scroll Triggered, Exit Intent, or Auto Open), then remember, you have to call your popup using the <em>popmake class</em> on your HTML element (more information below.)', 'popup-maker');
    ?>
</p>

			<h4><?php 
    _e('Theme Settings', 'popup-maker');
    ?>
</h4>

			<p><?php 
    _e('Choose your theme from the drop down to customize how your popup looks. Without Unlimited Themes, only the Default Theme will appear, which you can customize and change the name to suit your needs.', 'popup-maker');
    ?>
</p>

		</div>
	</div>

	<div class="changelog">
		<h3><?php 
    _e('Calling Your Popups Anywhere', 'popup-maker');
    ?>
</h3>

		<div class="feature-section">

			<img src="<?php 
    echo POPMAKE_URL . '/assets/images/welcome/calling-popup.jpg';
    ?>
" class="popmake-welcome-screenshots" width="540"/>

			<h4><?php 
    _e('Using the Popup Maker CSS Tag', 'popup-maker');
    ?>
</h4>

			<p><?php 
    _e('In the <em>All Popups Menu</em>, you can find all of your popups and their various attributes. One of the most important attributes is the CSS Class of your popups. You will use this class wherever you want to call your popups!', 'popup-maker');
    ?>
</p>

			<p>Examples:</p>
			<ul class="inline">
				<li><code>&lt;a class=”popmake-####”><?php 
    _e('Read More', 'popup-maker');
    ?>
&lt;/a></code></li>
				<li><code>&lt;button class=”popmake-####”><?php 
    _e('Sign Up Now!', 'popup-maker');
    ?>
						&lt;/button></code></li>
				<li><code>&lt;img class=”popmake-####”/></code></li>
			</ul>

			<h4><?php 
    _e('Using Popup Maker Short Codes', 'popup-maker');
    ?>
</h4>

			<p><?php 
    _e('You can also use shortcodes to create popups directly inline with the content of your posts and pages. This is useful if you wanna have unique content in your popups for each page/post.', 'popup-maker');
    ?>
</p>

			<p>For Example:</p>
			<ul class="inline">
				<li><code>&lsqb;popup id=The-Pop-Up-Name size="small"]Put your content and other &lsqb;shortcodes] here.&lsqb;/modal]</code>
				</li>
			</ul>
		</div>
	</div>

	<div class="changelog">
		<h3><?php 
    _e('Need Help?', 'popup-maker');
    ?>
</h3>

		<div class="feature-section">

			<h4><?php 
    _e('Top-Notch Support', 'popup-maker');
    ?>
</h4>

			<p>
				<?php 
    printf(__('We provide top-notch support! If you encounter a problem or have a question, post a question in the %sWordPress Support Forums%s, or if you’ve purchased an extension, the %sSupport Page%s.', 'popup-maker'), '<a href="https://wordpress.org/support/plugin/popup-maker" target="_blank">', '</a>', '<a href="https://wppopupmaker.com/support?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Extension+Support" target="_blank">', '</a>');
    ?>
			</p>
		</div>
	</div>

	<div class="changelog">
		<h3><?php 
    _e('Stay Up-to-Date', 'popup-maker');
    ?>
</h3>

		<div class="feature-section">

			<h4><?php 
    _e('Get Notified of Extension Releases', 'popup-maker');
    ?>
</h4>

			<p><?php 
    printf(__('New extensions that make Popup Maker even more powerful are released nearly every single week. <a href="%s" target="_blank">Subscribe to the newsletter</a> to stay up to date with our latest releases. Signup now to ensure you do not miss a release!', 'popup-maker'), 'https://wppopupmaker.com/newsletter-sign-up?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Newsletter+Signup');
    ?>
			</p>

			<h4><?php 
    _e('Get Alerted About New Tutorials', 'popup-maker');
    ?>
</h4>

			<p><?php 
    printf(__('<a href="%s" target="_blank">Signup now</a> to hear about the latest tutorial releases that explain how to take Popup Maker further.', 'popup-maker'), 'https://wppopupmaker.com/newsletter-sign-up?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Newsletter+Signup');
    ?>
			</p>

		</div>
	</div>

	<div class="changelog">
		<h3><?php 
    _e('Extensions for Everything', 'popup-maker');
    ?>
</h3>

		<div class="feature-section">

			<h4><?php 
    _e('9 Extensions and Counting...', 'popup-maker');
    ?>
</h4>

			<p><?php 
    _e('Add-on plugins are available that greatly extend the default functionality of Popup Maker. There are extensions enhancing the Theme Builder capabilities, extensions for marketing your most precious content like Auto Open and Exit Intent, plus much more now, and even more to come.', 'popup-maker');
    ?>
</p>

			<p><?php 
    _e('We have over 25 more extensions in works, and over 35 integration extensions in the works as well. Stay updated and tuned in to be a part of what is going to be the robust Popup Maker tool on the market.', 'popup-maker');
    ?>
</p>

			<h4><?php 
    _e('Visit the Extension Store', 'popup-maker');
    ?>
</h4>

			<p><?php 
    printf(__('<a href="%s" target="_blank">The Extensions store</a> has a list of all available extensions, including convenient category filters so you can find exactly what you are looking for.', 'popup-maker'), 'https://wppopupmaker.com/extensions?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Extensions');
    ?>
			</p>

		</div>
	</div>

	<div class="return-to-dashboard">
		<a href="<?php 
    echo esc_url(admin_url('post.php?post=' . popmake_get_default_popup_theme() . '&action=edit'));
    ?>
"><?php 
    _e('Customize Your First Theme', 'popup-maker');
    ?>
</a> &middot;
		<a href="<?php 
    echo esc_url(admin_url('post-new.php?post_type=popup'));
    ?>
"><?php 
    _e('Create a Modal', 'popup-maker');
    ?>
</a> &middot;
		<a href="<?php 
    echo esc_url('http://docs.wppopupmaker.com/collection/1-getting-started?utm_source=WP+Welcome+Getting+Started&utm_medium=Text+Link&utm_campaign=Getting+Started');
    ?>
" target="_blank"><?php 
    _e('View the Full Getting Started Guide', 'popup-maker');
    ?>
</a>
	</div>
	</div><?php 
}
Exemplo n.º 5
0
function popmake_about_page()
{
    list($display_version) = explode('-', POPMAKE_VERSION);
    ?>
	<div class="wrap about-wrap">
	<h1><?php 
    printf(__('Welcome to Popup Maker %s', 'popup-maker'), $display_version);
    ?>
</h1>

	<div class="about-text"><?php 
    _e('Thank you for updating to the latest version! Are you ready to destroy your old conversion rates and transform your website? We sure are!', 'popup-maker');
    ?>
</div>
	<div class="popmake-badge"><?php 
    printf(__('Version %s', 'popup-maker'), $display_version);
    ?>
</div>

	<?php 
    popmake_welcome_page_tabs();
    ?>

	<div class="changelog">
		<h3><?php 
    _e('Targeting Conditions', 'popup-maker');
    ?>
</h3>
		<img src="<?php 
    echo POPMAKE_URL . '/assets/images/welcome/targeting-conditions.png';
    ?>
" class="popmake-welcome-screenshots"/>

		<div class="feature-section">
			<h4><?php 
    _e('Target specific users for your popups!', 'popup-maker');
    ?>
</h4>

			<p><?php 
    printf(__('Our %sTargeting Conditions%s feature allows you to tailor your popups to specific users by giving you the ability to use popups exactly where you want within your website.', 'popup-maker'), '<strong>', '</strong>');
    ?>
</p>
			<h4><?php 
    _e('Destroy Old Conversion Rates with Auto Open!', 'popup-maker');
    ?>
</h4>

			<p><?php 
    printf(__('One of the absolute best ways to market your most valuable and precious content, our %sAuto Open Popups%s Feature allows you to choose the delay before opening, when the cookie is set, how long the cookie will last, even reset cookies for a popup.', 'popup-maker'), '<strong>', '</strong>');
    ?>
</p>
			<h4><?php 
    _e('Drive Conversions!', 'popup-maker');
    ?>
</h4>

			<p>
				<?php 
    printf(__('Use %sScroll Triggered%s & %sExit Intent Popup%s Extensions to enhance your popups’ effectiveness and easily convert users into cash.', 'popup-maker'), '<a href="https://wppopupmaker.com/extensions/scroll-triggered-popups?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Scroll+Triggered" target="_blank">', '</a>', '<a href="https://wppopupmaker.com/extensions/exit-intent-popups?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Exit+Intent" target="_blank">', '</a>');
    ?>
			</p>
		</div>
		<h3><?php 
    _e('Google Font Integration', 'popup-maker');
    ?>
</h3>

		<div class="feature-section">
			<p><?php 
    _e('Easily plug and play all of your favorite fonts from Google Fonts all within a few clicks!', 'popup-maker');
    ?>
</p>
		</div>
	</div>
	<div class="changelog">
	</div>


	<div class="changelog">
		<h3><?php 
    _e('WordPress Form Plug-In Integrations', 'popup-maker');
    ?>
</h3>

		<div class="feature-section">
			<p><?php 
    _e('Use any of your forms from the most popular form plugins out-of-the-box inside your popups with ease and efficiency. 100% seamless compatibility with:', 'popup-maker');
    ?>
</p>
			<ul class="inline">
				<img src="<?php 
    echo POPMAKE_URL . '/assets/images/welcome/ninja.jpg';
    ?>
"/>
				<img src="<?php 
    echo POPMAKE_URL . '/assets/images/welcome/gravity.jpg';
    ?>
"/>
				<img src="<?php 
    echo POPMAKE_URL . '/assets/images/welcome/cf7.jpg';
    ?>
"/>
			</ul>
		</div>
	</div>

	<div class="changelog">
		<h3><?php 
    _e('Easy Theme Builder', 'popup-maker');
    ?>
</h3>

		<div class="feature-section">
			<img src="<?php 
    echo POPMAKE_URL . '/assets/images/welcome/easy-theme-builder.png';
    ?>
" class="popmake-welcome-screenshots"/>

			<p><?php 
    _e('Our theme builder allows you to create a high performing theme in no time for your popups. Use our color picker to grab the perfect colors to meet your needs and find pixel perfect sizes with ease for a plethora of additional theme settings.', 'popup-maker');
    ?>
</p>
			<h4><?php 
    _e('Make it Your Own!', 'popup-maker');
    ?>
</h4>

			<p>
				<?php 
    printf(__('You may be interested in our %sAdvanced Theme Builder%s Extension, which allows you to add background images to many elements of your popup within a couple of clicks.', 'popup-maker'), '<a href="https://wppopupmaker.com/extensions/advanced-theme-builder?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Advanced+Theme+Builder" target="_blank">', '</a>');
    ?>
			</p>
		</div>
	</div>

	<div class="changelog">
		<h3><?php 
    _e('Further Enhancements & Updates', 'popup-maker');
    ?>
</h3>

		<div class="feature-section col three-col">
			<div>
				<h4><?php 
    _e('Exit Intent', 'popup-maker');
    ?>
</h4>

				<p>
					<?php 
    printf(__('Easily convert abandoning users into cash with our Exit Intent Extension. Exit Intent now comes with Hard Exit Technology. Learn more %shere%s.', 'popup-maker'), '<a href="https://wppopupmaker.com/extensions/exit-intent-popups?utm_source=WP+Welcome+About&utm_medium=Text+Link&utm_campaign=Exit+Intent" target="_blank">', '</a>');
    ?>
				</p>
			</div>

			<div>
				<h4><?php 
    _e('Lightweight & Dependable', 'popup-maker');
    ?>
</h4>

				<p><?php 
    _e('Speed matters, and at only 5.9kb, our popups won’t slow you down. Our optimization techniques and program enhancement means your popups will perform at a consistently high level with 100% uptime.', 'popup-maker');
    ?>
</p>
			</div>

			<div class="last-feature">
				<h4><?php 
    _e('Popup Tags & Categories', 'popup-maker');
    ?>
</h4>

				<p><?php 
    _e('Popup Maker allows you to categorize and tag your popups for easy organization and recognition.', 'popup-maker');
    ?>
</p>
			</div>
		</div>
	</div>

	<div class="return-to-dashboard">
		<a href="<?php 
    echo esc_url(admin_url('post.php?post=' . popmake_get_default_popup_theme() . '&action=edit'));
    ?>
"><?php 
    _e('Customize Your First Theme', 'popup-maker');
    ?>
</a> &middot;
		<a href="<?php 
    echo esc_url(admin_url('post-new.php?post_type=popup'));
    ?>
"><?php 
    _e('Create a Modal', 'popup-maker');
    ?>
</a> &middot;
		<a href="<?php 
    echo esc_url(admin_url(add_query_arg(array('page' => 'popmake-changelog'), 'index.php')));
    ?>
"><?php 
    _e('View the Full Changelog', 'popup-maker');
    ?>
</a>
	</div>
	</div><?php 
}