Version Description
(13th July 2016) = * Requires PHP 5.4 * Improved Database Migration Scripts * Changed sub-arrows to only show border on left edge * Improved button title text spacing * Improved PHP version checking process
Download this release
Release Info
Developer | ResponsiveMenu |
Plugin | Responsive Menu |
Version | 3.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.6
- readme.txt +14 -2
- responsive-menu.php +16 -13
- src/app/Database/Migration.php +7 -4
- src/app/Mappers/ScssBaseMapper.php +3 -35
- src/app/Mappers/ScssButtonMapper.php +2 -1
- src/app/Mappers/ScssMenuMapper.php +1 -1
- src/app/ViewModels/Components/Button/Button.php +0 -3
- src/public/scss/hamburgers/hamburgers.scss +0 -1
- src/views/header_bar.phtml +0 -3
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://responsive.menu/donate
|
|
4 |
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
|
5 |
Requires at least: 3.5.0
|
6 |
Tested up to: 4.5.3
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -146,6 +146,13 @@ To view our whole FAQ, please go to https://responsive.menu/faq/
|
|
146 |
|
147 |
== Changelog ==
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
= 3.0.5 (13th July 2016) =
|
150 |
* **Requires PHP 5.4**
|
151 |
* Fixed bug with push animation
|
@@ -402,4 +409,9 @@ To view our whole FAQ, please go to https://responsive.menu/faq/
|
|
402 |
* Initial Version Released.
|
403 |
|
404 |
== Upgrade Notice ==
|
405 |
-
|
|
|
|
|
|
|
|
|
|
4 |
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
|
5 |
Requires at least: 3.5.0
|
6 |
Tested up to: 4.5.3
|
7 |
+
Stable tag: 3.0.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
146 |
|
147 |
== Changelog ==
|
148 |
|
149 |
+
= 3.0.6 (13th July 2016) =
|
150 |
+
* **Requires PHP 5.4**
|
151 |
+
* Improved Database Migration Scripts
|
152 |
+
* Changed sub-arrows to only show border on left edge
|
153 |
+
* Improved button title text spacing
|
154 |
+
* Improved PHP version checking process
|
155 |
+
|
156 |
= 3.0.5 (13th July 2016) =
|
157 |
* **Requires PHP 5.4**
|
158 |
* Fixed bug with push animation
|
409 |
* Initial Version Released.
|
410 |
|
411 |
== Upgrade Notice ==
|
412 |
+
|
413 |
+
= 2.8.9 =
|
414 |
+
Requires PHP 5.4 - DO NOT upgrade if you do not have this installed.
|
415 |
+
|
416 |
+
= 2.8.8 =
|
417 |
+
Requires PHP 5.4 - DO NOT upgrade if you do not have this installed.
|
responsive-menu.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Responsive Menu
|
5 |
Plugin URI: https://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: https://responsive.menu
|
@@ -12,18 +12,21 @@ License: GPL2
|
|
12 |
Tags: responsive, menu, responsive menu
|
13 |
*/
|
14 |
|
15 |
-
/* Check correct PHP version first */
|
16 |
-
add_action('admin_init', 'check_responsive_menu_php_version');
|
17 |
-
function check_responsive_menu_php_version() {
|
18 |
-
if(version_compare(PHP_VERSION, '5.4', '<')):
|
19 |
-
add_action('admin_notices', 'responsive_menu_deactivation_text');
|
20 |
-
deactivate_plugins(plugin_basename(__FILE__));
|
21 |
-
endif;
|
22 |
-
}
|
23 |
-
|
24 |
-
function responsive_menu_deactivation_text() {
|
25 |
-
echo '<div class="error"><p>' . sprintf(__('Responsive Menu requires PHP 5.4 or higher to function and has therefore been automatically disabled. You are still on %s.%sPlease speak to your webhost about upgrading your PHP version. For more information please visit %s', 'responsive-menu'), PHP_VERSION, '<br /><br />', '<a target="_blank" href="https://responsive.menu/why-php-5-4/">this page</a>.') . '</p></div>';
|
26 |
-
}
|
|
|
|
|
|
|
27 |
|
28 |
/* Required includes for plugin to function */
|
29 |
include dirname(__FILE__) . '/autoload.php';
|
4 |
Plugin Name: Responsive Menu
|
5 |
Plugin URI: https://responsive.menu
|
6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
7 |
+
Version: 3.0.6
|
8 |
Author: Responsive Menu
|
9 |
Text Domain: responsive-menu
|
10 |
Author URI: https://responsive.menu
|
12 |
Tags: responsive, menu, responsive menu
|
13 |
*/
|
14 |
|
15 |
+
/* Check correct PHP version first */
|
16 |
+
add_action('admin_init', 'check_responsive_menu_php_version');
|
17 |
+
function check_responsive_menu_php_version() {
|
18 |
+
if(version_compare(PHP_VERSION, '5.4', '<')):
|
19 |
+
add_action('admin_notices', 'responsive_menu_deactivation_text');
|
20 |
+
deactivate_plugins(plugin_basename(__FILE__));
|
21 |
+
endif;
|
22 |
+
}
|
23 |
+
|
24 |
+
function responsive_menu_deactivation_text() {
|
25 |
+
echo '<div class="error"><p>' . sprintf(__('Responsive Menu requires PHP 5.4 or higher to function and has therefore been automatically disabled. You are still on %s.%sPlease speak to your webhost about upgrading your PHP version. For more information please visit %s', 'responsive-menu'), PHP_VERSION, '<br /><br />', '<a target="_blank" href="https://responsive.menu/why-php-5-4/">this page</a>.') . '</p></div>';
|
26 |
+
}
|
27 |
+
|
28 |
+
if(version_compare(PHP_VERSION, '5.4', '<'))
|
29 |
+
return;
|
30 |
|
31 |
/* Required includes for plugin to function */
|
32 |
include dirname(__FILE__) . '/autoload.php';
|
src/app/Database/Migration.php
CHANGED
@@ -19,7 +19,7 @@ class Migration {
|
|
19 |
|
20 |
public function __construct(Database $db, OptionService $service, $defaults, $current_version, $old_version, $old_options) {
|
21 |
$this->db = $db;
|
22 |
-
|
23 |
$this->defaults = $defaults;
|
24 |
$this->current_version = $current_version;
|
25 |
$this->old_version = $old_version;
|
@@ -67,9 +67,9 @@ class Migration {
|
|
67 |
public function synchronise() {
|
68 |
|
69 |
# First Thing we need to do is migrate any old options
|
70 |
-
if(!$this->isVersion3())
|
71 |
$this->migrateVersion2Options();
|
72 |
-
|
73 |
if($this->needsUpdate()):
|
74 |
|
75 |
# Now we can add any new options
|
@@ -81,7 +81,7 @@ class Migration {
|
|
81 |
# And Update Version
|
82 |
$this->updateVersion();
|
83 |
|
84 |
-
endif;
|
85 |
|
86 |
}
|
87 |
|
@@ -91,6 +91,7 @@ class Migration {
|
|
91 |
|
92 |
protected function updateVersion() {
|
93 |
update_option(self::$version_var, $this->current_version);
|
|
|
94 |
}
|
95 |
|
96 |
public function isVersion3() {
|
@@ -99,6 +100,8 @@ class Migration {
|
|
99 |
|
100 |
public function migrateVersion2Options() {
|
101 |
$this->service->createOptions($this->getMigratedOptions());
|
|
|
|
|
102 |
}
|
103 |
|
104 |
public function getOptionsToDelete() {
|
19 |
|
20 |
public function __construct(Database $db, OptionService $service, $defaults, $current_version, $old_version, $old_options) {
|
21 |
$this->db = $db;
|
22 |
+
$this->service = $service;
|
23 |
$this->defaults = $defaults;
|
24 |
$this->current_version = $current_version;
|
25 |
$this->old_version = $old_version;
|
67 |
public function synchronise() {
|
68 |
|
69 |
# First Thing we need to do is migrate any old options
|
70 |
+
if($this->old_options && !$this->isVersion3())
|
71 |
$this->migrateVersion2Options();
|
72 |
+
|
73 |
if($this->needsUpdate()):
|
74 |
|
75 |
# Now we can add any new options
|
81 |
# And Update Version
|
82 |
$this->updateVersion();
|
83 |
|
84 |
+
endif;
|
85 |
|
86 |
}
|
87 |
|
91 |
|
92 |
protected function updateVersion() {
|
93 |
update_option(self::$version_var, $this->current_version);
|
94 |
+
$this->old_version = $this->current_version;
|
95 |
}
|
96 |
|
97 |
public function isVersion3() {
|
100 |
|
101 |
public function migrateVersion2Options() {
|
102 |
$this->service->createOptions($this->getMigratedOptions());
|
103 |
+
$this->addNewOptions();
|
104 |
+
$this->updateVersion();
|
105 |
}
|
106 |
|
107 |
public function getOptionsToDelete() {
|
src/app/Mappers/ScssBaseMapper.php
CHANGED
@@ -11,15 +11,13 @@ class ScssBaseMapper extends ScssMapper
|
|
11 |
$css = <<<CSS
|
12 |
|
13 |
#responsive-menu-button,
|
14 |
-
#responsive-menu-container
|
15 |
-
#responsive-menu-header {
|
16 |
display: none;
|
17 |
}
|
18 |
|
19 |
@media screen and (max-width: {$this->options['breakpoint']}px) {
|
20 |
|
21 |
-
#responsive-menu-container
|
22 |
-
#responsive-menu-header {
|
23 |
display: block;
|
24 |
}
|
25 |
|
@@ -193,39 +191,9 @@ class ScssBaseMapper extends ScssMapper
|
|
193 |
.responsive-menu-label.responsive-menu-label-bottom
|
194 |
{
|
195 |
display: block;
|
196 |
-
margin:
|
197 |
}
|
198 |
|
199 |
-
#responsive-menu-header {
|
200 |
-
width: 100%;
|
201 |
-
padding: 0 5%;
|
202 |
-
box-sizing: border-box;
|
203 |
-
top: 0;
|
204 |
-
right: 0;
|
205 |
-
left: 0;
|
206 |
-
display: none;
|
207 |
-
.responsive-menu-header-box {
|
208 |
-
display: inline-block;
|
209 |
-
&, & img {
|
210 |
-
vertical-align: middle;
|
211 |
-
max-width: 100%;
|
212 |
-
}
|
213 |
-
&:last-child {
|
214 |
-
float: right;
|
215 |
-
margin-right: 0;
|
216 |
-
}
|
217 |
-
}
|
218 |
-
#responsive-menu-button {
|
219 |
-
position: relative;
|
220 |
-
margin: 0;
|
221 |
-
left: auto;
|
222 |
-
right: auto;
|
223 |
-
bottom: auto;
|
224 |
-
}
|
225 |
-
.responsive-menu-header-box {
|
226 |
-
margin-right: 2%;
|
227 |
-
}
|
228 |
-
}
|
229 |
}
|
230 |
CSS;
|
231 |
|
11 |
$css = <<<CSS
|
12 |
|
13 |
#responsive-menu-button,
|
14 |
+
#responsive-menu-container {
|
|
|
15 |
display: none;
|
16 |
}
|
17 |
|
18 |
@media screen and (max-width: {$this->options['breakpoint']}px) {
|
19 |
|
20 |
+
#responsive-menu-container {
|
|
|
21 |
display: block;
|
22 |
}
|
23 |
|
191 |
.responsive-menu-label.responsive-menu-label-bottom
|
192 |
{
|
193 |
display: block;
|
194 |
+
margin: 0 auto;
|
195 |
}
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
CSS;
|
199 |
|
src/app/Mappers/ScssButtonMapper.php
CHANGED
@@ -43,12 +43,13 @@ class ScssButtonMapper extends ScssMapper
|
|
43 |
.responsive-menu-label {
|
44 |
color: {$this->options['button_text_colour']};
|
45 |
font-size: {$this->options['button_font_size']}px;
|
|
|
46 |
@if '{$this->options['button_font']}' != '' {
|
47 |
font-family: '{$this->options['button_font']}';
|
48 |
}
|
49 |
}
|
50 |
|
51 |
-
|
52 |
display: inline-block;
|
53 |
transition: transform {$this->options['animation_speed']}s, background-color {$this->options['transition_speed']}s;
|
54 |
}
|
43 |
.responsive-menu-label {
|
44 |
color: {$this->options['button_text_colour']};
|
45 |
font-size: {$this->options['button_font_size']}px;
|
46 |
+
line-height: {$this->options['button_title_line_height']}px;
|
47 |
@if '{$this->options['button_font']}' != '' {
|
48 |
font-family: '{$this->options['button_font']}';
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
#responsive-menu-button {
|
53 |
display: inline-block;
|
54 |
transition: transform {$this->options['animation_speed']}s, background-color {$this->options['transition_speed']}s;
|
55 |
}
|
src/app/Mappers/ScssMenuMapper.php
CHANGED
@@ -113,7 +113,7 @@ class ScssMenuMapper extends ScssMapper
|
|
113 |
line-height: {$this->options['submenu_arrow_height']}px;
|
114 |
width: {$this->options['submenu_arrow_width']}px;
|
115 |
color: {$this->options['menu_sub_arrow_shape_colour']};
|
116 |
-
border: 1px solid {$this->options['menu_sub_arrow_border_colour']};
|
117 |
background-color: {$this->options['menu_sub_arrow_background_colour']};
|
118 |
|
119 |
&:hover {
|
113 |
line-height: {$this->options['submenu_arrow_height']}px;
|
114 |
width: {$this->options['submenu_arrow_width']}px;
|
115 |
color: {$this->options['menu_sub_arrow_shape_colour']};
|
116 |
+
border-left: 1px solid {$this->options['menu_sub_arrow_border_colour']};
|
117 |
background-color: {$this->options['menu_sub_arrow_background_colour']};
|
118 |
|
119 |
&:hover {
|
src/app/ViewModels/Components/Button/Button.php
CHANGED
@@ -22,8 +22,6 @@ class Button implements ViewComponent {
|
|
22 |
$accessible = in_array($button_title_pos, array('left', 'right')) ? 'responsive-menu-accessible' : '';
|
23 |
$content = '';
|
24 |
|
25 |
-
$content .= $options['use_header_bar'] == 'on' ? '<div id="responsive-menu-header-bar-button" class="responsive-menu-header-box">' : '';
|
26 |
-
|
27 |
$content .= '<button id="responsive-menu-button"
|
28 |
class="responsive-menu-button ' . $accessible .
|
29 |
' responsive-menu-' . $options['button_click_animation'] . '"
|
@@ -33,7 +31,6 @@ class Button implements ViewComponent {
|
|
33 |
$content .= '<span class="responsive-menu-box">' . $options->getButtonIcon() . $options->getButtonIconActive() . '</span>';
|
34 |
$content .= in_array($button_title_pos, array('bottom', 'right')) ? $button_title_html : '';
|
35 |
$content .= '</button>';
|
36 |
-
$content .= $options['use_header_bar'] == 'on' ? '</div>' : '';
|
37 |
|
38 |
return $content;
|
39 |
|
22 |
$accessible = in_array($button_title_pos, array('left', 'right')) ? 'responsive-menu-accessible' : '';
|
23 |
$content = '';
|
24 |
|
|
|
|
|
25 |
$content .= '<button id="responsive-menu-button"
|
26 |
class="responsive-menu-button ' . $accessible .
|
27 |
' responsive-menu-' . $options['button_click_animation'] . '"
|
31 |
$content .= '<span class="responsive-menu-box">' . $options->getButtonIcon() . $options->getButtonIconActive() . '</span>';
|
32 |
$content .= in_array($button_title_pos, array('bottom', 'right')) ? $button_title_html : '';
|
33 |
$content .= '</button>';
|
|
|
34 |
|
35 |
return $content;
|
36 |
|
src/public/scss/hamburgers/hamburgers.scss
CHANGED
@@ -39,7 +39,6 @@ $hamburger-types: (
|
|
39 |
// Hamburger types
|
40 |
// ==================================================
|
41 |
@import "types/boring";
|
42 |
-
@import "types/vortex";
|
43 |
|
44 |
// ==================================================
|
45 |
// Cooking up additional types:
|
39 |
// Hamburger types
|
40 |
// ==================================================
|
41 |
@import "types/boring";
|
|
|
42 |
|
43 |
// ==================================================
|
44 |
// Cooking up additional types:
|
src/views/header_bar.phtml
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<div id="responsive-menu-header">
|
2 |
-
<?php echo $l['header']; ?>
|
3 |
-
</div>
|
|
|
|
|
|