Easy Modal - Version 1.2.0.4

Version Description

  • Fixed data migration issue ( wasn't setting sites to sitewide )
  • Added filters for modal content. Use add_filter('em_modal_content', 'your_custom_function'); function your_custom_function($content);
Download this release

Release Info

Developer danieliser
Plugin Icon 128x128 Easy Modal
Version 1.2.0.4
Comparing to
See all releases

Code changes from version 1.2.0.2 to 1.2.0.4

Files changed (4) hide show
  1. easy-modal.php +18 -19
  2. inc/views/_notes/dwsync.xml +1 -1
  3. inc/views/modal.php +1 -1
  4. readme.txt +8 -21
easy-modal.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Easy Modal
4
  Plugin URI: https://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: 1.2.0.2
8
  Author URI: http://wizardinternetsolutions.com
9
  */
10
  if (!defined('EASYMODAL'))
@@ -20,24 +20,18 @@ if (!defined('EASYMODAL_URL'))
20
  define('EASYMODAL_URL', WP_PLUGIN_URL . '/' . EASYMODAL_SLUG);
21
 
22
  if (!defined('EASYMODAL_VERSION'))
23
- define('EASYMODAL_VERSION', '1.2.0.2' );
24
 
25
  class Easy_Modal {
26
  protected $api_url = 'http://easy-modal.com/api';
27
  protected $messages = array();
28
  public function __construct()
29
  {
30
-
31
- // Add WPMU Support
32
- // Add default options on new site creation.
33
- add_action('wpmu_new_blog', array(&$this, '_wpmu_activation'));
34
-
35
  if (is_admin())
36
  {
37
  add_action('admin_init', array(&$this,'_migrate'),1);
38
  add_action('admin_init', array(&$this,'_messages'),10);
39
 
40
-
41
  add_action('admin_init', array(&$this,'process_get'),9);
42
 
43
  if(!empty($_POST['em_settings']) && in_array($_POST['em_settings'],array('settings','modal','theme')))
@@ -61,6 +55,14 @@ class Easy_Modal {
61
  }
62
  else
63
  {
 
 
 
 
 
 
 
 
64
  add_action('wp_footer', array(&$this, 'preload_modals'),1000);
65
  }
66
  $this->_styles_scripts();
@@ -75,6 +77,10 @@ class Easy_Modal {
75
  }
76
  }
77
  }
 
 
 
 
78
  public function admin_footer()
79
  {
80
  require $this->load_view('admin_footer');
@@ -161,15 +167,15 @@ class Easy_Modal {
161
  else
162
  {
163
  $current_version = get_option('EasyModal_Version');
164
- if($current_version == '1.1.9.9')
165
  {
166
  foreach($this->getModalList() as $key => $name)
167
  {
168
  $modal = $this->getModalSettings($key);
169
  $modal['sitewide'] = true;
170
- $modal['overlayClose'] = $modal['overlayClose'] == 'true' ? true : false;
171
- $modal['overlayEscClose'] = $modal['overlayEscClose'] == 'true' ? true : false;
172
- //$this->updateModalSettings($key, $modal);
173
  }
174
  }
175
  }
@@ -300,13 +306,6 @@ class Easy_Modal {
300
  delete_option('EasyModalPro_Version');
301
  $this->updateSettings($o_settings);
302
  }
303
- public function _wpmu_activation($blog_id, $user_id, $domain, $path, $site_id, $meta)
304
- {
305
- // Make sure the user can perform this action and the request came from the correct page.
306
- switch_to_blog($blog_id);
307
- $this->_migrate();
308
- restore_current_blog();
309
- }
310
  public function resetOptions()
311
  {
312
  update_option('EasyModal_Settings', $this->defaultSettings());
4
  Plugin URI: https://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: 1.2.0.4
8
  Author URI: http://wizardinternetsolutions.com
9
  */
10
  if (!defined('EASYMODAL'))
20
  define('EASYMODAL_URL', WP_PLUGIN_URL . '/' . EASYMODAL_SLUG);
21
 
22
  if (!defined('EASYMODAL_VERSION'))
23
+ define('EASYMODAL_VERSION', '1.2.0.4' );
24
 
25
  class Easy_Modal {
26
  protected $api_url = 'http://easy-modal.com/api';
27
  protected $messages = array();
28
  public function __construct()
29
  {
 
 
 
 
 
30
  if (is_admin())
31
  {
32
  add_action('admin_init', array(&$this,'_migrate'),1);
33
  add_action('admin_init', array(&$this,'_messages'),10);
34
 
 
35
  add_action('admin_init', array(&$this,'process_get'),9);
36
 
37
  if(!empty($_POST['em_settings']) && in_array($_POST['em_settings'],array('settings','modal','theme')))
55
  }
56
  else
57
  {
58
+ add_filter( 'em_modal_content', 'wptexturize' );
59
+ add_filter( 'em_modal_content', 'convert_smilies' );
60
+ add_filter( 'em_modal_content', 'convert_chars' );
61
+ add_filter( 'em_modal_content', 'wpautop' );
62
+ add_filter( 'em_modal_content', 'shortcode_unautop' );
63
+ add_filter( 'em_modal_content', 'prepend_attachment' );
64
+ add_filter( 'em_modal_content', 'do_shortcode', 11 );
65
+ add_filter( 'em_modal_content', array(&$this,'filters'), 100, 1);
66
  add_action('wp_footer', array(&$this, 'preload_modals'),1000);
67
  }
68
  $this->_styles_scripts();
77
  }
78
  }
79
  }
80
+ public function filters($content)
81
+ {
82
+ return $content;
83
+ }
84
  public function admin_footer()
85
  {
86
  require $this->load_view('admin_footer');
167
  else
168
  {
169
  $current_version = get_option('EasyModal_Version');
170
+ if(in_array($current_version,array('1.1.9.9','1.2','1.2.0.1','1.2.0.2')))
171
  {
172
  foreach($this->getModalList() as $key => $name)
173
  {
174
  $modal = $this->getModalSettings($key);
175
  $modal['sitewide'] = true;
176
+ $modal['overlayClose'] = $modal['overlayClose'] == 'true' || $modal['overlayClose'] == 'true' ? true : false;
177
+ $modal['overlayEscClose'] = $modal['overlayEscClose'] == 'true' || $modal['overlayEscClose'] == 'true' ? true : false;
178
+ $this->updateModalSettings($key, $modal);
179
  }
180
  }
181
  }
306
  delete_option('EasyModalPro_Version');
307
  $this->updateSettings($o_settings);
308
  }
 
 
 
 
 
 
 
309
  public function resetOptions()
310
  {
311
  update_option('EasyModal_Settings', $this->defaultSettings());
inc/views/_notes/dwsync.xml CHANGED
@@ -10,7 +10,7 @@
10
  <file name="modal_list.php" server="easy-modal.com//public_html/" local="130207651112965010" remote="130208443200000000" Dst="2" />
11
  <file name="sidebar.php" server="easy-modal.com//public_html/" local="130207651113665050" remote="130208443200000000" Dst="2" />
12
  <file name="theme_settings.php" server="easy-modal.com//public_html/" local="130207651114745112" remote="130208443200000000" Dst="2" />
13
- <file name="modal.php" server="easy-modal.com" local="130211868143686356" remote="130211832000000000" Dst="2" />
14
  <file name="sidebar.php" server="easy-modal.com" local="130219725758308718" remote="130219689600000000" Dst="2" />
15
  <file name="admin_footer.php" server="easy-modal.com" local="130219723239704663" remote="130219687200000000" Dst="2" />
16
  <file name="modal_delete.php" server="easy-modal.com" local="130218604452439616" remote="130218568200000000" Dst="2" />
10
  <file name="modal_list.php" server="easy-modal.com//public_html/" local="130207651112965010" remote="130208443200000000" Dst="2" />
11
  <file name="sidebar.php" server="easy-modal.com//public_html/" local="130207651113665050" remote="130208443200000000" Dst="2" />
12
  <file name="theme_settings.php" server="easy-modal.com//public_html/" local="130207651114745112" remote="130208443200000000" Dst="2" />
13
+ <file name="modal.php" server="easy-modal.com" local="130224633336764562" remote="130224597000000000" Dst="2" />
14
  <file name="sidebar.php" server="easy-modal.com" local="130219725758308718" remote="130219689600000000" Dst="2" />
15
  <file name="admin_footer.php" server="easy-modal.com" local="130219723239704663" remote="130219687200000000" Dst="2" />
16
  <file name="modal_delete.php" server="easy-modal.com" local="130218604452439616" remote="130218568200000000" Dst="2" />
inc/views/modal.php CHANGED
@@ -2,6 +2,6 @@
2
  <?php if($modal['title'] != '') {?>
3
  <div class="title"><?php esc_html_e($modal['title'])?></div>
4
  <?php }?>
5
- <?php echo do_shortcode($modal['content']);?>
6
  <a class="close-modal">&#215;</a>
7
  </div>
2
  <?php if($modal['title'] != '') {?>
3
  <div class="title"><?php esc_html_e($modal['title'])?></div>
4
  <?php }?>
5
+ <?php echo apply_filters('em_modal_content', $modal['content']);?>
6
  <a class="close-modal">&#215;</a>
7
  </div>
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.2
8
  Tested up to: 3.6
9
- Stable tag: 1.2.0.2
10
  Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos, slideshows & more.
11
 
12
  == Description ==
@@ -26,6 +26,7 @@ This plugin allows you to easily add unlimited Modal windows with just about any
26
  = Pro Features =
27
  * Premium Support*
28
  * Unlimited Themes
 
29
  * Ajax Login, Registration & Forgot Your Password Modals
30
  * Force User Login Modal ( Per Page / Post or Site Wide )
31
  * Set Modal to Auto Open ( Per Page / Post and/or Site Wide )
@@ -46,35 +47,21 @@ If you like the plugin please rate it.
46
  To be notified of plugin updates, [follow us on Twitter](http://twitter.com/EasyModal "Wizard Internet Solutions on Twitter")!
47
 
48
  == Installation ==
49
- = Version 1.0.0 and above =
50
  1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
51
  2. Activate the plugin through the 'Plugins' menu in WordPress
52
  3. Create and customize a modal in the Easy Modal settings page.
53
- 3. Copy and Add `eModal` and `eModal-#` class from the modals settings page to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
54
- = Versions before 1.0.0 =
55
- [youtube http://www.youtube.com/watch?v=w9Us4ttVuZU]
56
- 1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
57
- 2. Activate the plugin through the 'Plugins' menu in WordPress
58
- 3. Add `eModal` class to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
59
- == Frequently Asked Questions ==
60
- = I have a problem! =
61
- If think youve found a problem please post a link with it so i can see the problem for myself.
62
- = Does this work with CF7 =
63
- Yes, this will work with any custom form shortcode and uses ajax submit features.
64
- = Is the form styled =
65
- We have only included some basic styling for the modal at this point. You can add styles to your themes styles.css or add them to the head via plugin.
66
- == Screenshots ==
67
- 1. Easy Modal with default "Contact Fom 7" form.
68
- 2. Shows CF7 Inline validation used during ajax submit
69
-
70
 
71
  == Changelog ==
 
 
 
 
72
  = 1.2.0.2 =
73
  * Fixed issue of undefined array key.
74
-
75
  = 1.2.0.1 =
76
  * Fixed issue that caused wp editor to not load with certain themes.
77
-
78
  = 1.2 =
79
  * Code has been rewritten from ground up, JS, admin panels etc.
80
  * Added animations
6
  Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms
7
  Requires at least: 3.2
8
  Tested up to: 3.6
9
+ Stable tag: 1.2.0.4
10
  Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos, slideshows & more.
11
 
12
  == Description ==
26
  = Pro Features =
27
  * Premium Support*
28
  * Unlimited Themes
29
+ * Disable close icon
30
  * Ajax Login, Registration & Forgot Your Password Modals
31
  * Force User Login Modal ( Per Page / Post or Site Wide )
32
  * Set Modal to Auto Open ( Per Page / Post and/or Site Wide )
47
  To be notified of plugin updates, [follow us on Twitter](http://twitter.com/EasyModal "Wizard Internet Solutions on Twitter")!
48
 
49
  == Installation ==
 
50
  1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
51
  2. Activate the plugin through the 'Plugins' menu in WordPress
52
  3. Create and customize a modal in the Easy Modal settings page.
53
+ 4. Customize the theme to match your website on the theme settings page.
54
+ 5. Copy and Add ``eModal-#` class from the modals settings page to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  == Changelog ==
57
+ = 1.2.0.4 =
58
+ * Fixed data migration issue ( wasn't setting sites to sitewide )
59
+ * Added filters for modal content. Use add_filter('em_modal_content', 'your_custom_function'); function your_custom_function($content);
60
+
61
  = 1.2.0.2 =
62
  * Fixed issue of undefined array key.
 
63
  = 1.2.0.1 =
64
  * Fixed issue that caused wp editor to not load with certain themes.
 
65
  = 1.2 =
66
  * Code has been rewritten from ground up, JS, admin panels etc.
67
  * Added animations