Version Description
(8th July 2016) = * Requires PHP 5.4 * Fixed issue with close on link click option * Improved database migration scripts * Updated default button size * Improved License Checks (Pro) * Removed tab memory (too resource intensive) * Fixed Query Monitor "IF" error - thanks to KTS915 * Bug fixes
Download this release
Release Info
| Developer | ResponsiveMenu |
| Plugin | |
| Version | 3.0.2 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.1 to 3.0.2
- readme.txt +11 -1
- responsive-menu.php +13 -11
- src/app/Database/Migration.php +20 -15
- src/app/Mappers/JsMapper.php +6 -1
- src/app/Mappers/ScssButtonMapper.php +2 -2
- src/config/default_options.php +2 -2
- src/public/js/admin/main.js +1 -10
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: ResponsiveMenu
|
|
| 3 |
Tags: responsive, menu, responsive menu, mobile menu, wordpress responsive menu, wp responsive menu, tablet menu, mobile, tablet, 3 lines, 3 line, three line, three lines
|
| 4 |
Requires at least: 3.5.0
|
| 5 |
Tested up to: 4.5.3
|
| 6 |
-
Stable tag: 3.0.
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
|
|
@@ -145,6 +145,16 @@ To view our whole FAQ, please go to https://responsive.menu/faq/
|
|
| 145 |
|
| 146 |
== Changelog ==
|
| 147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
= 3.0.1 (7th July 2016) =
|
| 149 |
* **Requires PHP 5.4**
|
| 150 |
* Initial Bug Fixes
|
| 3 |
Tags: responsive, menu, responsive menu, mobile menu, wordpress responsive menu, wp responsive menu, tablet menu, mobile, tablet, 3 lines, 3 line, three line, three lines
|
| 4 |
Requires at least: 3.5.0
|
| 5 |
Tested up to: 4.5.3
|
| 6 |
+
Stable tag: 3.0.2
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
|
| 145 |
|
| 146 |
== Changelog ==
|
| 147 |
|
| 148 |
+
= 3.0.2 (8th July 2016) =
|
| 149 |
+
* **Requires PHP 5.4**
|
| 150 |
+
* Fixed issue with close on link click option
|
| 151 |
+
* Improved database migration scripts
|
| 152 |
+
* Updated default button size
|
| 153 |
+
* Improved License Checks (Pro)
|
| 154 |
+
* Removed tab memory (too resource intensive)
|
| 155 |
+
* Fixed Query Monitor "IF" error - thanks to KTS915
|
| 156 |
+
* Bug fixes
|
| 157 |
+
|
| 158 |
= 3.0.1 (7th July 2016) =
|
| 159 |
* **Requires PHP 5.4**
|
| 160 |
* Initial Bug Fixes
|
responsive-menu.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
Plugin Name: Responsive Menu
|
| 5 |
Plugin URI: http://responsive.menu
|
| 6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
| 7 |
-
Version: 3.0.
|
| 8 |
Author: Responsive Menu
|
| 9 |
Text Domain: responsive-menu
|
| 10 |
Author URI: http://responsive.menu
|
|
@@ -12,14 +12,14 @@ License: GPL2
|
|
| 12 |
Tags: responsive, menu, responsive menu
|
| 13 |
*/
|
| 14 |
|
| 15 |
-
/* Check correct PHP version first */
|
| 16 |
register_activation_hook(__FILE__, 'activate_responsive_menu');
|
| 17 |
-
function activate_responsive_menu() {
|
| 18 |
-
if(version_compare(PHP_VERSION, '5,4', '<')):
|
| 19 |
deactivate_plugins(plugin_basename(__FILE__ ));
|
| 20 |
-
wp_die(sprintf('Responsive Menu requires PHP 5.4 or higher. You are still on %s', PHP_VERSION));
|
| 21 |
-
endif;
|
| 22 |
-
}
|
| 23 |
|
| 24 |
/* Required includes for plugin to function */
|
| 25 |
include dirname(__FILE__) . '/autoload.php';
|
|
@@ -35,8 +35,10 @@ $wp_router = new ResponsiveMenu\Routing\WpRouting($container);
|
|
| 35 |
$wp_router->route();
|
| 36 |
|
| 37 |
if(is_admin()):
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
endif;
|
| 4 |
Plugin Name: Responsive Menu
|
| 5 |
Plugin URI: http://responsive.menu
|
| 6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
| 7 |
+
Version: 3.0.2
|
| 8 |
Author: Responsive Menu
|
| 9 |
Text Domain: responsive-menu
|
| 10 |
Author URI: http://responsive.menu
|
| 12 |
Tags: responsive, menu, responsive menu
|
| 13 |
*/
|
| 14 |
|
| 15 |
+
/* Check correct PHP version first */
|
| 16 |
register_activation_hook(__FILE__, 'activate_responsive_menu');
|
| 17 |
+
function activate_responsive_menu() {
|
| 18 |
+
if(version_compare(PHP_VERSION, '5,4', '<')):
|
| 19 |
deactivate_plugins(plugin_basename(__FILE__ ));
|
| 20 |
+
wp_die(sprintf('Responsive Menu requires PHP 5.4 or higher. You are still on %s', PHP_VERSION));
|
| 21 |
+
endif;
|
| 22 |
+
}
|
| 23 |
|
| 24 |
/* Required includes for plugin to function */
|
| 25 |
include dirname(__FILE__) . '/autoload.php';
|
| 35 |
$wp_router->route();
|
| 36 |
|
| 37 |
if(is_admin()):
|
| 38 |
+
add_action('admin_init', function() use($container) {
|
| 39 |
+
include dirname(__FILE__) . '/src/config/default_options.php';
|
| 40 |
+
$migration = new ResponsiveMenu\Database\Migration($container['database'], $default_options);
|
| 41 |
+
$migration->setup();
|
| 42 |
+
$migration->synchronise();
|
| 43 |
+
});
|
| 44 |
endif;
|
src/app/Database/Migration.php
CHANGED
|
@@ -46,15 +46,18 @@ class Migration{
|
|
| 46 |
public function setup()
|
| 47 |
{
|
| 48 |
# Create the database table if it doesn't exist
|
| 49 |
-
$
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
| 58 |
}
|
| 59 |
|
| 60 |
public function synchronise()
|
|
@@ -64,15 +67,17 @@ class Migration{
|
|
| 64 |
$this->migrateVersion2Options();
|
| 65 |
endif;
|
| 66 |
|
| 67 |
-
|
| 68 |
-
$this->addNewOptions();
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
$this->updateVersion();
|
|
|
|
| 76 |
endif;
|
| 77 |
}
|
| 78 |
|
| 46 |
public function setup()
|
| 47 |
{
|
| 48 |
# Create the database table if it doesn't exist
|
| 49 |
+
if(!$this->isVersion3($this->getOldVersion())):
|
| 50 |
+
$sql = "CREATE TABLE " . $this->db->table . " (
|
| 51 |
+
name varchar(50) NOT NULL,
|
| 52 |
+
value varchar(5000) DEFAULT NULL,
|
| 53 |
+
created_at datetime NOT NULL,
|
| 54 |
+
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
| 55 |
+
PRIMARY KEY (name)
|
| 56 |
+
) " . $this->db->db->get_charset_collate() . ";";
|
| 57 |
+
require_once(ABSPATH . 'wp-admin/includes/upgrade.php' );
|
| 58 |
+
dbDelta($sql);
|
| 59 |
+
$this->synchronise();
|
| 60 |
+
endif;
|
| 61 |
}
|
| 62 |
|
| 63 |
public function synchronise()
|
| 67 |
$this->migrateVersion2Options();
|
| 68 |
endif;
|
| 69 |
|
| 70 |
+
if($this->needsUpdate($this->getOldVersion(), $this->getCurrentVersion())):
|
|
|
|
| 71 |
|
| 72 |
+
# Now we can add any new options
|
| 73 |
+
$this->addNewOptions();
|
| 74 |
|
| 75 |
+
# Finally delete any that are no longer used
|
| 76 |
+
$this->tidyUpOptions();
|
| 77 |
+
|
| 78 |
+
# And Update Version
|
| 79 |
$this->updateVersion();
|
| 80 |
+
|
| 81 |
endif;
|
| 82 |
}
|
| 83 |
|
src/app/Mappers/JsMapper.php
CHANGED
|
@@ -147,12 +147,17 @@ class JsMapper
|
|
| 147 |
}
|
| 148 |
});
|
| 149 |
if(this.closeOnLinkClick == 'on') {
|
| 150 |
-
$(this.linkElement).on('click
|
|
|
|
|
|
|
| 151 |
if(self.isOpen) {
|
| 152 |
if($(e.target).closest('.responsive-menu-subarrow').length) {
|
| 153 |
return;
|
| 154 |
}
|
| 155 |
self.closeMenu();
|
|
|
|
|
|
|
|
|
|
| 156 |
}
|
| 157 |
});
|
| 158 |
}
|
| 147 |
}
|
| 148 |
});
|
| 149 |
if(this.closeOnLinkClick == 'on') {
|
| 150 |
+
$(this.linkElement).on('click', function(e) {
|
| 151 |
+
e.preventDefault();
|
| 152 |
+
old_href = $(this).attr('href');
|
| 153 |
if(self.isOpen) {
|
| 154 |
if($(e.target).closest('.responsive-menu-subarrow').length) {
|
| 155 |
return;
|
| 156 |
}
|
| 157 |
self.closeMenu();
|
| 158 |
+
setTimeout(function() {
|
| 159 |
+
window.location = old_href;
|
| 160 |
+
}, self.animationSpeed);
|
| 161 |
}
|
| 162 |
});
|
| 163 |
}
|
src/app/Mappers/ScssButtonMapper.php
CHANGED
|
@@ -27,9 +27,9 @@ class ScssButtonMapper extends ScssMapper
|
|
| 27 |
width: {$this->options['button_width']}px;
|
| 28 |
height: {$this->options['button_height']}px;
|
| 29 |
@if '{$this->options['button_transparent_background']}' == 'off' {
|
| 30 |
-
background
|
| 31 |
&:hover {
|
| 32 |
-
background
|
| 33 |
}
|
| 34 |
}
|
| 35 |
position: {$this->options['button_position_type']};
|
| 27 |
width: {$this->options['button_width']}px;
|
| 28 |
height: {$this->options['button_height']}px;
|
| 29 |
@if '{$this->options['button_transparent_background']}' == 'off' {
|
| 30 |
+
background: {$this->options['button_background_colour']};
|
| 31 |
&:hover {
|
| 32 |
+
background: {$this->options['button_background_colour_hover']};
|
| 33 |
}
|
| 34 |
}
|
| 35 |
position: {$this->options['button_position_type']};
|
src/config/default_options.php
CHANGED
|
@@ -24,8 +24,8 @@ $default_options = array(
|
|
| 24 |
'button_line_colour' => '#fff',
|
| 25 |
'button_text_colour' => '#fff',
|
| 26 |
'button_transparent_background' => 'off',
|
| 27 |
-
'button_width' =>
|
| 28 |
-
'button_height' =>
|
| 29 |
'button_line_margin' => 5,
|
| 30 |
'button_line_height' => 3,
|
| 31 |
'button_line_width' => 25,
|
| 24 |
'button_line_colour' => '#fff',
|
| 25 |
'button_text_colour' => '#fff',
|
| 26 |
'button_transparent_background' => 'off',
|
| 27 |
+
'button_width' => 55,
|
| 28 |
+
'button_height' => 55,
|
| 29 |
'button_line_margin' => 5,
|
| 30 |
'button_line_height' => 3,
|
| 31 |
'button_line_width' => 25,
|
src/public/js/admin/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
jQuery(function($) {
|
| 2 |
|
| 3 |
$('.wp-color-picker').wpColorPicker();
|
| 4 |
-
|
| 5 |
var custom_uploader;
|
| 6 |
|
| 7 |
$('.image_button').click(function (e) {
|
|
@@ -56,13 +56,4 @@ jQuery(function($) {
|
|
| 56 |
}
|
| 57 |
}
|
| 58 |
|
| 59 |
-
if(typeof(Storage) !== "undefined" && localStorage.responsive_menu_tab) {
|
| 60 |
-
tab_id = localStorage.responsive_menu_tab;
|
| 61 |
-
container_name = '#tab_container_' + tab_id.replace('tab_', '');
|
| 62 |
-
$('.tab_container').css('display', 'none');
|
| 63 |
-
$(container_name).css('display', 'block');
|
| 64 |
-
$('.tab').removeClass('active_tab');
|
| 65 |
-
$('#' + tab_id).addClass('active_tab');
|
| 66 |
-
}
|
| 67 |
-
|
| 68 |
});
|
| 1 |
jQuery(function($) {
|
| 2 |
|
| 3 |
$('.wp-color-picker').wpColorPicker();
|
| 4 |
+
|
| 5 |
var custom_uploader;
|
| 6 |
|
| 7 |
$('.image_button').click(function (e) {
|
| 56 |
}
|
| 57 |
}
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
});
|
