Responsive Menu - Version 3.1.12

Version Description

(17th January 2018) = * Added option to control sub-menu speed. * Added "Minus" button animation. * Added option to adjust the page to account for the Header Bar. * Added image height options for Header Bar. * Updated FontAwesome version to get latest icons. * Fix for Slide effect on Desktop Menu.

Download this release

Release Info

Developer peterfeatherstone
Plugin Icon 128x128 Responsive Menu
Version 3.1.12
Comparing to
See all releases

Code changes from version 3.1.11 to 3.1.12

app/Validation/Validator.php CHANGED
@@ -43,6 +43,7 @@ class Validator {
43
  'button_top',
44
  'animation_speed',
45
  'transition_speed',
 
46
  'button_font_size',
47
  'button_title_line_height',
48
  'menu_width',
43
  'button_top',
44
  'animation_speed',
45
  'transition_speed',
46
+ 'sub_menu_speed',
47
  'button_font_size',
48
  'button_title_line_height',
49
  'menu_width',
config/default_options.php CHANGED
@@ -77,6 +77,7 @@ function get_responsive_menu_default_options() {
77
  'page_wrapper' => null,
78
  'animation_speed' => 0.5,
79
  'transition_speed' => 0.5,
 
80
 
81
  // Menu Settings
82
  'active_arrow_shape' => '▲',
@@ -214,8 +215,13 @@ function get_responsive_menu_default_options() {
214
  'single_menu_item_submenu_background_colour_hover' => '#ffffff',
215
 
216
  'use_header_bar' => 'off',
 
217
  'header_bar_breakpoint' => '800',
218
  'header_bar_logo' => null,
 
 
 
 
219
  'header_bar_logo_alt' => '',
220
  'header_bar_logo_link' => null,
221
  'header_bar_title' => null,
77
  'page_wrapper' => null,
78
  'animation_speed' => 0.5,
79
  'transition_speed' => 0.5,
80
+ 'sub_menu_speed' => 0.2,
81
 
82
  // Menu Settings
83
  'active_arrow_shape' => '▲',
215
  'single_menu_item_submenu_background_colour_hover' => '#ffffff',
216
 
217
  'use_header_bar' => 'off',
218
+ 'header_bar_adjust_page' => null,
219
  'header_bar_breakpoint' => '800',
220
  'header_bar_logo' => null,
221
+ 'header_bar_logo_height' => null,
222
+ 'header_bar_logo_height_unit' => '%',
223
+ 'header_bar_logo_width' => null,
224
+ 'header_bar_logo_width_unit' => '%',
225
  'header_bar_logo_alt' => '',
226
  'header_bar_logo_link' => null,
227
  'header_bar_title' => null,
public/css/admin/base.css CHANGED
@@ -377,6 +377,11 @@
377
  display: none !important;
378
  }
379
 
 
 
 
 
 
380
  #responsive-menu-admin .menu-order-option-switch,
381
  #responsive-menu-admin .order-option-switch {
382
  background: #DE4B42;
377
  display: none !important;
378
  }
379
 
380
+ #responsive-menu-admin .dashed-placeholder {
381
+ border: 3px #CCC dashed;
382
+ height: 50px;
383
+ }
384
+
385
  #responsive-menu-admin .menu-order-option-switch,
386
  #responsive-menu-admin .order-option-switch {
387
  background: #DE4B42;
public/js/admin/base.js CHANGED
@@ -198,7 +198,8 @@ jQuery(function($) {
198
  });
199
 
200
  $('#menu-sortable').sortable({
201
- revert: true
 
202
  });
203
 
204
  $('#sortable, .draggable').disableSelection();
198
  });
199
 
200
  $('#menu-sortable').sortable({
201
+ revert: true,
202
+ placeholder: 'dashed-placeholder'
203
  });
204
 
205
  $('#sortable, .draggable').disableSelection();
public/js/app.js.twig CHANGED
@@ -21,6 +21,7 @@ jQuery(document).ready(function($) {
21
  closeOnLinkClick: '{{ options.menu_close_on_link_click }}',
22
  itemTriggerSubMenu: '{{ options.menu_item_click_to_trigger_submenu }}',
23
  linkElement: '.responsive-menu-item-link',
 
24
  openMenu: function() {
25
  $(this.trigger).addClass(this.activeClass);
26
  $('html').addClass(this.openClass);
@@ -62,25 +63,25 @@ jQuery(document).ready(function($) {
62
  var top_siblings = sub_menu.parents('.responsive-menu-item-has-children').last().siblings('.responsive-menu-item-has-children');
63
  var first_siblings = sub_menu.parents('.responsive-menu-item-has-children').first().siblings('.responsive-menu-item-has-children');
64
  /* Close up just the top level parents to key the rest as it was */
65
- top_siblings.children('.responsive-menu-submenu').slideUp(200, 'linear').removeClass('responsive-menu-submenu-open');
66
  /* Set each parent arrow to inactive */
67
  top_siblings.each(function() {
68
  $(this).find('.responsive-menu-subarrow').first().html(self.inactiveArrow);
69
  $(this).find('.responsive-menu-subarrow').first().removeClass('responsive-menu-subarrow-active');
70
  });
71
  /* Now Repeat for the current item siblings */
72
- first_siblings.children('.responsive-menu-submenu').slideUp(200, 'linear').removeClass('responsive-menu-submenu-open');
73
  first_siblings.each(function() {
74
  $(this).find('.responsive-menu-subarrow').first().html(self.inactiveArrow);
75
  $(this).find('.responsive-menu-subarrow').first().removeClass('responsive-menu-subarrow-active');
76
  });
77
  }
78
  if(sub_menu.hasClass('responsive-menu-submenu-open')) {
79
- sub_menu.slideUp(200, 'linear').removeClass('responsive-menu-submenu-open');
80
  $(subarrow).html(this.inactiveArrow);
81
  $(subarrow).removeClass('responsive-menu-subarrow-active');
82
  } else {
83
- sub_menu.slideDown(200, 'linear').addClass('responsive-menu-submenu-open');
84
  $(subarrow).html(this.activeArrow);
85
  $(subarrow).addClass('responsive-menu-subarrow-active');
86
  }
21
  closeOnLinkClick: '{{ options.menu_close_on_link_click }}',
22
  itemTriggerSubMenu: '{{ options.menu_item_click_to_trigger_submenu }}',
23
  linkElement: '.responsive-menu-item-link',
24
+ subMenuTransitionTime: {{ options.sub_menu_speed * 1000 }},
25
  openMenu: function() {
26
  $(this.trigger).addClass(this.activeClass);
27
  $('html').addClass(this.openClass);
63
  var top_siblings = sub_menu.parents('.responsive-menu-item-has-children').last().siblings('.responsive-menu-item-has-children');
64
  var first_siblings = sub_menu.parents('.responsive-menu-item-has-children').first().siblings('.responsive-menu-item-has-children');
65
  /* Close up just the top level parents to key the rest as it was */
66
+ top_siblings.children('.responsive-menu-submenu').slideUp(self.subMenuTransitionTime, 'linear').removeClass('responsive-menu-submenu-open');
67
  /* Set each parent arrow to inactive */
68
  top_siblings.each(function() {
69
  $(this).find('.responsive-menu-subarrow').first().html(self.inactiveArrow);
70
  $(this).find('.responsive-menu-subarrow').first().removeClass('responsive-menu-subarrow-active');
71
  });
72
  /* Now Repeat for the current item siblings */
73
+ first_siblings.children('.responsive-menu-submenu').slideUp(self.subMenuTransitionTime, 'linear').removeClass('responsive-menu-submenu-open');
74
  first_siblings.each(function() {
75
  $(this).find('.responsive-menu-subarrow').first().html(self.inactiveArrow);
76
  $(this).find('.responsive-menu-subarrow').first().removeClass('responsive-menu-subarrow-active');
77
  });
78
  }
79
  if(sub_menu.hasClass('responsive-menu-submenu-open')) {
80
+ sub_menu.slideUp(self.subMenuTransitionTime, 'linear').removeClass('responsive-menu-submenu-open');
81
  $(subarrow).html(this.inactiveArrow);
82
  $(subarrow).removeClass('responsive-menu-subarrow-active');
83
  } else {
84
+ sub_menu.slideDown(self.subMenuTransitionTime, 'linear').addClass('responsive-menu-submenu-open');
85
  $(subarrow).html(this.activeArrow);
86
  $(subarrow).addClass('responsive-menu-subarrow-active');
87
  }
readme.txt CHANGED
@@ -1,10 +1,9 @@
1
  === Responsive Menu ===
2
  Contributors: ResponsiveMenu, peterfeatherstone
3
- Donate link: https://responsive.menu/donate
4
  Tags: responsive, menu, responsive menu, mobile menu, wordpress responsive menu, wp responsive menu, tablet menu, hamburger menu, hamburger, mobile, tablet, 3 lines, 3 line, three line, three lines
5
  Requires at least: 3.6
6
  Tested up to: 4.9
7
- Stable tag: 3.1.11
8
  Requires PHP: 5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -69,7 +68,7 @@ PHP 5.4+
69
  * Integrated header bar
70
  * Let the plugin provide and style your main menu as well as hamburger menu
71
 
72
- For more reasons to go Pro, please visit [this page](https://responsive.menu/why-go-pro/).
73
 
74
  [youtube https://www.youtube.com/watch?v=aj6ba0tGKPg]
75
 
@@ -111,6 +110,14 @@ To view our FAQ, please go to [https://responsive.menu/faq/](https://responsive.
111
 
112
  == Changelog ==
113
 
 
 
 
 
 
 
 
 
114
  = 3.1.11 (28th November 2017) =
115
  * Hotfix to remove annoying pro overlay
116
 
1
  === Responsive Menu ===
2
  Contributors: ResponsiveMenu, peterfeatherstone
 
3
  Tags: responsive, menu, responsive menu, mobile menu, wordpress responsive menu, wp responsive menu, tablet menu, hamburger menu, hamburger, mobile, tablet, 3 lines, 3 line, three line, three lines
4
  Requires at least: 3.6
5
  Tested up to: 4.9
6
+ Stable tag: 3.1.12
7
  Requires PHP: 5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
68
  * Integrated header bar
69
  * Let the plugin provide and style your main menu as well as hamburger menu
70
 
71
+ For more reasons to go Pro, please visit [this page](https://responsive.menu#why-go-pro).
72
 
73
  [youtube https://www.youtube.com/watch?v=aj6ba0tGKPg]
74
 
110
 
111
  == Changelog ==
112
 
113
+ = 3.1.12 (17th January 2018) =
114
+ * Added option to control sub-menu speed.
115
+ * Added "Minus" button animation.
116
+ * Added option to adjust the page to account for the Header Bar.
117
+ * Added image height options for Header Bar.
118
+ * Updated FontAwesome version to get latest icons.
119
+ * Fix for Slide effect on Desktop Menu.
120
+
121
  = 3.1.11 (28th November 2017) =
122
  * Hotfix to remove annoying pro overlay
123
 
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.1.11
8
  Author: Peter Featherstone
9
  Text Domain: responsive-menu
10
  Author URI: https://peterfeatherstone.com
@@ -21,7 +21,12 @@ function check_responsive_menu_php_version() {
21
  }
22
 
23
  function responsive_menu_deactivation_text() {
24
- 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', PHP_VERSION, '<br /><br />', '<a target="_blank" href="https://responsive.menu/why-php-5-4/">this page</a>.') . '</p></div>';
 
 
 
 
 
25
  }
26
 
27
  if(version_compare(PHP_VERSION, '5.4', '<'))
4
  Plugin Name: Responsive Menu
5
  Plugin URI: https://responsive.menu
6
  Description: Highly Customisable Responsive Menu Plugin for WordPress
7
+ Version: 3.1.12
8
  Author: Peter Featherstone
9
  Text Domain: responsive-menu
10
  Author URI: https://peterfeatherstone.com
21
  }
22
 
23
  function responsive_menu_deactivation_text() {
24
+ echo '<div class="error"><p>' . sprintf(
25
+ 'Responsive Menu requires PHP 5.4 or higher to function and has therefore been automatically disabled.
26
+ You are still on %s.%sPlease speak to your web host about upgrading your PHP version.',
27
+ PHP_VERSION,
28
+ '<br /><br />'
29
+ ) . '</p></div>';
30
  }
31
 
32
  if(version_compare(PHP_VERSION, '5.4', '<'))
views/admin/banners.html.twig CHANGED
@@ -16,7 +16,7 @@
16
  <li>Preview Changes</li>
17
  <li>And much more</li>
18
  </ul>
19
- <a target="_blank" href="https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=banner&utm_campaign=free-plugin-banner" class="button">Upgrade Now</a>
20
  </div>
21
 
22
  <div id="docs-banner">
16
  <li>Preview Changes</li>
17
  <li>And much more</li>
18
  </ul>
19
+ <a target="_blank" href="https://responsive.menu?utm_source=free-plugin&utm_medium=banner&utm_campaign=free-plugin-banner#pricing" class="button">Upgrade Now</a>
20
  </div>
21
 
22
  <div id="docs-banner">
views/admin/macros.html.twig CHANGED
@@ -76,6 +76,7 @@
76
  <option value='elastic-r' disabled data-subtext='[PRO]'>Elastic Reverse -</option>
77
  <option value='emphatic' disabled data-subtext='[PRO]'>Emphatic -</option>
78
  <option value='emphatic-r' disabled data-subtext='[PRO]'>Emphatic Reverse -</option>
 
79
  <option value='slider' disabled data-subtext='[PRO]'>Slider -</option>
80
  <option value='slider-r' disabled data-subtext='[PRO]'>Slider Reverse -</option>
81
  <option value='spin' disabled data-subtext='[PRO]'>Spin -</option>
@@ -137,7 +138,7 @@
137
  <td class='col-right {% if pro %} {{ pro }}{% endif %}'>
138
  {% if pro == 'pro' %}
139
  <div class="responsive-menu-pro-overlay">
140
- <a href="https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade"
141
  target="_blank">Click to upgrade now to use</a>
142
  </div>
143
  {% endif %}
76
  <option value='elastic-r' disabled data-subtext='[PRO]'>Elastic Reverse -</option>
77
  <option value='emphatic' disabled data-subtext='[PRO]'>Emphatic -</option>
78
  <option value='emphatic-r' disabled data-subtext='[PRO]'>Emphatic Reverse -</option>
79
+ <option value='minus' disabled data-subtext='[PRO]'>Minus -</option>
80
  <option value='slider' disabled data-subtext='[PRO]'>Slider -</option>
81
  <option value='slider-r' disabled data-subtext='[PRO]'>Slider Reverse -</option>
82
  <option value='spin' disabled data-subtext='[PRO]'>Spin -</option>
138
  <td class='col-right {% if pro %} {{ pro }}{% endif %}'>
139
  {% if pro == 'pro' %}
140
  <div class="responsive-menu-pro-overlay">
141
+ <a href="https://responsive.menu?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade#pricing"
142
  target="_blank">Click to upgrade now to use</a>
143
  </div>
144
  {% endif %}
views/admin/sections/advanced.html.twig CHANGED
@@ -10,8 +10,9 @@
10
  <div class='panel panel-default'>
11
  {{ macros.header('Animation Speeds', section, '/advanced-setup/advanced/#animation-speeds') }}
12
  <table class='table table-bordered table-hover'>
13
- {{ macros.row('animation_speed', 'Animation Speed', 'input', options, errors, '', '', '', '', 'Specify the speed at which the container slides in and sub menus open among other things.', 's') }}
14
- {{ macros.row('transition_speed', 'Transition Speed', 'input', options, errors, '', '', '', '', 'Specify the speed at which background colours transition from dormant to active or hover states.', 's') }}
 
15
  </table>
16
  </div>
17
 
10
  <div class='panel panel-default'>
11
  {{ macros.header('Animation Speeds', section, '/advanced-setup/advanced/#animation-speeds') }}
12
  <table class='table table-bordered table-hover'>
13
+ {{ macros.row('animation_speed', 'Container', 'input', options, errors, '', '', '', '', 'Specify the speed at which the container slides in.', 's') }}
14
+ {{ macros.row('transition_speed', 'Colours', 'input', options, errors, '', '', '', '', 'Specify the speed at which colours transition from standard to active or hover states.', 's') }}
15
+ {{ macros.row('sub_menu_speed', 'Sub Menus', 'input', options, errors, '', '', '', '', 'Specify the speed at which the sub menus transition.', 's') }}
16
  </table>
17
  </div>
18
 
views/admin/sections/header-bar.html.twig CHANGED
@@ -25,6 +25,8 @@
25
  {{ macros.header('Logo', section, '/advanced-setup/header-bar/#logo') }}
26
  <table class='table table-bordered table-hover'>
27
  {{ macros.row('header_bar_logo', 'Image', 'image', options, errors, '', 'pro', '', '', 'Set a logo image for use on the header bar.') }}
 
 
28
  {{ macros.row('header_bar_logo_alt', 'Alt Text', 'input', options, errors, '', 'pro', '', '', 'Set the alt text for the logo image.') }}
29
  {{ macros.row('header_bar_logo_link', 'Link', 'input', options, errors, '', 'pro', '', '', 'Set a link for the logo image.') }}
30
  </table>
@@ -56,6 +58,7 @@
56
  {{ macros.header('Sizing', section, '/advanced-setup/header-bar/#sizing') }}
57
  <table class='table table-bordered table-hover'>
58
  {{ macros.row('header_bar_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'pixel', 'Set the height of the header bar and it\'s unit.') }}
 
59
  </table>
60
  </div>
61
 
25
  {{ macros.header('Logo', section, '/advanced-setup/header-bar/#logo') }}
26
  <table class='table table-bordered table-hover'>
27
  {{ macros.row('header_bar_logo', 'Image', 'image', options, errors, '', 'pro', '', '', 'Set a logo image for use on the header bar.') }}
28
+ {{ macros.row('header_bar_logo_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'percentage', 'Set a height for the logo image.') }}
29
+ {{ macros.row('header_bar_logo_width', 'Width', 'input', options, errors, 'has-unit', 'pro', '', 'percentage', 'Set a width for the logo image.') }}
30
  {{ macros.row('header_bar_logo_alt', 'Alt Text', 'input', options, errors, '', 'pro', '', '', 'Set the alt text for the logo image.') }}
31
  {{ macros.row('header_bar_logo_link', 'Link', 'input', options, errors, '', 'pro', '', '', 'Set a link for the logo image.') }}
32
  </table>
58
  {{ macros.header('Sizing', section, '/advanced-setup/header-bar/#sizing') }}
59
  <table class='table table-bordered table-hover'>
60
  {{ macros.row('header_bar_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'pixel', 'Set the height of the header bar and it\'s unit.') }}
61
+ {{ macros.row('header_bar_adjust_page', 'Adjust Page', 'checkbox', options, errors, '', 'pro', '', '', 'Turning this on will automatically adjust your page to bring the content down inline with the header bar.') }}
62
  </table>
63
  </div>
64
 
views/admin/sections/modules/desktop-menu-settings.html.twig CHANGED
@@ -8,7 +8,7 @@
8
  <div id="responsive-menu-desktop-menu-container" class="pro-container">
9
 
10
  <div class="responsive-menu-pro-overlay">
11
- <a href="https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade"
12
  target="_blank">Click to upgrade now to use</a>
13
  </div>
14
 
8
  <div id="responsive-menu-desktop-menu-container" class="pro-container">
9
 
10
  <div class="responsive-menu-pro-overlay">
11
+ <a href="https://responsive.menu?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade#pricing"
12
  target="_blank">Click to upgrade now to use</a>
13
  </div>
14
 
views/admin/sections/modules/font-icons.html.twig CHANGED
@@ -20,7 +20,7 @@
20
  </td>
21
  <td class='col-right pro'>
22
  <div class="responsive-menu-pro-overlay">
23
- <a href="https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade"
24
  target="_blank">Click to upgrade now to use</a>
25
  </div>
26
  <table id='font-icon-container'>
20
  </td>
21
  <td class='col-right pro'>
22
  <div class="responsive-menu-pro-overlay">
23
+ <a href="https://responsive.menu?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade#pricing"
24
  target="_blank">Click to upgrade now to use</a>
25
  </div>
26
  <table id='font-icon-container'>
views/admin/sections/modules/header-bar-ordering.html.twig CHANGED
@@ -12,7 +12,7 @@
12
  </td>
13
  <td class="col-right pro text-center">
14
  <div class="responsive-menu-pro-overlay">
15
- <a href="https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade"
16
  target="_blank">Click to upgrade now to use</a>
17
  </div>
18
  <ul id='header-bar-sortable'>
12
  </td>
13
  <td class="col-right pro text-center">
14
  <div class="responsive-menu-pro-overlay">
15
+ <a href="https://responsive.menu?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade#pricing"
16
  target="_blank">Click to upgrade now to use</a>
17
  </div>
18
  <ul id='header-bar-sortable'>
views/preview.html.twig CHANGED
@@ -1,3 +1,3 @@
1
  <div id="responsive-menu-preview" style="position: fixed; top: 0; left: 0; right: 0; z-index: 200000; background: rgba(222, 75, 64, 0.89); height: 50px; line-height: 50px; padding: 0 5%; font-size: 14px; color: white; text-align: center; font-family: Arial; font-weight: bold;">
2
- Preview is only available with the Pro version - click <a style="text-decoration: underline; color: white;" href="https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=preview&utm_campaign=free-plugin-preview" target="_blank">here</a> to upgrade today.
3
  </div>
1
  <div id="responsive-menu-preview" style="position: fixed; top: 0; left: 0; right: 0; z-index: 200000; background: rgba(222, 75, 64, 0.89); height: 50px; line-height: 50px; padding: 0 5%; font-size: 14px; color: white; text-align: center; font-family: Arial; font-weight: bold;">
2
+ Preview is only available with the Pro version - click <a style="text-decoration: underline; color: white;" href="https://responsive.menu?utm_source=free-plugin&utm_medium=preview&utm_campaign=free-plugin-preview#pricing" target="_blank">here</a> to upgrade today.
3
  </div>