Version Description
(16, Jan 2020) = * [+] Added new setting page (Popup Anything --> Settings) to manage "babel-polyfill" js. Under this setting page you can manage babel-polyfill disable to load from Popup anything plugin or add babel-polyfill on header to remove conflict with WordPress default "wp-polyfill" js. * [+] Added shortcode view meta box. * [-] Removed some unwanted files. * [*] Tweak - fixed js loading issue.
Download this release
Release Info
Developer | wponlinesupport |
Plugin | Popup Anything – A Marketing Popup and Lead Generation Conversions |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.6.2
- assets/css/popupaoc-admin-style.css +2 -1
- assets/js/{popupaoc-popup.min.js → custombox.min.js} +0 -0
- includes/admin/class-popupaoc-admin.php +46 -4
- includes/admin/metabox/popupaoc-post-sett-metabox.php +2 -4
- includes/{settings → admin/settings}/hire-us.php +0 -0
- includes/{settings → admin/settings}/premium.php +0 -0
- includes/admin/settings/settings.php +79 -0
- includes/class-popupaoc-script.php +14 -3
- includes/popupaoc-functions.php +64 -13
- includes/shortcode/popupaoc-popup-shortcode.php +1 -1
- popup-anything-on-click.php +12 -3
- readme.txt +18 -0
assets/css/popupaoc-admin-style.css
CHANGED
@@ -16,4 +16,5 @@ th.popupaoc-act-head{width: 60px;}
|
|
16 |
.popupaoc-group-btn-row td{vertical-align:top;}
|
17 |
.popupaoc-sett-title{border-bottom: 2px solid #ccc; padding: 0 0 5px;}
|
18 |
.popup-anything-imgs-preview{width:200px;}
|
19 |
-
.popup-anything-imgs-preview img{width:100%;}
|
|
16 |
.popupaoc-group-btn-row td{vertical-align:top;}
|
17 |
.popupaoc-sett-title{border-bottom: 2px solid #ccc; padding: 0 0 5px;}
|
18 |
.popup-anything-imgs-preview{width:200px;}
|
19 |
+
.popup-anything-imgs-preview img{width:100%; border:1px solid #d1d1d1; padding:5px; margin-top:5px; background:#f1f1f1;}
|
20 |
+
.popupaoc-shortcode-preview { background-color:#e7e7e7;font-weight: 600; padding: 2px 5px; display: inline-block; margin: 0 0 2px 0;}
|
assets/js/{popupaoc-popup.min.js → custombox.min.js}
RENAMED
File without changes
|
includes/admin/class-popupaoc-admin.php
CHANGED
@@ -19,7 +19,7 @@ class Popupaoc_Admin {
|
|
19 |
add_action( 'add_meta_boxes', array($this, 'popupaoc_post_sett_metabox') );
|
20 |
|
21 |
// Action to save metabox
|
22 |
-
add_action( 'save_post', array($this, 'popupaoc_save_metabox_value') );
|
23 |
|
24 |
// Action to add custom column to Slider listing
|
25 |
add_filter( 'manage_'.POPUPAOC_POST_TYPE.'_posts_columns', array($this, 'popupaoc_manage_posts_columns') );
|
@@ -45,6 +45,7 @@ class Popupaoc_Admin {
|
|
45 |
*/
|
46 |
function popupaoc_post_sett_metabox() {
|
47 |
add_meta_box( 'popupaoc-post-sett', __( 'Popup - Settings', 'popup-anything-on-click' ), array($this, 'popupaoc_post_sett_mb_content'), POPUPAOC_POST_TYPE, 'normal', 'high' );
|
|
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -56,6 +57,18 @@ class Popupaoc_Admin {
|
|
56 |
function popupaoc_post_sett_mb_content() {
|
57 |
include_once( POPUPAOC_DIR .'/includes/admin/metabox/popupaoc-post-sett-metabox.php');
|
58 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
/**
|
61 |
* Function to save metabox values
|
@@ -161,6 +174,9 @@ class Popupaoc_Admin {
|
|
161 |
*/
|
162 |
function popupaoc_register_menu() {
|
163 |
|
|
|
|
|
|
|
164 |
// Register plugin premium page
|
165 |
add_submenu_page( 'edit.php?post_type='.POPUPAOC_POST_TYPE, __('Upgrade to PRO - Popup Anything', 'popup-anything-on-click'), '<span style="color:#2ECC71">'.__('Upgrade to PRO', 'popup-anything-on-click').'</span>', 'manage_options', 'popupaoc-premium', array($this, 'popupaoc_premium_page') );
|
166 |
|
@@ -168,6 +184,16 @@ class Popupaoc_Admin {
|
|
168 |
add_submenu_page( 'edit.php?post_type='.POPUPAOC_POST_TYPE, __('Hire Us', 'popup-anything-on-click'), '<span style="color:#2ECC71">'.__('Hire Us', 'popup-anything-on-click').'</span>', 'manage_options', 'popupaoc-hireus', array($this, 'popupaoc_hireus_page') );
|
169 |
}
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
/**
|
172 |
* Getting Started Page Html
|
173 |
*
|
@@ -175,7 +201,7 @@ class Popupaoc_Admin {
|
|
175 |
* @since 1.0.0
|
176 |
*/
|
177 |
function popupaoc_premium_page() {
|
178 |
-
include_once( POPUPAOC_DIR . '/includes/settings/premium.php' );
|
179 |
}
|
180 |
|
181 |
/**
|
@@ -185,13 +211,13 @@ class Popupaoc_Admin {
|
|
185 |
* @since 1.2.2
|
186 |
*/
|
187 |
function popupaoc_hireus_page() {
|
188 |
-
include_once( POPUPAOC_DIR . '/includes/settings/hire-us.php' );
|
189 |
}
|
190 |
|
191 |
/**
|
192 |
* Admin Prior Process
|
193 |
*
|
194 |
-
* @package Popup Anything
|
195 |
* @since 1.2.2
|
196 |
*/
|
197 |
function popupaoc_admin_init_process() {
|
@@ -199,6 +225,22 @@ class Popupaoc_Admin {
|
|
199 |
if( isset($_GET['message']) && $_GET['message'] == 'popupaoc-plugin-notice' ) {
|
200 |
set_transient( 'popupaoc_install_notice', true, 604800 );
|
201 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
}
|
203 |
}
|
204 |
|
19 |
add_action( 'add_meta_boxes', array($this, 'popupaoc_post_sett_metabox') );
|
20 |
|
21 |
// Action to save metabox
|
22 |
+
add_action( 'save_post', array($this, 'popupaoc_save_metabox_value') );
|
23 |
|
24 |
// Action to add custom column to Slider listing
|
25 |
add_filter( 'manage_'.POPUPAOC_POST_TYPE.'_posts_columns', array($this, 'popupaoc_manage_posts_columns') );
|
45 |
*/
|
46 |
function popupaoc_post_sett_metabox() {
|
47 |
add_meta_box( 'popupaoc-post-sett', __( 'Popup - Settings', 'popup-anything-on-click' ), array($this, 'popupaoc_post_sett_mb_content'), POPUPAOC_POST_TYPE, 'normal', 'high' );
|
48 |
+
add_meta_box( 'popupaoc-meta-box-shortcode', __( 'Shortcode', 'popup-anything-on-click' ), array($this, 'popupaoc_shortcode_display_callback'), POPUPAOC_POST_TYPE, 'side');
|
49 |
}
|
50 |
|
51 |
/**
|
57 |
function popupaoc_post_sett_mb_content() {
|
58 |
include_once( POPUPAOC_DIR .'/includes/admin/metabox/popupaoc-post-sett-metabox.php');
|
59 |
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Meta box to display shortcode
|
63 |
+
*
|
64 |
+
* @package Popup Anything
|
65 |
+
*/
|
66 |
+
function popupaoc_shortcode_display_callback( $post) {
|
67 |
+
echo "<h3>" .__( 'Shortcode', 'popup-anything-on-click'). "</h3>";
|
68 |
+
echo '<div class="popupaoc-shortcode-preview">[popup_anything id="'.$post->ID.'"]</div>';
|
69 |
+
echo "<h3>" .__( 'Template Code', 'popup-anything-on-click'). "</h3>";
|
70 |
+
echo '<div class="popupaoc-shortcode-preview"><?php do_shortcode("[popup_anything id="'.$post->ID.'"]"); ?></div>';
|
71 |
+
}
|
72 |
|
73 |
/**
|
74 |
* Function to save metabox values
|
174 |
*/
|
175 |
function popupaoc_register_menu() {
|
176 |
|
177 |
+
// Setting page
|
178 |
+
add_submenu_page( 'edit.php?post_type='.POPUPAOC_POST_TYPE, __('Settings - Popup Anything on Click', 'popup-anything-on-click'), __('Settings', 'popup-anything-on-click'), 'manage_options', 'popupaoc-settings', array($this, 'popupaoc_settings_page') );
|
179 |
+
|
180 |
// Register plugin premium page
|
181 |
add_submenu_page( 'edit.php?post_type='.POPUPAOC_POST_TYPE, __('Upgrade to PRO - Popup Anything', 'popup-anything-on-click'), '<span style="color:#2ECC71">'.__('Upgrade to PRO', 'popup-anything-on-click').'</span>', 'manage_options', 'popupaoc-premium', array($this, 'popupaoc_premium_page') );
|
182 |
|
184 |
add_submenu_page( 'edit.php?post_type='.POPUPAOC_POST_TYPE, __('Hire Us', 'popup-anything-on-click'), '<span style="color:#2ECC71">'.__('Hire Us', 'popup-anything-on-click').'</span>', 'manage_options', 'popupaoc-hireus', array($this, 'popupaoc_hireus_page') );
|
185 |
}
|
186 |
|
187 |
+
/**
|
188 |
+
* Getting Started Page Html
|
189 |
+
*
|
190 |
+
* @package Popup Anything on Click
|
191 |
+
* @since 1.0.0
|
192 |
+
*/
|
193 |
+
function popupaoc_settings_page() {
|
194 |
+
include_once( POPUPAOC_DIR . '/includes/admin/settings/settings.php' );
|
195 |
+
}
|
196 |
+
|
197 |
/**
|
198 |
* Getting Started Page Html
|
199 |
*
|
201 |
* @since 1.0.0
|
202 |
*/
|
203 |
function popupaoc_premium_page() {
|
204 |
+
include_once( POPUPAOC_DIR . '/includes/admin/settings/premium.php' );
|
205 |
}
|
206 |
|
207 |
/**
|
211 |
* @since 1.2.2
|
212 |
*/
|
213 |
function popupaoc_hireus_page() {
|
214 |
+
include_once( POPUPAOC_DIR . '/includes/admin/settings/hire-us.php' );
|
215 |
}
|
216 |
|
217 |
/**
|
218 |
* Admin Prior Process
|
219 |
*
|
220 |
+
* @package Popup Anything on Click
|
221 |
* @since 1.2.2
|
222 |
*/
|
223 |
function popupaoc_admin_init_process() {
|
225 |
if( isset($_GET['message']) && $_GET['message'] == 'popupaoc-plugin-notice' ) {
|
226 |
set_transient( 'popupaoc_install_notice', true, 604800 );
|
227 |
}
|
228 |
+
|
229 |
+
// Register Plugin Settings
|
230 |
+
register_setting( 'popupaoc_plugin_options', 'popupaoc_options', array($this, 'popupaoc_validate_options') );
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Validate Settings Options
|
235 |
+
*
|
236 |
+
* @package Popup Anything on Click
|
237 |
+
* @since 1.6.1
|
238 |
+
*/
|
239 |
+
function popupaoc_validate_options( $input ) {
|
240 |
+
|
241 |
+
$input['add_js'] = isset($input['add_js']) ? $input['add_js'] : '';
|
242 |
+
|
243 |
+
return $input;
|
244 |
}
|
245 |
}
|
246 |
|
includes/admin/metabox/popupaoc-post-sett-metabox.php
CHANGED
@@ -87,8 +87,7 @@ else{
|
|
87 |
<tr>
|
88 |
<th><label for="popupaoc-simple-btn-name"><?php echo __('Link Text','popup-anything-on-click');?></label></th>
|
89 |
<td class="row-meta">
|
90 |
-
<input type="text" name="<?php echo $prefix;?>popup_link_txt" value="<?php echo $popup_link_txt; ?>" class="large-text" placeholder="<?php _e('Link Text', 'popup-anything-on-click'); ?>" /><br/>
|
91 |
-
<br/>
|
92 |
<span class="description"><?php _e('Enter text.', 'popup-anything-on-click'); ?></span>
|
93 |
</td>
|
94 |
</tr>
|
@@ -101,8 +100,7 @@ else{
|
|
101 |
<?php _e('Button Text','');?>
|
102 |
</th>
|
103 |
<td class="row-meta">
|
104 |
-
<input type="text" name="<?php echo $prefix;?>popup_button_txt" value="<?php echo $popup_button_txt; ?>" class="large-text" placeholder="<?php _e('Button Text', 'popup-anything-on-click'); ?>" /><br/>
|
105 |
-
<br/>
|
106 |
<span class="description"><?php _e('Enter Popup button text.', 'popup-anything-on-click'); ?></span>
|
107 |
</td>
|
108 |
</tr>
|
87 |
<tr>
|
88 |
<th><label for="popupaoc-simple-btn-name"><?php echo __('Link Text','popup-anything-on-click');?></label></th>
|
89 |
<td class="row-meta">
|
90 |
+
<input type="text" name="<?php echo $prefix;?>popup_link_txt" value="<?php echo $popup_link_txt; ?>" class="large-text" placeholder="<?php _e('Link Text', 'popup-anything-on-click'); ?>" /><br/>
|
|
|
91 |
<span class="description"><?php _e('Enter text.', 'popup-anything-on-click'); ?></span>
|
92 |
</td>
|
93 |
</tr>
|
100 |
<?php _e('Button Text','');?>
|
101 |
</th>
|
102 |
<td class="row-meta">
|
103 |
+
<input type="text" name="<?php echo $prefix;?>popup_button_txt" value="<?php echo $popup_button_txt; ?>" class="large-text" placeholder="<?php _e('Button Text', 'popup-anything-on-click'); ?>" /><br/>
|
|
|
104 |
<span class="description"><?php _e('Enter Popup button text.', 'popup-anything-on-click'); ?></span>
|
105 |
</td>
|
106 |
</tr>
|
includes/{settings → admin/settings}/hire-us.php
RENAMED
File without changes
|
includes/{settings → admin/settings}/premium.php
RENAMED
File without changes
|
includes/admin/settings/settings.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings Page
|
4 |
+
*
|
5 |
+
* @package Popup Anything on Click
|
6 |
+
* @since 1.6.1
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit; // Exit if accessed directly
|
11 |
+
}
|
12 |
+
|
13 |
+
global $popupaoc_options;
|
14 |
+
$add_js = popupaoc_get_option('add_js');
|
15 |
+
|
16 |
+
?>
|
17 |
+
|
18 |
+
<div class="wrap popupaoc-settings">
|
19 |
+
|
20 |
+
<h2><?php _e( 'Popup Anything on Click - Settings', 'popup-anything-on-click' ); ?></h2>
|
21 |
+
|
22 |
+
<?php
|
23 |
+
// Success message
|
24 |
+
if( isset($_GET['settings-updated']) && $_GET['settings-updated'] == 'true' ) {
|
25 |
+
echo '<div id="message" class="updated notice notice-success is-dismissible">
|
26 |
+
<p><strong>'.__("Your changes saved successfully.", "popup-anything-on-click").'</strong></p>
|
27 |
+
</div>';
|
28 |
+
}
|
29 |
+
?>
|
30 |
+
|
31 |
+
<form action="options.php" method="POST" id="popupaoc-settings-form" class="popupaoc-settings-form">
|
32 |
+
|
33 |
+
<?php settings_fields( 'popupaoc_plugin_options' ); ?>
|
34 |
+
|
35 |
+
<div class="metabox-holder">
|
36 |
+
<div class="meta-box-sortables">
|
37 |
+
|
38 |
+
<!-- General Settings Starts -->
|
39 |
+
<div class="postbox">
|
40 |
+
|
41 |
+
<button class="handlediv button-link" type="button"><span class="toggle-indicator"></span></button>
|
42 |
+
|
43 |
+
<!-- Settings box title -->
|
44 |
+
<h3 class="hndle">
|
45 |
+
<span><?php _e( 'General Settings', 'popup-anything-on-click' ); ?></span>
|
46 |
+
</h3>
|
47 |
+
|
48 |
+
<div id="general" class="inside">
|
49 |
+
<table class="form-table popupaoc-general-sett-tbl">
|
50 |
+
<tbody>
|
51 |
+
<tr>
|
52 |
+
<th scope="row">
|
53 |
+
<label for="popupaoc-add-js"><?php _e('Manage Polyfill JS', 'popup-anything-on-click'); ?></label>
|
54 |
+
</th>
|
55 |
+
<td>
|
56 |
+
<select name="popupaoc_options[add_js]" class="popupaoc-add-js" id="popupaoc-add-js">
|
57 |
+
<option value=""><?php _e('Select Option', 'popup-anything-on-click'); ?></option>
|
58 |
+
<option value="1" <?php selected( $add_js, 1 ); ?>><?php _e('Disable polyfill js file to load from this plugin', 'popup-anything-on-click'); ?></option>
|
59 |
+
<option value="2" <?php selected( $add_js, 2 ); ?>><?php _e('Include polyfill js file in header', 'popup-anything-on-click'); ?></option>
|
60 |
+
</select><br>
|
61 |
+
<span class="description"><?php esc_html_e( 'Note : If you are facing any error related Polyfill JS eg : Uncaught Error: only one instance of babel-polyfill is allowed, than select above option to hide plugin polyfill js or inluclude polyfill js in header so no conflict arise with default js of WordPress. You are getting this error because of there are two version of polyfill.js loading in your website.', 'popup-anything-on-click'); ?></span>
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td colspan="2" scope="row">
|
66 |
+
<input type="submit" name="popupaoc_sett_submit" class="button button-primary right" value="<?php _e('Save Changes', 'popup-anything-on-click'); ?>" />
|
67 |
+
</td>
|
68 |
+
</tr>
|
69 |
+
</tbody>
|
70 |
+
</table>
|
71 |
+
</div><!-- .inside -->
|
72 |
+
</div><!-- .postbox -->
|
73 |
+
<!-- General Settings Ends -->
|
74 |
+
|
75 |
+
</div><!-- .meta-box-sortables -->
|
76 |
+
</div><!-- .metabox-holder -->
|
77 |
+
|
78 |
+
</form><!-- end .popupaoc-settings-form -->
|
79 |
+
</div><!-- end .popupaoc-settings -->
|
includes/class-popupaoc-script.php
CHANGED
@@ -48,12 +48,23 @@ class Popupaoc_Script {
|
|
48 |
* @package Popup anything on click
|
49 |
* @since 1.0.0
|
50 |
*/
|
51 |
-
function popupaoc_plugin_script() {
|
|
|
|
|
|
|
52 |
// Registring frontend js
|
53 |
if( !wp_script_is( 'jquery-custombox-legacy', 'registered' ) ) {
|
54 |
-
wp_register_script( 'jquery-custombox-legacy', POPUPAOC_URL.'assets/js/custombox.legacy.min.js', array('jquery'), POPUPAOC_VERSION,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
-
wp_register_script( 'popupaoc-popup-js', POPUPAOC_URL.'assets/js/popupaoc-popup.min.js', array('jquery'), POPUPAOC_VERSION, true );
|
57 |
|
58 |
}
|
59 |
|
48 |
* @package Popup anything on click
|
49 |
* @since 1.0.0
|
50 |
*/
|
51 |
+
function popupaoc_plugin_script() {
|
52 |
+
|
53 |
+
global $popupaoc_options;
|
54 |
+
|
55 |
// Registring frontend js
|
56 |
if( !wp_script_is( 'jquery-custombox-legacy', 'registered' ) ) {
|
57 |
+
wp_register_script( 'jquery-custombox-legacy', POPUPAOC_URL.'assets/js/custombox.legacy.min.js', array('jquery'), POPUPAOC_VERSION, false );
|
58 |
+
}
|
59 |
+
|
60 |
+
// Register js in header
|
61 |
+
if( !empty($popupaoc_options['add_js']) && $popupaoc_options['add_js'] == 2 ) {
|
62 |
+
wp_enqueue_script('jquery-custombox-legacy');
|
63 |
+
}
|
64 |
+
|
65 |
+
if( !wp_script_is( 'jquery-custombox', 'registered' ) ) {
|
66 |
+
wp_register_script( 'jquery-custombox', POPUPAOC_URL.'assets/js/custombox.min.js', array('jquery'), POPUPAOC_VERSION, true );
|
67 |
}
|
|
|
68 |
|
69 |
}
|
70 |
|
includes/popupaoc-functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin generic functions file
|
4 |
*
|
5 |
-
* @package Popup Anything
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
|
@@ -12,7 +12,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
12 |
/**
|
13 |
* Function to get unique value number
|
14 |
*
|
15 |
-
* @package Popup Anything
|
16 |
* @since 1.0
|
17 |
*/
|
18 |
function popupaoc_get_unique() {
|
@@ -25,7 +25,7 @@ function popupaoc_get_unique() {
|
|
25 |
/**
|
26 |
* Function to get button style type
|
27 |
*
|
28 |
-
* @package Popup Anything
|
29 |
* @since 1.0.0
|
30 |
*/
|
31 |
function popupaoc_popup_type() {
|
@@ -40,7 +40,7 @@ function popupaoc_popup_type() {
|
|
40 |
/**
|
41 |
* Function to get button style type
|
42 |
*
|
43 |
-
* @package Popup Anything
|
44 |
* @since 1.0.0
|
45 |
*/
|
46 |
function popupaoc_effect() {
|
@@ -68,7 +68,7 @@ function popupaoc_effect() {
|
|
68 |
/**
|
69 |
* Function to get button style type
|
70 |
*
|
71 |
-
* @package Popup Anything
|
72 |
* @since 1.0.0
|
73 |
*/
|
74 |
function popupaoc_positionx() {
|
@@ -83,7 +83,7 @@ function popupaoc_positionx() {
|
|
83 |
/**
|
84 |
* Function to get button style type
|
85 |
*
|
86 |
-
* @package Popup Anything
|
87 |
* @since 1.0.0
|
88 |
*/
|
89 |
function popupaoc_positiony() {
|
@@ -99,7 +99,7 @@ function popupaoc_positiony() {
|
|
99 |
/**
|
100 |
* Function to Full Screen
|
101 |
*
|
102 |
-
* @package Popup Anything
|
103 |
* @since 1.0.0
|
104 |
*/
|
105 |
function popupaoc_popupfullscreen() {
|
@@ -114,7 +114,7 @@ function popupaoc_popupfullscreen() {
|
|
114 |
/**
|
115 |
* Function to Overlay
|
116 |
*
|
117 |
-
* @package Popup Anything
|
118 |
* @since 1.0.0
|
119 |
*/
|
120 |
function popupaoc_popupoverlay() {
|
@@ -128,7 +128,7 @@ function popupaoc_popupoverlay() {
|
|
128 |
/**
|
129 |
* Function to Loader
|
130 |
*
|
131 |
-
* @package Popup Anything
|
132 |
* @since 1.0.0
|
133 |
*/
|
134 |
function popupaoc_lodaer() {
|
@@ -139,13 +139,64 @@ function popupaoc_lodaer() {
|
|
139 |
return apply_filters('popupaoc_lodaer', $popuploader );
|
140 |
}
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
/**
|
144 |
* Escape Tags & Slashes
|
145 |
*
|
146 |
* Handles escapping the slashes and tags
|
147 |
*
|
148 |
-
* @package Popup Anything
|
149 |
* @since 1.0.0
|
150 |
*/
|
151 |
function popupaoc_esc_attr($data) {
|
@@ -155,7 +206,7 @@ function popupaoc_esc_attr($data) {
|
|
155 |
/**
|
156 |
* Strip Slashes From Array
|
157 |
*
|
158 |
-
* @package Popup Anything
|
159 |
* @since 1.0.0
|
160 |
*/
|
161 |
function popupaoc_slashes_deep($data = array(), $flag = false) {
|
@@ -172,7 +223,7 @@ function popupaoc_slashes_deep($data = array(), $flag = false) {
|
|
172 |
*
|
173 |
* It will sanitize text input (strip html tags, and escape characters)
|
174 |
*
|
175 |
-
* @package Popup Anything
|
176 |
* @since 1.0.0
|
177 |
*/
|
178 |
|
@@ -193,7 +244,7 @@ function popupaoc_nohtml_kses($data = array()) {
|
|
193 |
/**
|
194 |
* Function to add array after specific key
|
195 |
*
|
196 |
-
* @package Popup Anything
|
197 |
* @since 1.0.0
|
198 |
*/
|
199 |
function popupaoc_add_array(&$array, $value, $index, $from_last = false) {
|
2 |
/**
|
3 |
* Plugin generic functions file
|
4 |
*
|
5 |
+
* @package Popup Anything On Click
|
6 |
* @since 1.0.0
|
7 |
*/
|
8 |
|
12 |
/**
|
13 |
* Function to get unique value number
|
14 |
*
|
15 |
+
* @package Popup Anything On Click
|
16 |
* @since 1.0
|
17 |
*/
|
18 |
function popupaoc_get_unique() {
|
25 |
/**
|
26 |
* Function to get button style type
|
27 |
*
|
28 |
+
* @package Popup Anything On Click
|
29 |
* @since 1.0.0
|
30 |
*/
|
31 |
function popupaoc_popup_type() {
|
40 |
/**
|
41 |
* Function to get button style type
|
42 |
*
|
43 |
+
* @package Popup Anything On Click
|
44 |
* @since 1.0.0
|
45 |
*/
|
46 |
function popupaoc_effect() {
|
68 |
/**
|
69 |
* Function to get button style type
|
70 |
*
|
71 |
+
* @package Popup Anything On Click
|
72 |
* @since 1.0.0
|
73 |
*/
|
74 |
function popupaoc_positionx() {
|
83 |
/**
|
84 |
* Function to get button style type
|
85 |
*
|
86 |
+
* @package Popup Anything On Click
|
87 |
* @since 1.0.0
|
88 |
*/
|
89 |
function popupaoc_positiony() {
|
99 |
/**
|
100 |
* Function to Full Screen
|
101 |
*
|
102 |
+
* @package Popup Anything On Click
|
103 |
* @since 1.0.0
|
104 |
*/
|
105 |
function popupaoc_popupfullscreen() {
|
114 |
/**
|
115 |
* Function to Overlay
|
116 |
*
|
117 |
+
* @package Popup Anything On Click
|
118 |
* @since 1.0.0
|
119 |
*/
|
120 |
function popupaoc_popupoverlay() {
|
128 |
/**
|
129 |
* Function to Loader
|
130 |
*
|
131 |
+
* @package Popup Anything On Click
|
132 |
* @since 1.0.0
|
133 |
*/
|
134 |
function popupaoc_lodaer() {
|
139 |
return apply_filters('popupaoc_lodaer', $popuploader );
|
140 |
}
|
141 |
|
142 |
+
/**
|
143 |
+
* Set Settings Default Option Page
|
144 |
+
*
|
145 |
+
* Handles to return all settings value
|
146 |
+
*
|
147 |
+
* @package Popup Anything On Click
|
148 |
+
* @since 1.6.1
|
149 |
+
*/
|
150 |
+
function popupaoc_default_settings() {
|
151 |
+
global $popupaoc_options;
|
152 |
+
|
153 |
+
$default_options = array(
|
154 |
+
'add_js' => '',
|
155 |
+
);
|
156 |
+
|
157 |
+
$default_options = apply_filters('popupaoc_default_settings', $default_options );
|
158 |
+
// Update default options
|
159 |
+
update_option( 'popupaoc_options', $default_options );
|
160 |
+
// Overwrite global variable when option is update
|
161 |
+
$popupaoc_options = popupaoc_get_settings();
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Get Settings From Option Page
|
166 |
+
*
|
167 |
+
* Handles to return all settings value
|
168 |
+
*
|
169 |
+
* @package Popup Anything On Click
|
170 |
+
* @since 1.6.1
|
171 |
+
*/
|
172 |
+
function popupaoc_get_settings() {
|
173 |
+
|
174 |
+
$options = get_option('popupaoc_options');
|
175 |
+
$settings = is_array($options) ? $options : array();
|
176 |
+
return $settings;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Get an option
|
181 |
+
* Looks to see if the specified setting exists, returns default if not
|
182 |
+
*
|
183 |
+
* @package Popup Anything On Click
|
184 |
+
* @since 1.6.1
|
185 |
+
*/
|
186 |
+
function popupaoc_get_option( $key = '', $default = false ) {
|
187 |
+
global $popupaoc_options;
|
188 |
+
|
189 |
+
$value = ! empty( $popupaoc_options[ $key ] ) ? $popupaoc_options[ $key ] : $default;
|
190 |
+
$value = apply_filters( 'popupaoc_get_option', $value, $key, $default );
|
191 |
+
return apply_filters( 'popupaoc_get_option_' . $key, $value, $key, $default );
|
192 |
+
}
|
193 |
|
194 |
/**
|
195 |
* Escape Tags & Slashes
|
196 |
*
|
197 |
* Handles escapping the slashes and tags
|
198 |
*
|
199 |
+
* @package Popup Anything On Click
|
200 |
* @since 1.0.0
|
201 |
*/
|
202 |
function popupaoc_esc_attr($data) {
|
206 |
/**
|
207 |
* Strip Slashes From Array
|
208 |
*
|
209 |
+
* @package Popup Anything On Click
|
210 |
* @since 1.0.0
|
211 |
*/
|
212 |
function popupaoc_slashes_deep($data = array(), $flag = false) {
|
223 |
*
|
224 |
* It will sanitize text input (strip html tags, and escape characters)
|
225 |
*
|
226 |
+
* @package Popup Anything On Click
|
227 |
* @since 1.0.0
|
228 |
*/
|
229 |
|
244 |
/**
|
245 |
* Function to add array after specific key
|
246 |
*
|
247 |
+
* @package Popup Anything On Click
|
248 |
* @since 1.0.0
|
249 |
*/
|
250 |
function popupaoc_add_array(&$array, $value, $index, $from_last = false) {
|
includes/shortcode/popupaoc-popup-shortcode.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php
|
2 |
* 'popup_anything' Shortcode
|
3 |
*
|
4 |
* @package Popup anything on click
|
5 |
* @since 1.0.0
|
6 |
*/
|
|
|
7 |
* 'popup_anything' Shortcode
|
8 |
*
|
9 |
* @package Popup anything on click
|
10 |
* @since 1.0.0
|
11 |
*/
|
|
|
1 |
* 'popup_anything' Shortcode
|
2 |
*
|
3 |
* @package Popup anything on click
|
4 |
* @since 1.0.0
|
5 |
*/
|
6 |
+
<?php
|
7 |
* 'popup_anything' Shortcode
|
8 |
*
|
9 |
* @package Popup anything on click
|
10 |
* @since 1.0.0
|
11 |
*/
|
popup-anything-on-click.php
CHANGED
@@ -5,13 +5,13 @@
|
|
5 |
* Text Domain: popup-anything-on-click
|
6 |
* Description: Display a modal popup by clicking on a link, image or button. Also work with Gutenberg shortcode block.
|
7 |
* Domain Path: /languages/
|
8 |
-
* Version: 1.
|
9 |
* Author: WP OnlineSupport
|
10 |
* Author URI: https://www.wponlinesupport.com
|
11 |
*/
|
12 |
|
13 |
if( !defined( 'POPUPAOC_VERSION' ) ) {
|
14 |
-
define( 'POPUPAOC_VERSION', '1.
|
15 |
}
|
16 |
if( !defined( 'POPUPAOC_DIR' ) ) {
|
17 |
define( 'POPUPAOC_DIR', dirname( __FILE__ ) ); // Plugin dir
|
@@ -44,6 +44,14 @@ function popupaoc_load_textdomain() {
|
|
44 |
|
45 |
register_activation_hook( __FILE__, 'popupaoc_install' );
|
46 |
function popupaoc_install() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
if( is_plugin_active('popup-anything-on-click-pro/popup-anything-on-click-pro.php') ) {
|
48 |
add_action('update_option_active_plugins', 'popupaoc_deactivate_pro_version');
|
49 |
}
|
@@ -74,10 +82,11 @@ function popupaoc_plugin_admin_notice() {
|
|
74 |
}
|
75 |
|
76 |
// Taking some global variable
|
77 |
-
global $paoc_popup_data;
|
78 |
|
79 |
// Funcions File
|
80 |
require_once( POPUPAOC_DIR .'/includes/popupaoc-functions.php' );
|
|
|
81 |
|
82 |
// Post Type File
|
83 |
require_once( POPUPAOC_DIR . '/includes/popupaoc-post-types.php' );
|
5 |
* Text Domain: popup-anything-on-click
|
6 |
* Description: Display a modal popup by clicking on a link, image or button. Also work with Gutenberg shortcode block.
|
7 |
* Domain Path: /languages/
|
8 |
+
* Version: 1.6.2
|
9 |
* Author: WP OnlineSupport
|
10 |
* Author URI: https://www.wponlinesupport.com
|
11 |
*/
|
12 |
|
13 |
if( !defined( 'POPUPAOC_VERSION' ) ) {
|
14 |
+
define( 'POPUPAOC_VERSION', '1.6.2' ); // Version of plugin
|
15 |
}
|
16 |
if( !defined( 'POPUPAOC_DIR' ) ) {
|
17 |
define( 'POPUPAOC_DIR', dirname( __FILE__ ) ); // Plugin dir
|
44 |
|
45 |
register_activation_hook( __FILE__, 'popupaoc_install' );
|
46 |
function popupaoc_install() {
|
47 |
+
|
48 |
+
// Get settings for the plugin
|
49 |
+
$popupaoc_options = get_option( 'popupaoc_options' );
|
50 |
+
if( empty( $popupaoc_options ) ) {
|
51 |
+
// Set default settings
|
52 |
+
popupaoc_default_settings();
|
53 |
+
}
|
54 |
+
|
55 |
if( is_plugin_active('popup-anything-on-click-pro/popup-anything-on-click-pro.php') ) {
|
56 |
add_action('update_option_active_plugins', 'popupaoc_deactivate_pro_version');
|
57 |
}
|
82 |
}
|
83 |
|
84 |
// Taking some global variable
|
85 |
+
global $paoc_popup_data, $popupaoc_options;
|
86 |
|
87 |
// Funcions File
|
88 |
require_once( POPUPAOC_DIR .'/includes/popupaoc-functions.php' );
|
89 |
+
$popupaoc_options = popupaoc_get_settings();
|
90 |
|
91 |
// Post Type File
|
92 |
require_once( POPUPAOC_DIR . '/includes/popupaoc-post-types.php' );
|
readme.txt
CHANGED
@@ -99,6 +99,9 @@ function prefix_gutenberg_editor_support($popupaoc_args){
|
|
99 |
add_filter( 'popupaoc_registered_post_type_args', 'prefix_gutenberg_editor_support' );
|
100 |
</code>
|
101 |
|
|
|
|
|
|
|
102 |
|
103 |
== Screenshots ==
|
104 |
|
@@ -110,6 +113,21 @@ add_filter( 'popupaoc_registered_post_type_args', 'prefix_gutenberg_editor_suppo
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
= 1.5.1 (06, Jan 2020) =
|
114 |
* [*] Fixed z-index issue with divi theme.
|
115 |
|
99 |
add_filter( 'popupaoc_registered_post_type_args', 'prefix_gutenberg_editor_support' );
|
100 |
</code>
|
101 |
|
102 |
+
= I am getting following error : Uncaught Error: only one instance of babel-polyfill is allowed. Can you please tell me what is the solution? =
|
103 |
+
|
104 |
+
You are getting this error because of there are two version of polyfill.js loading in your website. Solution is just go to Popup Anything --> Settings and manage the setting. You can disable polyfill js file to load from this plugin OR include polyfill js file in header.
|
105 |
|
106 |
== Screenshots ==
|
107 |
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= 1.6.2 (16, Jan 2020) =
|
117 |
+
* [+] Added new setting page (Popup Anything --> Settings) to manage "babel-polyfill" js. Under this setting page you can manage babel-polyfill disable to load from Popup anything plugin or add babel-polyfill on header to remove conflict with WordPress default "wp-polyfill" js.
|
118 |
+
* [+] Added shortcode view meta box.
|
119 |
+
* [-] Removed some unwanted files.
|
120 |
+
* [*] Tweak - fixed js loading issue.
|
121 |
+
|
122 |
+
= 1.6.1 (09, Jan 2020) =
|
123 |
+
* [+] Added new setting page (Popup Anything --> Settings) to manage "babel-polyfill" js. Under this setting page you can manage babel-polyfill disable to load from Popup anything plugin or add babel-polyfill on header to remove conflict with WordPress default "wp-polyfill" js.
|
124 |
+
* [*] Tweak - Code optimization and performance improvements.
|
125 |
+
|
126 |
+
= 1.6 (06, Jan 2020) =
|
127 |
+
* [*] Due to Uncaught Error: only one instance of babel-polyfill is allowed reporetd by some users we have added jquery- prefix with custombox.legacy.min.js and custombox.min.js to avoid the conflict with custombox jQuery library already Registred in a theme or in any third-party plugin.
|
128 |
+
* [*] Renamed : We have Renamed popupaoc-popup.min.js file to custombox.min.js.
|
129 |
+
* [*] Important Note : Please clear your website cache (if you are using) after updating the plugin.
|
130 |
+
|
131 |
= 1.5.1 (06, Jan 2020) =
|
132 |
* [*] Fixed z-index issue with divi theme.
|
133 |
|