Easy Modal - Version 2.0.2

Version Description

Download this release

Release Info

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

Code changes from version 2.0.1 to 2.0.2

Files changed (4) hide show
  1. classes/admin.php +1 -5
  2. classes/migrate.php +19 -19
  3. easy-modal.php +8 -2
  4. readme.txt +1 -1
classes/admin.php CHANGED
@@ -21,11 +21,7 @@
21
  $EModal_Admin_Editor = new EModal_Admin_Editor;
22
  $EModal_Admin_Postmeta = new EModal_Admin_Postmeta;
23
  $EModal_License = new EModal_License;
24
- if(get_option('EasyModal_Version') && !emodal_get_option(EMCORE_SLUG.'_migration_approval'))
25
- {
26
- new EModal_Migrate_Pre_V2;
27
- }
28
- elseif(get_option('EasyModal_Version') && emodal_get_option(EMCORE_SLUG.'_migration_approved'))
29
  {
30
  EModal_Migrate_Pre_V2::delete_all();
31
  }
21
  $EModal_Admin_Editor = new EModal_Admin_Editor;
22
  $EModal_Admin_Postmeta = new EModal_Admin_Postmeta;
23
  $EModal_License = new EModal_License;
24
+ if(emodal_get_option('EasyModal_Version') && emodal_get_option(EMCORE_SLUG.'_migration_approved'))
 
 
 
 
25
  {
26
  EModal_Migrate_Pre_V2::delete_all();
27
  }
classes/migrate.php CHANGED
@@ -8,14 +8,14 @@ class EModal_Migrate_Pre_V1 {
8
  protected function _migrate_EM()
9
  {
10
  global $wp;
11
- $o_modal_list = get_option('EasyModal');
12
  if(!is_array($o_modal_list))
13
  {
14
  $o_modal_list = unserialize($o_modal_list);
15
  }
16
  foreach($o_modal_list as $id)
17
  {
18
- $Modal = get_option('EasyModal_'.$id);
19
  if(!is_array($Modal))
20
  {
21
  $Modal = unserialize($Modal);
@@ -30,14 +30,14 @@ class EModal_Migrate_Pre_V1 {
30
  protected function _migrate_EM_Lite()
31
  {
32
  global $wp;
33
- $o_modal_list = get_option('EasyModalLite_ModalList');
34
  if(!is_array($o_modal_list))
35
  {
36
  $o_modal_list = unserialize($o_modal_list);
37
  }
38
  foreach($o_modal_list as $id => $title)
39
  {
40
- $Modal = get_option('EasyModalLite_Modal-'.$id);
41
  if(!is_array($Modal))
42
  {
43
  $Modal = unserialize($Modal);
@@ -46,14 +46,14 @@ class EModal_Migrate_Pre_V1 {
46
  $this->updateModalSettings($id, $Modal, false, true);
47
  //delete_option('EasyModalLite_Modal-'.$id);
48
  }
49
- $Theme = get_option('EasyModalLite_Theme-1');
50
  if(!is_array($Theme))
51
  {
52
  $Theme = unserialize($Theme);
53
  }
54
  $this->updateThemeSettings(1,$Theme,false,true);
55
  //delete_option('EasyModalLite_Theme-1');
56
- $o_settings = get_option('EasyModalLite_Settings');
57
  if(!is_array($o_settings))
58
  {
59
  $o_settings = unserialize($o_settings);
@@ -72,14 +72,14 @@ class EModal_Migrate_Pre_V1 {
72
  protected function _migrate_EM_Pro()
73
  {
74
  global $wp;
75
- $o_theme_list = get_option('EasyModalPro_ModalList');
76
  if(!is_array($o_theme_list))
77
  {
78
  $o_theme_list = unserialize($o_theme_list);
79
  }
80
  foreach($o_theme_list as $id => $name)
81
  {
82
- $Theme = get_option('EasyModalPro_Theme-'.$id);
83
  if(!is_array($Theme))
84
  {
85
  $Theme = unserialize($Theme);
@@ -90,14 +90,14 @@ class EModal_Migrate_Pre_V1 {
90
  }
91
  //delete_option('EasyModalPro_ThemeList');
92
  $themes = $this->getThemeList();
93
- $o_modal_list = get_option('EasyModalPro_ModalList');
94
  if(!is_array($o_modal_list))
95
  {
96
  $o_modal_list = unserialize($o_modal_list);
97
  }
98
  foreach($o_modal_list as $id => $title)
99
  {
100
- $Modal = get_option('EasyModalPro_Modal-'.$id);
101
  if(!is_array($Modal))
102
  {
103
  $Modal = unserialize($Modal);
@@ -108,7 +108,7 @@ class EModal_Migrate_Pre_V1 {
108
  //delete_option('EasyModalPro_Modal-'.$id);
109
  }
110
  //delete_option('EasyModalPro_ModalList');
111
- $o_settings = get_option('EasyModalPro_Settings');
112
  if(!is_array($o_settings))
113
  {
114
  $o_settings = unserialize($o_settings);
@@ -117,7 +117,7 @@ class EModal_Migrate_Pre_V1 {
117
  $o_settings = array();
118
  }
119
  }
120
- $license = get_option('EasyModalPro_License');
121
  $this->process_license($license);
122
  unset($o_settings['license']);
123
  $this->updateSettings($o_settings,true);
@@ -129,7 +129,7 @@ class EModal_Migrate_Pre_V1 {
129
  class EModal_Migrate_Pre_V2 {
130
  public function __construct()
131
  {
132
- if(get_option('EasyModal_Version'))
133
  {
134
  $themes = self::get_themes();
135
  $theme_check = array();
@@ -468,7 +468,7 @@ class EModal_Migrate_Pre_V2 {
468
  public static function get_themes()
469
  {
470
  $themes = array();
471
- $theme_list = get_option('EasyModal_ThemeList', array());
472
  foreach($theme_list as $theme_id => $name)
473
  {
474
  $theme = self::get_theme($theme_id);
@@ -481,7 +481,7 @@ class EModal_Migrate_Pre_V2 {
481
  }
482
  public static function get_theme($theme_id)
483
  {
484
- if($theme = get_option('EasyModal_Theme-'.$theme_id))
485
  {
486
  return self::merge_existing(self::defaultThemeSettings(), $theme);
487
  }
@@ -493,7 +493,7 @@ class EModal_Migrate_Pre_V2 {
493
  public static function get_modals()
494
  {
495
  $modals = array();
496
- $modal_list = get_option('EasyModal_ModalList', array());
497
  foreach($modal_list as $modal_id => $name)
498
  {
499
  $modal = self::get_modal($modal_id);
@@ -517,7 +517,7 @@ class EModal_Migrate_Pre_V2 {
517
  }
518
  public static function get_modal($modal_id)
519
  {
520
- if($modal = get_option('EasyModal_Modal-'.$modal_id))
521
  {
522
  return self::merge_existing(self::defaultModalSettings(), $modal);
523
  }
@@ -525,12 +525,12 @@ class EModal_Migrate_Pre_V2 {
525
  }
526
  public static function get_settings($key = NULL)
527
  {
528
- $settings = get_option('EasyModal_Settings');
529
  return $key ? !empty($settings[$key]) ? $settings[$key] : false : self::merge_existing(self::defaultSettings(), $settings);
530
  }
531
  public static function get_license()
532
  {
533
- return get_option('EasyModal_License');
534
  }
535
 
536
  public static function delete_all()
8
  protected function _migrate_EM()
9
  {
10
  global $wp;
11
+ $o_modal_list = emodal_get_option('EasyModal');
12
  if(!is_array($o_modal_list))
13
  {
14
  $o_modal_list = unserialize($o_modal_list);
15
  }
16
  foreach($o_modal_list as $id)
17
  {
18
+ $Modal = emodal_get_option('EasyModal_'.$id);
19
  if(!is_array($Modal))
20
  {
21
  $Modal = unserialize($Modal);
30
  protected function _migrate_EM_Lite()
31
  {
32
  global $wp;
33
+ $o_modal_list = emodal_get_option('EasyModalLite_ModalList');
34
  if(!is_array($o_modal_list))
35
  {
36
  $o_modal_list = unserialize($o_modal_list);
37
  }
38
  foreach($o_modal_list as $id => $title)
39
  {
40
+ $Modal = emodal_get_option('EasyModalLite_Modal-'.$id);
41
  if(!is_array($Modal))
42
  {
43
  $Modal = unserialize($Modal);
46
  $this->updateModalSettings($id, $Modal, false, true);
47
  //delete_option('EasyModalLite_Modal-'.$id);
48
  }
49
+ $Theme = emodal_get_option('EasyModalLite_Theme-1');
50
  if(!is_array($Theme))
51
  {
52
  $Theme = unserialize($Theme);
53
  }
54
  $this->updateThemeSettings(1,$Theme,false,true);
55
  //delete_option('EasyModalLite_Theme-1');
56
+ $o_settings = emodal_get_option('EasyModalLite_Settings');
57
  if(!is_array($o_settings))
58
  {
59
  $o_settings = unserialize($o_settings);
72
  protected function _migrate_EM_Pro()
73
  {
74
  global $wp;
75
+ $o_theme_list = emodal_get_option('EasyModalPro_ModalList');
76
  if(!is_array($o_theme_list))
77
  {
78
  $o_theme_list = unserialize($o_theme_list);
79
  }
80
  foreach($o_theme_list as $id => $name)
81
  {
82
+ $Theme = emodal_get_option('EasyModalPro_Theme-'.$id);
83
  if(!is_array($Theme))
84
  {
85
  $Theme = unserialize($Theme);
90
  }
91
  //delete_option('EasyModalPro_ThemeList');
92
  $themes = $this->getThemeList();
93
+ $o_modal_list = emodal_get_option('EasyModalPro_ModalList');
94
  if(!is_array($o_modal_list))
95
  {
96
  $o_modal_list = unserialize($o_modal_list);
97
  }
98
  foreach($o_modal_list as $id => $title)
99
  {
100
+ $Modal = emodal_get_option('EasyModalPro_Modal-'.$id);
101
  if(!is_array($Modal))
102
  {
103
  $Modal = unserialize($Modal);
108
  //delete_option('EasyModalPro_Modal-'.$id);
109
  }
110
  //delete_option('EasyModalPro_ModalList');
111
+ $o_settings = emodal_get_option('EasyModalPro_Settings');
112
  if(!is_array($o_settings))
113
  {
114
  $o_settings = unserialize($o_settings);
117
  $o_settings = array();
118
  }
119
  }
120
+ $license = emodal_get_option('EasyModalPro_License');
121
  $this->process_license($license);
122
  unset($o_settings['license']);
123
  $this->updateSettings($o_settings,true);
129
  class EModal_Migrate_Pre_V2 {
130
  public function __construct()
131
  {
132
+ if(emodal_get_option('EasyModal_Version'))
133
  {
134
  $themes = self::get_themes();
135
  $theme_check = array();
468
  public static function get_themes()
469
  {
470
  $themes = array();
471
+ $theme_list = emodal_get_option('EasyModal_ThemeList', array());
472
  foreach($theme_list as $theme_id => $name)
473
  {
474
  $theme = self::get_theme($theme_id);
481
  }
482
  public static function get_theme($theme_id)
483
  {
484
+ if($theme = emodal_get_option('EasyModal_Theme-'.$theme_id))
485
  {
486
  return self::merge_existing(self::defaultThemeSettings(), $theme);
487
  }
493
  public static function get_modals()
494
  {
495
  $modals = array();
496
+ $modal_list = emodal_get_option('EasyModal_ModalList', array());
497
  foreach($modal_list as $modal_id => $name)
498
  {
499
  $modal = self::get_modal($modal_id);
517
  }
518
  public static function get_modal($modal_id)
519
  {
520
+ if($modal = emodal_get_option('EasyModal_Modal-'.$modal_id))
521
  {
522
  return self::merge_existing(self::defaultModalSettings(), $modal);
523
  }
525
  }
526
  public static function get_settings($key = NULL)
527
  {
528
+ $settings = emodal_get_option('EasyModal_Settings');
529
  return $key ? !empty($settings[$key]) ? $settings[$key] : false : self::merge_existing(self::defaultSettings(), $settings);
530
  }
531
  public static function get_license()
532
  {
533
+ return emodal_get_option('EasyModal_License');
534
  }
535
 
536
  public static function delete_all()
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.1
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.1' );
25
  if (!defined('EMCORE_DB_VERSION'))
26
  define('EMCORE_DB_VERSION', '1' );
27
  if (!defined('EMCORE_API_URL'))
@@ -37,6 +37,7 @@ class EModal {
37
  register_activation_hook( __FILE__, array($this,'activate') );
38
  register_activation_hook( __FILE__, array($this,'install_data') );
39
 
 
40
  add_action('plugins_loaded', array($this, 'activate'));
41
  add_action('emodal_db_update', array($this,'install'), 1);
42
 
@@ -118,6 +119,7 @@ class EModal {
118
  {
119
  switch_to_blog($blog_id);
120
  $this->process_install(true);
 
121
  }
122
  switch_to_blog($old_blog);
123
  return;
@@ -205,6 +207,10 @@ class EModal {
205
  emodal_update_option(EMCORE_SLUG.'_db_version', EMCORE_DB_VERSION);
206
  $emodal_db_update_global = true;
207
  }
 
 
 
 
208
  }
209
  }
210
  add_action('plugins_loaded', 'emodal_initialize', 5);
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.2
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.2' );
25
  if (!defined('EMCORE_DB_VERSION'))
26
  define('EMCORE_DB_VERSION', '1' );
27
  if (!defined('EMCORE_API_URL'))
37
  register_activation_hook( __FILE__, array($this,'activate') );
38
  register_activation_hook( __FILE__, array($this,'install_data') );
39
 
40
+
41
  add_action('plugins_loaded', array($this, 'activate'));
42
  add_action('emodal_db_update', array($this,'install'), 1);
43
 
119
  {
120
  switch_to_blog($blog_id);
121
  $this->process_install(true);
122
+
123
  }
124
  switch_to_blog($old_blog);
125
  return;
207
  emodal_update_option(EMCORE_SLUG.'_db_version', EMCORE_DB_VERSION);
208
  $emodal_db_update_global = true;
209
  }
210
+ if(emodal_get_option('EasyModal_Version') && !emodal_get_option(EMCORE_SLUG.'_migration_approval'))
211
+ {
212
+ new EModal_Migrate_Pre_V2;
213
+ }
214
  }
215
  }
216
  add_action('plugins_loaded', 'emodal_initialize', 5);
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.1
10
  Make a pop up - any pop up. Logins, Auto Exits, Scroll Pops, Age Verification Pops. Theme, customize, make a glorious pop up!
11
  == Description ==
12
  Make a pop up - any pop up - 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 and conversion rates.
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.2
10
  Make a pop up - any pop up. Logins, Auto Exits, Scroll Pops, Age Verification Pops. Theme, customize, make a glorious pop up!
11
  == Description ==
12
  Make a pop up - any pop up - 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 and conversion rates.