Easy Modal - Version 1.0.2

Version Description

  • Fix for installation glitch.
Download this release

Release Info

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

Code changes from version 1.0.1 to 1.0.2

Files changed (3) hide show
  1. easy-modal.php +1 -1
  2. includes/easy-modal.class.php +7 -8
  3. readme.txt +2 -2
easy-modal.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Easy Modal
4
  Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal/
5
  Description: Easy Modal allows you to easily add just about any shortcodes or other content into a modal window. This includes forms such as CF7.
6
  Author: Wizard Internet Solutions
7
- Version: 1.0.1
8
  Author URI: http://wizardinternetsolutions.com
9
  */
10
  $pluginDIR = PLUGINDIR.'/'. dirname( plugin_basename(__FILE__));
4
  Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal/
5
  Description: Easy Modal allows you to easily add just about any shortcodes or other content into a modal window. This includes forms such as CF7.
6
  Author: Wizard Internet Solutions
7
+ Version: 1.0.2
8
  Author URI: http://wizardinternetsolutions.com
9
  */
10
  $pluginDIR = PLUGINDIR.'/'. dirname( plugin_basename(__FILE__));
includes/easy-modal.class.php CHANGED
@@ -16,7 +16,7 @@ $cur_ver = $plugininfo['Version'];
16
  class easy_modal {
17
  var $adminOptionsName = "easy_modalOptions";
18
  //Returns an array of admin options
19
- function defaultAdminOptions(){
20
  $settings = array(
21
  'title' => '',
22
  'content' => '',
@@ -36,7 +36,7 @@ class easy_modal {
36
 
37
 
38
  function getAdminOptions($modalId){
39
- $settings = $this->defaultAdminOptions();
40
  $eMOptions = get_option($this->adminOptionsName.'_'.$modalId);
41
  if (!is_array($eMOptions)) {
42
  $eMOptions = unserialize($eMOptions);
@@ -62,7 +62,7 @@ class easy_modal {
62
  $modals = $this->getModalList();
63
  $modals = array_merge($modals,array($modalId));
64
  update_option($this->adminOptionsName, serialize($modals));
65
- $settings = $this->defaultAdminOptions();
66
  update_option($this->adminOptionsName.'_'.$modalId, serialize($settings));
67
  }
68
 
@@ -82,10 +82,9 @@ class easy_modal {
82
  return $settings;
83
  }
84
 
85
- function resetAdminOptions($modalId) {
86
-
87
  update_option($this->adminOptionsName, serialize(array('1')));
88
- update_option($this->adminOptionsName.'_'.$modalId, serialize($this->defaultAdminOptions()));
89
  }
90
  // Plugin Initialization
91
  function init() {
@@ -93,14 +92,14 @@ class easy_modal {
93
  // Erase Settings For versions older than 0.9.0.4
94
  if(!get_option('eM_version')) $overwrite = true;
95
  if(version_compare(get_option('eM_version'),$cur_ver, '<')) $overwrite = true;
96
- if($cur_ver == '1.0.1' || $cur_ver == '1.0.0') $overwrite = true;
97
  if($overwrite == true) $this->resetAdminOptions();
98
  update_option('eM_version', $cur_ver);
99
  }
100
  //Prints out the admin page
101
  function display_emodal_option($modalId, $new = true){
102
  if($new == true){
103
- $settings = $this->defaultAdminOptions();
104
  $this->addNewModal($modalId);
105
  } else {
106
  $settings = $this->getAdminOptions($modalId);
16
  class easy_modal {
17
  var $adminOptionsName = "easy_modalOptions";
18
  //Returns an array of admin options
19
+ function defaultModalOptions(){
20
  $settings = array(
21
  'title' => '',
22
  'content' => '',
36
 
37
 
38
  function getAdminOptions($modalId){
39
+ $settings = $this->defaultModalOptions();
40
  $eMOptions = get_option($this->adminOptionsName.'_'.$modalId);
41
  if (!is_array($eMOptions)) {
42
  $eMOptions = unserialize($eMOptions);
62
  $modals = $this->getModalList();
63
  $modals = array_merge($modals,array($modalId));
64
  update_option($this->adminOptionsName, serialize($modals));
65
+ $settings = $this->defaultModalOptions();
66
  update_option($this->adminOptionsName.'_'.$modalId, serialize($settings));
67
  }
68
 
82
  return $settings;
83
  }
84
 
85
+ function resetAdminOptions() {
 
86
  update_option($this->adminOptionsName, serialize(array('1')));
87
+ update_option($this->adminOptionsName.'_1', serialize($this->defaultModalOptions()));
88
  }
89
  // Plugin Initialization
90
  function init() {
92
  // Erase Settings For versions older than 0.9.0.4
93
  if(!get_option('eM_version')) $overwrite = true;
94
  if(version_compare(get_option('eM_version'),$cur_ver, '<')) $overwrite = true;
95
+ if($cur_ver == '1.0.2' || $cur_ver == '1.0.1' || $cur_ver == '1.0.0') $overwrite = true;
96
  if($overwrite == true) $this->resetAdminOptions();
97
  update_option('eM_version', $cur_ver);
98
  }
99
  //Prints out the admin page
100
  function display_emodal_option($modalId, $new = true){
101
  if($new == true){
102
+ $settings = $this->defaultModalOptions();
103
  $this->addNewModal($modalId);
104
  } else {
105
  $settings = $this->getAdminOptions($modalId);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: modal, contact form 7, ajax
5
  Requires at least: 3.0.1
6
  Tested up to: 3.2.1
7
- Stable tag: 1.0.1
8
 
9
  This plugin allows you to easily add a Modal window with just about any content including Contact Form 7 using ajax submission.
10
 
@@ -64,7 +64,7 @@ We have only included some basic styling for the modal at this point. You can ad
64
 
65
  == Changelog ==
66
 
67
- = 1.0.1 =
68
  * Fix for installation glitch.
69
 
70
  = 1.0.0 =
4
  Tags: modal, contact form 7, ajax
5
  Requires at least: 3.0.1
6
  Tested up to: 3.2.1
7
+ Stable tag: 1.0.2
8
 
9
  This plugin allows you to easily add a Modal window with just about any content including Contact Form 7 using ajax submission.
10
 
64
 
65
  == Changelog ==
66
 
67
+ = 1.0.2 =
68
  * Fix for installation glitch.
69
 
70
  = 1.0.0 =