Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Easy Modal |
Version | 2.0.12 |
Comparing to | |
See all releases |
Code changes from version 2.0.11 to 2.0.12
- classes/controller/admin/modals.php +1 -0
- classes/controller/admin/theme.php +1 -1
- classes/model/theme/meta.php +1 -1
- classes/view/admin/modal/index.php +5 -9
- easy-modal.php +2 -2
- includes/admin/options.php +23 -23
- init.php +1 -1
- readme.txt +1 -1
classes/controller/admin/modals.php
CHANGED
@@ -53,6 +53,7 @@
|
|
53 |
if($this->check_post_nonce())
|
54 |
{
|
55 |
$new_values = apply_filters('emodal_modal_pre_save', $current_modal->as_array());
|
|
|
56 |
$current_modal->set_fields($new_values);
|
57 |
$current_modal->save();
|
58 |
if(!$current_modal->id)
|
53 |
if($this->check_post_nonce())
|
54 |
{
|
55 |
$new_values = apply_filters('emodal_modal_pre_save', $current_modal->as_array());
|
56 |
+
$current_modal->set_fields(apply_filters("emodal_model_modal_meta_defaults", $new_values));
|
57 |
$current_modal->set_fields($new_values);
|
58 |
$current_modal->save();
|
59 |
if(!$current_modal->id)
|
classes/controller/admin/theme.php
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
if($this->check_post_nonce())
|
24 |
{
|
25 |
$new_values = apply_filters('emodal_theme_pre_save', $current_theme->as_array());
|
26 |
-
$current_theme->set_fields(apply_filters("
|
27 |
$current_theme->save();
|
28 |
do_action('emodal_theme_save', $current_theme);
|
29 |
EModal_Admin_Notice::add(__('Theme Updated.',EMCORE_SLUG), 'updated');
|
23 |
if($this->check_post_nonce())
|
24 |
{
|
25 |
$new_values = apply_filters('emodal_theme_pre_save', $current_theme->as_array());
|
26 |
+
$current_theme->set_fields(apply_filters("emodal_model_theme_meta_defaults", $new_values));
|
27 |
$current_theme->save();
|
28 |
do_action('emodal_theme_save', $current_theme);
|
29 |
EModal_Admin_Notice::add(__('Theme Updated.',EMCORE_SLUG), 'updated');
|
classes/model/theme/meta.php
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
}
|
30 |
else
|
31 |
{
|
32 |
-
$this->set_fields(apply_filters("{$class_name}_defaults", array()));
|
33 |
}
|
34 |
return $this;
|
35 |
}
|
29 |
}
|
30 |
else
|
31 |
{
|
32 |
+
$this->set_fields( apply_filters("{$class_name}_defaults", array()) );
|
33 |
}
|
34 |
return $this;
|
35 |
}
|
classes/view/admin/modal/index.php
CHANGED
@@ -103,12 +103,7 @@ class EModal_Modal_List_Table extends WP_List_Table {
|
|
103 |
//How many to display per page?
|
104 |
$perpage = 5;
|
105 |
//Which page is this?
|
106 |
-
$paged = !empty($_GET["paged"]) ?
|
107 |
-
//Page Number
|
108 |
-
if(empty($paged) || !is_numeric($paged) || $paged<=0 )
|
109 |
-
{
|
110 |
-
$paged=1;
|
111 |
-
}
|
112 |
//How many pages do we have in total?
|
113 |
$totalpages = ceil($totalitems/$perpage);
|
114 |
//adjust the query to take pagination into account
|
@@ -125,6 +120,7 @@ class EModal_Modal_List_Table extends WP_List_Table {
|
|
125 |
"total_pages" => $totalpages,
|
126 |
"per_page" => $perpage,
|
127 |
) );
|
|
|
128 |
//The pagination links are automatically built according to those parameters
|
129 |
|
130 |
/* -- Register the Columns -- */
|
@@ -194,9 +190,9 @@ class EModal_Modal_List_Table extends WP_List_Table {
|
|
194 |
}
|
195 |
function column_name($item)
|
196 |
{
|
197 |
-
$
|
198 |
$edit_link = esc_url( emodal_admin_url() .'&action=edit&id='. $item->id);
|
199 |
-
$delete_link = esc_url(wp_nonce_url( emodal_admin_url() .'&action=delete&id[]='. $item->id, EMCORE_NONCE, EMCORE_NONCE));
|
200 |
|
201 |
$out = '<strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf( __( 'Edit “%s”', EMCORE_SLUG), $item->name)) . '">' . $item->name . '</a></strong><br />';
|
202 |
|
@@ -205,10 +201,10 @@ class EModal_Modal_List_Table extends WP_List_Table {
|
|
205 |
$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', EMCORE_SLUG) . '</a>';
|
206 |
//$actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __( 'Quick Edit' ) . '</a>';
|
207 |
//}
|
|
|
208 |
//if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
|
209 |
$actions['delete'] = "<a class='delete-tag' href='" . $delete_link . "'>" . __('Delete', EMCORE_SLUG) . "</a>";
|
210 |
//if ( $tax->public )
|
211 |
-
$actions['view'] = '<a href="' . $view_link . '">' . __('View', EMCORE_SLUG) . '</a>';
|
212 |
|
213 |
//$actions = apply_filters( 'tag_row_actions', $actions, $tag );
|
214 |
|
103 |
//How many to display per page?
|
104 |
$perpage = 5;
|
105 |
//Which page is this?
|
106 |
+
$paged = !empty($_GET["paged"]) && intval($_GET["paged"]) > 0 ? intval( $_GET["paged"] ) : 1;
|
|
|
|
|
|
|
|
|
|
|
107 |
//How many pages do we have in total?
|
108 |
$totalpages = ceil($totalitems/$perpage);
|
109 |
//adjust the query to take pagination into account
|
120 |
"total_pages" => $totalpages,
|
121 |
"per_page" => $perpage,
|
122 |
) );
|
123 |
+
|
124 |
//The pagination links are automatically built according to those parameters
|
125 |
|
126 |
/* -- Register the Columns -- */
|
190 |
}
|
191 |
function column_name($item)
|
192 |
{
|
193 |
+
$clone_link = esc_url( wp_nonce_url( emodal_admin_url() .'&action=clone&id='. $item->id, EMCORE_NONCE, EMCORE_NONCE));
|
194 |
$edit_link = esc_url( emodal_admin_url() .'&action=edit&id='. $item->id);
|
195 |
+
$delete_link = esc_url( wp_nonce_url( emodal_admin_url() .'&action=delete&id[]='. $item->id, EMCORE_NONCE, EMCORE_NONCE));
|
196 |
|
197 |
$out = '<strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf( __( 'Edit “%s”', EMCORE_SLUG), $item->name)) . '">' . $item->name . '</a></strong><br />';
|
198 |
|
201 |
$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', EMCORE_SLUG) . '</a>';
|
202 |
//$actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __( 'Quick Edit' ) . '</a>';
|
203 |
//}
|
204 |
+
$actions['clone'] = '<a href="' . $clone_link . '">' . __('Clone', EMCORE_SLUG) . '</a>';
|
205 |
//if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
|
206 |
$actions['delete'] = "<a class='delete-tag' href='" . $delete_link . "'>" . __('Delete', EMCORE_SLUG) . "</a>";
|
207 |
//if ( $tax->public )
|
|
|
208 |
|
209 |
//$actions = apply_filters( 'tag_row_actions', $actions, $tag );
|
210 |
|
easy-modal.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Easy Modal
|
|
4 |
Plugin URI: http://easy-modal.com
|
5 |
Description: Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos & more.
|
6 |
Author: Wizard Internet Solutions
|
7 |
-
Version: 2.0.
|
8 |
Author URI: http://wizardinternetsolutions.com
|
9 |
Text Domain: easy-modal
|
10 |
*/
|
@@ -21,7 +21,7 @@ if (!defined('EMCORE_URL'))
|
|
21 |
if (!defined('EMCORE_NONCE'))
|
22 |
define('EMCORE_NONCE', EMCORE_SLUG.'_nonce' );
|
23 |
if (!defined('EMCORE_VERSION'))
|
24 |
-
define('EMCORE_VERSION', '2.0.
|
25 |
if (!defined('EMCORE_DB_VERSION'))
|
26 |
define('EMCORE_DB_VERSION', '1' );
|
27 |
if (!defined('EMCORE_API_URL'))
|
4 |
Plugin URI: http://easy-modal.com
|
5 |
Description: Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos & more.
|
6 |
Author: Wizard Internet Solutions
|
7 |
+
Version: 2.0.12
|
8 |
Author URI: http://wizardinternetsolutions.com
|
9 |
Text Domain: easy-modal
|
10 |
*/
|
21 |
if (!defined('EMCORE_NONCE'))
|
22 |
define('EMCORE_NONCE', EMCORE_SLUG.'_nonce' );
|
23 |
if (!defined('EMCORE_VERSION'))
|
24 |
+
define('EMCORE_VERSION', '2.0.12' );
|
25 |
if (!defined('EMCORE_DB_VERSION'))
|
26 |
define('EMCORE_DB_VERSION', '1' );
|
27 |
if (!defined('EMCORE_API_URL'))
|
includes/admin/options.php
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
function emodal_model_modal_meta_core_defaults($options){
|
4 |
-
$options['display']['overlay_disabled'] = 0;
|
5 |
-
$options['display']['size'] = 'medium';
|
6 |
-
$options['display']['custom_width'] = '';
|
7 |
-
$options['display']['custom_width_unit'] = '%';
|
8 |
-
$options['display']['custom_height'] = '';
|
9 |
-
$options['display']['custom_height_unit'] = 'em';
|
10 |
-
$options['display']['custom_height_auto'] = 1;
|
11 |
-
|
12 |
-
$options['display']['location'] = 'center top';
|
13 |
-
$options['display']['position']['top'] = 100;
|
14 |
-
$options['display']['position']['left'] = 0;
|
15 |
-
$options['display']['position']['bottom'] = 0;
|
16 |
-
$options['display']['position']['right'] = 0;
|
17 |
-
$options['display']['position']['fixed'] = 0;
|
18 |
-
|
19 |
-
$options['display']['animation']['type'] = 'fade';
|
20 |
-
$options['display']['animation']['speed'] = 350;
|
21 |
-
$options['display']['animation']['origin'] = 'center top';
|
22 |
-
|
23 |
-
$options['close']['overlay_click'] = 0;
|
24 |
-
$options['close']['esc_press'] = 1;
|
25 |
return $options;
|
26 |
}
|
27 |
|
28 |
-
|
29 |
function emodal_model_theme_meta_core_defaults($options){
|
30 |
|
31 |
|
1 |
<?php
|
2 |
+
add_filter('emodal_model_modal_meta_defaults', 'emodal_model_modal_meta_core_defaults', 10);
|
3 |
function emodal_model_modal_meta_core_defaults($options){
|
4 |
+
if(empty($options['display']['overlay_disabled'] )) $options['display']['overlay_disabled'] = 0;
|
5 |
+
if(empty($options['display']['size'])) $options['display']['size'] = 'medium';
|
6 |
+
if(empty($options['display']['custom_width'])) $options['display']['custom_width'] = '';
|
7 |
+
if(empty($options['display']['custom_width_unit'])) $options['display']['custom_width_unit'] = '%';
|
8 |
+
if(empty($options['display']['custom_height'])) $options['display']['custom_height'] = '';
|
9 |
+
if(empty($options['display']['custom_height_unit'])) $options['display']['custom_height_unit'] = 'em';
|
10 |
+
if(empty($options['display']['custom_height_auto'])) $options['display']['custom_height_auto'] = 1;
|
11 |
+
|
12 |
+
if(empty($options['display']['location'])) $options['display']['location'] = 'center top';
|
13 |
+
if(empty($options['display']['position']['top'])) $options['display']['position']['top'] = 100;
|
14 |
+
if(empty($options['display']['position']['left'])) $options['display']['position']['left'] = 0;
|
15 |
+
if(empty($options['display']['position']['bottom'])) $options['display']['position']['bottom'] = 0;
|
16 |
+
if(empty($options['display']['position']['right'])) $options['display']['position']['right'] = 0;
|
17 |
+
if(empty($options['display']['position']['fixed'])) $options['display']['position']['fixed'] = 0;
|
18 |
+
|
19 |
+
if(empty($options['display']['animation']['type'])) $options['display']['animation']['type'] = 'fade';
|
20 |
+
if(empty($options['display']['animation']['speed'])) $options['display']['animation']['speed'] = 350;
|
21 |
+
if(empty($options['display']['animation']['origin'])) $options['display']['animation']['origin'] = 'center top';
|
22 |
+
|
23 |
+
if(empty($options['close']['overlay_click'])) $options['close']['overlay_click'] = 0;
|
24 |
+
if(empty($options['close']['esc_press'])) $options['close']['esc_press'] = 1;
|
25 |
return $options;
|
26 |
}
|
27 |
|
28 |
+
add_filter('emodal_model_theme_meta_defaults', 'emodal_model_theme_meta_core_defaults', 10);
|
29 |
function emodal_model_theme_meta_core_defaults($options){
|
30 |
|
31 |
|
init.php
CHANGED
@@ -32,7 +32,7 @@ if(is_admin())
|
|
32 |
|
33 |
// API
|
34 |
require EMCORE_DIR.'/classes/license.php';
|
35 |
-
|
36 |
require EMCORE_DIR.'/includes/plugin-updater.php';
|
37 |
|
38 |
|
32 |
|
33 |
// API
|
34 |
require EMCORE_DIR.'/classes/license.php';
|
35 |
+
require EMCORE_DIR.'/includes/updates/plugin-update-checker.php';
|
36 |
require EMCORE_DIR.'/includes/plugin-updater.php';
|
37 |
|
38 |
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
6 |
Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms
|
7 |
Requires at least: 3.4
|
8 |
Tested up to: 3.9.2
|
9 |
-
Stable tag: 2.0.
|
10 |
Make a pop up in minutes. Logins, Auto Exits, Scroll Pops, Age Verification Pops. Theme, customize, stream line your GUI & market your content!
|
11 |
== Description ==
|
12 |
Make a pop up in minutes - Logins, Auto Exits, Scroll Pops, Age Verification Pops - use EasyModal's ultimate theme capabilities and customization options to make glorious pop ups that increase your site's usability, conversion rates and market your most precious content.
|
6 |
Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms
|
7 |
Requires at least: 3.4
|
8 |
Tested up to: 3.9.2
|
9 |
+
Stable tag: 2.0.12
|
10 |
Make a pop up in minutes. Logins, Auto Exits, Scroll Pops, Age Verification Pops. Theme, customize, stream line your GUI & market your content!
|
11 |
== Description ==
|
12 |
Make a pop up in minutes - Logins, Auto Exits, Scroll Pops, Age Verification Pops - use EasyModal's ultimate theme capabilities and customization options to make glorious pop ups that increase your site's usability, conversion rates and market your most precious content.
|