Version Description
(22nd July 2017) = * Requires PHP 5.4 * Added ability to use description in menu items * Added option for button open title * Added ability to have the menu automatically opened on page load - Pro Only * Added ability to use keyboard shortcuts to close the menu - Pro Only * Added ability to use keyboard shortcuts to open the menu - Pro Only * Added ability to disable plugins FontAwesome and BootStrap scripts in case you want to load your own - Pro Only * Improve selection of menu items by menu item drop-down selection rather than by ID - Pro Only * Fixed bug with 3Dx animation and hover colours - Pro Only * Optimised twig imports to only include what is needed.
Download this release
Release Info
Developer | peterfeatherstone |
Plugin | Responsive Menu |
Version | 3.1.5 |
Comparing to | |
See all releases |
Code changes from version 3.1.4 to 3.1.5
- app/Controllers/FrontController.php +6 -4
- app/Walkers/Walker.php +4 -0
- config/default_options.php +6 -0
- config/polylang.php +1 -4
- config/twig.php +53 -44
- public/css/admin/admin.css +8 -4
- public/css/app.css.twig +4 -0
- public/js/admin/admin.js +34 -0
- public/js/app.js.twig +14 -0
- readme.txt +13 -1
- responsive-menu.php +3 -3
- views/admin/banners.html.twig +10 -8
- views/admin/macros.html.twig +2 -2
- views/admin/sections/button.html.twig +1 -0
- views/admin/sections/header-bar.html.twig +1 -1
- views/admin/sections/initial-setup.html.twig +1 -1
- views/admin/sections/menu.html.twig +22 -7
- views/admin/sections/technical.html.twig +2 -0
- views/admin/tabs.html.twig +3 -3
- views/app/button.html.twig +8 -2
- views/preview.html.twig +1 -1
app/Controllers/FrontController.php
CHANGED
@@ -29,10 +29,12 @@ class FrontController {
|
|
29 |
});
|
30 |
|
31 |
if($options['external_files'] == 'on'):
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
36 |
else:
|
37 |
add_action('wp_head', function() use($options) {
|
38 |
$css_data = $this->view->render('css/app.css.twig', ['options' => $options]);
|
29 |
});
|
30 |
|
31 |
if($options['external_files'] == 'on'):
|
32 |
+
add_action('wp_enqueue_scripts', function() use($options) {
|
33 |
+
$css_file = plugins_url() . '/responsive-menu-data/css/responsive-menu-' . get_current_blog_id() . '.css';
|
34 |
+
$js_file = plugins_url() . '/responsive-menu-data/js/responsive-menu-' . get_current_blog_id() . '.js';
|
35 |
+
wp_enqueue_style('responsive-menu', $css_file, null, false);
|
36 |
+
wp_enqueue_script('responsive-menu', $js_file, ['jquery'], false, $options['scripts_in_footer'] == 'on' ? true : false);
|
37 |
+
});
|
38 |
else:
|
39 |
add_action('wp_head', function() use($options) {
|
40 |
$css_data = $this->view->render('css/app.css.twig', ['options' => $options]);
|
app/Walkers/Walker.php
CHANGED
@@ -87,6 +87,10 @@ class Walker extends \Walker_Nav_Menu {
|
|
87 |
$item_output = '<a'. $attributes .'>';
|
88 |
$item_output .= $title;
|
89 |
$item_output .= $initial_arrow;
|
|
|
|
|
|
|
|
|
90 |
$item_output .= '</a>';
|
91 |
|
92 |
$output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
|
87 |
$item_output = '<a'. $attributes .'>';
|
88 |
$item_output .= $title;
|
89 |
$item_output .= $initial_arrow;
|
90 |
+
|
91 |
+
if(isset($item->description) && $item->description)
|
92 |
+
$item_output .= '<span class="responsive-menu-item-description">' . $item->description . '</span>';
|
93 |
+
|
94 |
$item_output .= '</a>';
|
95 |
|
96 |
$output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
|
config/default_options.php
CHANGED
@@ -21,9 +21,13 @@ function get_responsive_menu_default_options() {
|
|
21 |
'menu_depth_5_unit' => '%',
|
22 |
'menu_to_use' => '',
|
23 |
'theme_location_menu' => '',
|
|
|
|
|
|
|
24 |
|
25 |
// Button Settings
|
26 |
'button_title' => null,
|
|
|
27 |
'button_image' => null,
|
28 |
'button_image_alt' => null,
|
29 |
'button_image_when_clicked' => null,
|
@@ -169,6 +173,8 @@ function get_responsive_menu_default_options() {
|
|
169 |
'minify_scripts' => 'off',
|
170 |
'scripts_in_footer' => 'off',
|
171 |
'external_files' => 'off',
|
|
|
|
|
172 |
|
173 |
'shortcode' => 'off',
|
174 |
'mobile_only' => 'off',
|
21 |
'menu_depth_5_unit' => '%',
|
22 |
'menu_to_use' => '',
|
23 |
'theme_location_menu' => '',
|
24 |
+
'show_menu_on_page_load' => false,
|
25 |
+
'keyboard_shortcut_close_menu' => '27,37',
|
26 |
+
'keyboard_shortcut_open_menu' => '32,39',
|
27 |
|
28 |
// Button Settings
|
29 |
'button_title' => null,
|
30 |
+
'button_title_open' => null,
|
31 |
'button_image' => null,
|
32 |
'button_image_alt' => null,
|
33 |
'button_image_when_clicked' => null,
|
173 |
'minify_scripts' => 'off',
|
174 |
'scripts_in_footer' => 'off',
|
175 |
'external_files' => 'off',
|
176 |
+
'remove_fontawesome' => false,
|
177 |
+
'remove_bootstrap' => false,
|
178 |
|
179 |
'shortcode' => 'off',
|
180 |
'mobile_only' => 'off',
|
config/polylang.php
CHANGED
@@ -1,15 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
add_action('plugins_loaded', function() {
|
4 |
-
load_plugin_textdomain('responsive-menu', false, basename(dirname(dirname(dirname(__FILE__)))) . '/translations/');
|
5 |
-
});
|
6 |
-
|
7 |
if(is_admin()):
|
8 |
add_action('plugins_loaded', function() {
|
9 |
if(function_exists('pll_register_string')):
|
10 |
$options = get_responsive_menu_service('option_manager')->all();
|
11 |
pll_register_string('menu_to_use', $options['menu_to_use'], 'Responsive Menu');
|
12 |
pll_register_string('button_title', $options['button_title'], 'Responsive Menu');
|
|
|
13 |
pll_register_string('menu_title', $options['menu_title'], 'Responsive Menu');
|
14 |
pll_register_string('menu_title_link', $options['menu_title_link'], 'Responsive Menu');
|
15 |
pll_register_string('menu_additional_content', $options['menu_additional_content'], 'Responsive Menu');
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
if(is_admin()):
|
4 |
add_action('plugins_loaded', function() {
|
5 |
if(function_exists('pll_register_string')):
|
6 |
$options = get_responsive_menu_service('option_manager')->all();
|
7 |
pll_register_string('menu_to_use', $options['menu_to_use'], 'Responsive Menu');
|
8 |
pll_register_string('button_title', $options['button_title'], 'Responsive Menu');
|
9 |
+
pll_register_string('button_title_open', $options['button_title_open'], 'Responsive Menu');
|
10 |
pll_register_string('menu_title', $options['menu_title'], 'Responsive Menu');
|
11 |
pll_register_string('menu_title_link', $options['menu_title_link'], 'Responsive Menu');
|
12 |
pll_register_string('menu_additional_content', $options['menu_additional_content'], 'Responsive Menu');
|
config/twig.php
CHANGED
@@ -5,54 +5,63 @@ $twig = new Twig_Environment(new Twig_Loader_Filesystem([
|
|
5 |
dirname(dirname(__FILE__)) . '/public',
|
6 |
]), ['autoescape' => false]);
|
7 |
|
8 |
-
|
9 |
-
return do_shortcode($string);
|
10 |
-
}));
|
11 |
|
12 |
-
$twig->addFilter(new Twig_SimpleFilter('
|
13 |
-
|
14 |
-
|
15 |
-
return $translated;
|
16 |
-
}));
|
17 |
|
18 |
-
$twig->addFilter(new Twig_SimpleFilter('
|
19 |
-
|
20 |
-
|
|
|
|
|
21 |
|
22 |
-
$twig->addFunction(new Twig_SimpleFunction('
|
23 |
-
if(isset($items['button']))
|
24 |
-
unset($items['button']);
|
25 |
-
return $items;
|
26 |
-
}));
|
27 |
|
28 |
-
$
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
$
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
$
|
54 |
-
$twig->addGlobal('admin_url', get_admin_url());
|
55 |
-
$twig->addFunction(new Twig_SimpleFunction('current_page', function() {
|
56 |
-
return get_option('responsive_menu_current_page', 'initial-setup');
|
57 |
}));
|
|
|
58 |
return $twig;
|
5 |
dirname(dirname(__FILE__)) . '/public',
|
6 |
]), ['autoescape' => false]);
|
7 |
|
8 |
+
if(!is_admin()):
|
|
|
|
|
9 |
|
10 |
+
$twig->addFilter(new Twig_SimpleFilter('shortcode', function($string) {
|
11 |
+
return do_shortcode($string);
|
12 |
+
}));
|
|
|
|
|
13 |
|
14 |
+
$twig->addFilter(new Twig_SimpleFilter('translate', function($string, $key) {
|
15 |
+
$translated = apply_filters('wpml_translate_single_string', $string, 'Responsive Menu', $key);
|
16 |
+
$translated = function_exists('pll__') ? pll__($translated) : $translated;
|
17 |
+
return $translated;
|
18 |
+
}));
|
19 |
|
20 |
+
$twig->addFunction(new Twig_SimpleFunction('build_menu', function($env, $options) {
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
$translator = $env->getFilter('translate')->getCallable();
|
23 |
+
$menu = $translator($options['menu_to_use'], 'menu_to_use');
|
24 |
+
$walker = $options['custom_walker'] ? new $options['custom_walker']($options) : new ResponsiveMenu\Walkers\Walker($options);
|
25 |
+
|
26 |
+
return wp_nav_menu(
|
27 |
+
[
|
28 |
+
'container' => '',
|
29 |
+
'menu_id' => 'responsive-menu',
|
30 |
+
'menu_class' => null,
|
31 |
+
'menu' => $menu && !$options['theme_location_menu'] ? $menu : null,
|
32 |
+
'depth' => $options['menu_depth'] ? $options['menu_depth'] : 0,
|
33 |
+
'theme_location' => $options['theme_location_menu'] ? $options['theme_location_menu'] : null,
|
34 |
+
'walker' => $walker,
|
35 |
+
'echo' => false
|
36 |
+
]
|
37 |
+
);
|
38 |
+
|
39 |
+
}, ['needs_environment' => true]));
|
40 |
+
|
41 |
+
$twig->addGlobal('search_url', function_exists('icl_get_home_url') ? icl_get_home_url() : get_home_url());
|
42 |
|
43 |
+
else:
|
44 |
+
|
45 |
+
$twig->addFunction(new Twig_SimpleFunction('header_bar_items', function($items) {
|
46 |
+
if(isset($items['button']))
|
47 |
+
unset($items['button']);
|
48 |
+
return $items;
|
49 |
+
}));
|
50 |
+
|
51 |
+
$twig->addGlobal('admin_url', get_admin_url());
|
52 |
+
|
53 |
+
$twig->addFunction(new Twig_SimpleFunction('csrf', function() {
|
54 |
+
return wp_nonce_field('update', 'responsive-menu-nonce', true, false);
|
55 |
+
}));
|
56 |
+
|
57 |
+
$twig->addFunction(new Twig_SimpleFunction('current_page', function() {
|
58 |
+
return get_option('responsive_menu_current_page', 'initial-setup');
|
59 |
+
}));
|
60 |
+
|
61 |
+
endif;
|
62 |
+
|
63 |
+
$twig->addFilter(new Twig_SimpleFilter('json_decode', function($string) {
|
64 |
+
return json_decode($string, true);
|
|
|
|
|
|
|
65 |
}));
|
66 |
+
|
67 |
return $twig;
|
public/css/admin/admin.css
CHANGED
@@ -146,6 +146,7 @@
|
|
146 |
color: white;
|
147 |
}
|
148 |
|
|
|
149 |
.selectize-control.multi .selectize-input > div[data-value="mouseover"],
|
150 |
.selectize-control.multi .selectize-input > div.active[data-value="mouseover"] {
|
151 |
background: #DE4B42;
|
@@ -200,15 +201,14 @@
|
|
200 |
}
|
201 |
|
202 |
.draggable {
|
203 |
-
border: 1px solid #DADADA;
|
204 |
border-radius: 2px;
|
205 |
background: #EFEFEF;
|
206 |
padding: 10px 0;
|
207 |
-
margin: 0;
|
208 |
cursor: move;
|
209 |
-
font-weight: bold;
|
210 |
padding-left: 65px;
|
211 |
box-sizing: border-box;
|
|
|
212 |
}
|
213 |
|
214 |
.draggable input {
|
@@ -232,7 +232,7 @@
|
|
232 |
|
233 |
.menu-order-option-switch.menu-order-option-switch-on,
|
234 |
.order-option-switch.order-option-switch-on {
|
235 |
-
background:
|
236 |
}
|
237 |
|
238 |
.menu-order-option-switch:after,
|
@@ -277,6 +277,10 @@ li.draggable {
|
|
277 |
line-height: 24px;
|
278 |
}
|
279 |
|
|
|
|
|
|
|
|
|
280 |
#upgrade-banner li {
|
281 |
list-style: none;
|
282 |
font-weight: bold;
|
146 |
color: white;
|
147 |
}
|
148 |
|
149 |
+
.selectize-control.multi.keyboard-shortcuts .selectize-input .item,
|
150 |
.selectize-control.multi .selectize-input > div[data-value="mouseover"],
|
151 |
.selectize-control.multi .selectize-input > div.active[data-value="mouseover"] {
|
152 |
background: #DE4B42;
|
201 |
}
|
202 |
|
203 |
.draggable {
|
|
|
204 |
border-radius: 2px;
|
205 |
background: #EFEFEF;
|
206 |
padding: 10px 0;
|
207 |
+
margin: 4px 0;
|
208 |
cursor: move;
|
|
|
209 |
padding-left: 65px;
|
210 |
box-sizing: border-box;
|
211 |
+
border: 1px solid #ccc;
|
212 |
}
|
213 |
|
214 |
.draggable input {
|
232 |
|
233 |
.menu-order-option-switch.menu-order-option-switch-on,
|
234 |
.order-option-switch.order-option-switch-on {
|
235 |
+
background: #5cb85c;
|
236 |
}
|
237 |
|
238 |
.menu-order-option-switch:after,
|
277 |
line-height: 24px;
|
278 |
}
|
279 |
|
280 |
+
#upgrade-banner .glyphicon {
|
281 |
+
margin-right: 5px;
|
282 |
+
}
|
283 |
+
|
284 |
#upgrade-banner li {
|
285 |
list-style: none;
|
286 |
font-weight: bold;
|
public/css/app.css.twig
CHANGED
@@ -194,6 +194,10 @@ button#responsive-menu-button,
|
|
194 |
vertical-align: middle;
|
195 |
}
|
196 |
|
|
|
|
|
|
|
|
|
197 |
.responsive-menu-accessible {
|
198 |
display: inline-block;
|
199 |
}
|
194 |
vertical-align: middle;
|
195 |
}
|
196 |
|
197 |
+
.responsive-menu-label .responsive-menu-button-text-open {
|
198 |
+
display: none;
|
199 |
+
}
|
200 |
+
|
201 |
.responsive-menu-accessible {
|
202 |
display: inline-block;
|
203 |
}
|
public/js/admin/admin.js
CHANGED
@@ -130,4 +130,38 @@ jQuery(function($) {
|
|
130 |
]
|
131 |
});
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
});
|
130 |
]
|
131 |
});
|
132 |
|
133 |
+
$('.keyboard-shortcuts').selectize({
|
134 |
+
plugins: ['remove_button'],
|
135 |
+
options: [
|
136 |
+
{
|
137 |
+
value:27,
|
138 |
+
text:'Esc'
|
139 |
+
},
|
140 |
+
{
|
141 |
+
value:13,
|
142 |
+
text:'Enter'
|
143 |
+
},
|
144 |
+
{
|
145 |
+
value:32,
|
146 |
+
text:'Space'
|
147 |
+
},
|
148 |
+
{
|
149 |
+
value:37,
|
150 |
+
text:'Left'
|
151 |
+
},
|
152 |
+
{
|
153 |
+
value:38,
|
154 |
+
text:'Up'
|
155 |
+
},
|
156 |
+
{
|
157 |
+
value:39,
|
158 |
+
text:'Right'
|
159 |
+
},
|
160 |
+
{
|
161 |
+
value:40,
|
162 |
+
text:'Down'
|
163 |
+
}
|
164 |
+
]
|
165 |
+
});
|
166 |
+
|
167 |
});
|
public/js/app.js.twig
CHANGED
@@ -26,6 +26,7 @@ jQuery(document).ready(function($) {
|
|
26 |
$('html').addClass(this.openClass);
|
27 |
$('.responsive-menu-button-icon-active').hide();
|
28 |
$('.responsive-menu-button-icon-inactive').show();
|
|
|
29 |
this.setWrapperTranslate();
|
30 |
this.isOpen = true;
|
31 |
},
|
@@ -34,9 +35,22 @@ jQuery(document).ready(function($) {
|
|
34 |
$('html').removeClass(this.openClass);
|
35 |
$('.responsive-menu-button-icon-inactive').hide();
|
36 |
$('.responsive-menu-button-icon-active').show();
|
|
|
37 |
this.clearWrapperTranslate();
|
38 |
this.isOpen = false;
|
39 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
triggerMenu: function() {
|
41 |
this.isOpen ? this.closeMenu() : this.openMenu();
|
42 |
},
|
26 |
$('html').addClass(this.openClass);
|
27 |
$('.responsive-menu-button-icon-active').hide();
|
28 |
$('.responsive-menu-button-icon-inactive').show();
|
29 |
+
this.setButtonTextOpen();
|
30 |
this.setWrapperTranslate();
|
31 |
this.isOpen = true;
|
32 |
},
|
35 |
$('html').removeClass(this.openClass);
|
36 |
$('.responsive-menu-button-icon-inactive').hide();
|
37 |
$('.responsive-menu-button-icon-active').show();
|
38 |
+
this.setButtonText();
|
39 |
this.clearWrapperTranslate();
|
40 |
this.isOpen = false;
|
41 |
},
|
42 |
+
setButtonText: function() {
|
43 |
+
if($('.responsive-menu-button-text-open').length > 0 && $('.responsive-menu-button-text').length > 0) {
|
44 |
+
$('.responsive-menu-button-text-open').hide();
|
45 |
+
$('.responsive-menu-button-text').show();
|
46 |
+
}
|
47 |
+
},
|
48 |
+
setButtonTextOpen: function() {
|
49 |
+
if($('.responsive-menu-button-text').length > 0 && $('.responsive-menu-button-text-open').length > 0) {
|
50 |
+
$('.responsive-menu-button-text').hide();
|
51 |
+
$('.responsive-menu-button-text-open').show();
|
52 |
+
}
|
53 |
+
},
|
54 |
triggerMenu: function() {
|
55 |
this.isOpen ? this.closeMenu() : this.openMenu();
|
56 |
},
|
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, hamburger menu, hamburger, mobile, tablet, 3 lines, 3 line, three line, three lines
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 3.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -111,6 +111,18 @@ To view our FAQ, please go to <a href="https://responsive.menu/faq">https://resp
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
= 3.1.4 (10th June 2017) =
|
115 |
* **Requires PHP 5.4**
|
116 |
* Added CSRF protection using nonces in admin
|
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.8
|
7 |
+
Stable tag: 3.1.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 3.1.5 (22nd July 2017) =
|
115 |
+
* **Requires PHP 5.4**
|
116 |
+
* Added ability to use description in menu items
|
117 |
+
* Added option for button open title
|
118 |
+
* Added ability to have the menu automatically opened on page load - Pro Only
|
119 |
+
* Added ability to use keyboard shortcuts to close the menu - Pro Only
|
120 |
+
* Added ability to use keyboard shortcuts to open the menu - Pro Only
|
121 |
+
* Added ability to disable plugins FontAwesome and BootStrap scripts in case you want to load your own - Pro Only
|
122 |
+
* Improve selection of menu items by menu item drop-down selection rather than by ID - Pro Only
|
123 |
+
* Fixed bug with 3Dx animation and hover colours - Pro Only
|
124 |
+
* Optimised twig imports to only include what is needed.
|
125 |
+
|
126 |
= 3.1.4 (10th June 2017) =
|
127 |
* **Requires PHP 5.4**
|
128 |
* Added CSRF protection using nonces in admin
|
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.
|
8 |
Author: Peter Featherstone
|
9 |
Text Domain: responsive-menu
|
10 |
Author URI: https://peterfeatherstone.com
|
@@ -21,7 +21,7 @@ function check_responsive_menu_php_version() {
|
|
21 |
}
|
22 |
|
23 |
function responsive_menu_deactivation_text() {
|
24 |
-
echo '<div class="error"><p>' . sprintf(
|
25 |
}
|
26 |
|
27 |
if(version_compare(PHP_VERSION, '5.4', '<'))
|
@@ -33,4 +33,4 @@ include dirname(__FILE__) . '/config/services.php';
|
|
33 |
include dirname(__FILE__) . '/config/wp/scripts.php';
|
34 |
include dirname(__FILE__) . '/config/routing.php';
|
35 |
include dirname(__FILE__) . '/migration.php';
|
36 |
-
include dirname(__FILE__) . '/config/polylang.php';
|
4 |
Plugin Name: Responsive Menu
|
5 |
Plugin URI: https://responsive.menu
|
6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
7 |
+
Version: 3.1.5
|
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('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', '<'))
|
33 |
include dirname(__FILE__) . '/config/wp/scripts.php';
|
34 |
include dirname(__FILE__) . '/config/routing.php';
|
35 |
include dirname(__FILE__) . '/migration.php';
|
36 |
+
include dirname(__FILE__) . '/config/polylang.php';
|
views/admin/banners.html.twig
CHANGED
@@ -1,15 +1,17 @@
|
|
1 |
<div id="upgrade-banner">
|
2 |
<div id="upgrade-banner-title">Upgrade today to unlock the following features:</div>
|
3 |
<ul>
|
4 |
-
<li><
|
5 |
-
<li><
|
6 |
-
<li><
|
7 |
-
<li><
|
8 |
-
<li><
|
9 |
-
<li><
|
|
|
|
|
10 |
<li>And much more</li>
|
11 |
</ul>
|
12 |
-
<a target="_blank" href="https://responsive.menu/
|
13 |
</div>
|
14 |
|
15 |
<div id="docs-banner">
|
@@ -18,7 +20,7 @@
|
|
18 |
</div>
|
19 |
|
20 |
<div class="key-container">
|
21 |
-
<a href="https://responsive.menu/
|
22 |
<div class="key key-pro"><span>PRO</span>Only available in Pro version</div>
|
23 |
<div class="key key-semi-pro"><span>SEMI PRO</span>Fully unlocked in Pro version</div>
|
24 |
</a>
|
1 |
<div id="upgrade-banner">
|
2 |
<div id="upgrade-banner-title">Upgrade today to unlock the following features:</div>
|
3 |
<ul>
|
4 |
+
<li><span class="glyphicon glyphicon-star"></span>Font Awesome Icon Support</li>
|
5 |
+
<li><span class="glyphicon glyphicon-star"></span>Opacity Option for all Colours</li>
|
6 |
+
<li><span class="glyphicon glyphicon-star"></span>15+ Button Animations</li>
|
7 |
+
<li><span class="glyphicon glyphicon-star"></span>Create a Desktop Menu and style</li>
|
8 |
+
<li><span class="glyphicon glyphicon-star"></span>Create a Header Bar and style</li>
|
9 |
+
<li><span class="glyphicon glyphicon-star"></span>Keyboard shortcuts</li>
|
10 |
+
<li><span class="glyphicon glyphicon-star"></span>Auto-show menu on page load</li>
|
11 |
+
<li><span class="glyphicon glyphicon-star"></span>Preview Changes</li>
|
12 |
<li>And much more</li>
|
13 |
</ul>
|
14 |
+
<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>
|
15 |
</div>
|
16 |
|
17 |
<div id="docs-banner">
|
20 |
</div>
|
21 |
|
22 |
<div class="key-container">
|
23 |
+
<a href="https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=keys&utm_campaign=free-plugin-keys" target="_blank">
|
24 |
<div class="key key-pro"><span>PRO</span>Only available in Pro version</div>
|
25 |
<div class="key key-semi-pro"><span>SEMI PRO</span>Fully unlocked in Pro version</div>
|
26 |
</a>
|
views/admin/macros.html.twig
CHANGED
@@ -126,7 +126,7 @@
|
|
126 |
<td{% if pro %} class='{{ pro }}'{% endif %}>
|
127 |
{% if pro == 'pro' %}
|
128 |
<div class='responsive-menu-pro-overlay'>
|
129 |
-
<a href='https://responsive.menu/
|
130 |
target='_blank'>Click to upgrade now to use</a>
|
131 |
</div>
|
132 |
{% endif %}
|
@@ -146,7 +146,7 @@
|
|
146 |
{% elseif type == 'textarea' %}
|
147 |
{{ macros.textarea(name, options[name], class) }}
|
148 |
{% elseif type == 'selectize' %}
|
149 |
-
{{ macros.selectize(name, options[name]) }}
|
150 |
{% elseif type == 'select' %}
|
151 |
{% if select_type == 'side' %}
|
152 |
{% set choices = {
|
126 |
<td{% if pro %} class='{{ pro }}'{% endif %}>
|
127 |
{% if pro == 'pro' %}
|
128 |
<div class='responsive-menu-pro-overlay'>
|
129 |
+
<a href='https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade'
|
130 |
target='_blank'>Click to upgrade now to use</a>
|
131 |
</div>
|
132 |
{% endif %}
|
146 |
{% elseif type == 'textarea' %}
|
147 |
{{ macros.textarea(name, options[name], class) }}
|
148 |
{% elseif type == 'selectize' %}
|
149 |
+
{{ macros.selectize(name, options[name], class) }}
|
150 |
{% elseif type == 'select' %}
|
151 |
{% if select_type == 'side' %}
|
152 |
{% set choices = {
|
views/admin/sections/button.html.twig
CHANGED
@@ -59,6 +59,7 @@
|
|
59 |
<div class='panel-body'>Title<small>Button</small></div>
|
60 |
<table class='table table-bordered table-hover'>
|
61 |
{{ macros.row('button_title', 'Text', 'input', options, errors) }}
|
|
|
62 |
{{ macros.row('button_text_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
63 |
{{ macros.row('button_title_position', 'Alignment', 'select', options, errors, '', '', 'side') }}
|
64 |
{{ macros.row('button_font', 'Font', 'input', options, errors) }}
|
59 |
<div class='panel-body'>Title<small>Button</small></div>
|
60 |
<table class='table table-bordered table-hover'>
|
61 |
{{ macros.row('button_title', 'Text', 'input', options, errors) }}
|
62 |
+
{{ macros.row('button_title_open', 'Opened Text', 'input', options, errors) }}
|
63 |
{{ macros.row('button_text_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
64 |
{{ macros.row('button_title_position', 'Alignment', 'select', options, errors, '', '', 'side') }}
|
65 |
{{ macros.row('button_font', 'Font', 'input', options, errors) }}
|
views/admin/sections/header-bar.html.twig
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
</td>
|
20 |
<td class='pro'>
|
21 |
<div class='responsive-menu-pro-overlay'>
|
22 |
-
<a href='https://responsive.menu/
|
23 |
target='_blank'>Click to upgrade now to use</a>
|
24 |
</div>
|
25 |
<ul id='header-bar-sortable'>
|
19 |
</td>
|
20 |
<td class='pro'>
|
21 |
<div class='responsive-menu-pro-overlay'>
|
22 |
+
<a href='https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade'
|
23 |
target='_blank'>Click to upgrade now to use</a>
|
24 |
</div>
|
25 |
<ul id='header-bar-sortable'>
|
views/admin/sections/initial-setup.html.twig
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
<small>Initial Setup</small>
|
8 |
</div>
|
9 |
<table class="table table-bordered table-hover">
|
10 |
-
{{ macros.row('breakpoint', 'Breakpoint', 'input', options, errors, '', '', '', '', 'This is the width of the screen at which point you would like the menu to start showing
|
11 |
{{ macros.row('menu_to_use', 'Menu to Use', 'select', options, errors, '', '', 'custom', '', 'If no options appear here, make sure you have set them up under <strong>Appearance > Menus</strong> or click <a href="' ~ admin_url ~ 'nav-menus.php">here</a>.', '', nav_menus, 'Please note that the <a class="scroll-to-option" href="#responsive-menu-theme-location-menu">Theme Location</a> option will take precedence over this.') }}
|
12 |
{{ macros.row('menu_to_hide', 'CSS Selector of Menu to Hide', 'input', options, errors, '', '', '', '', 'Any legal CSS selection criteria is valid here.', '', '', 'e.g: #nav-menu, nav, .other-nav') }}
|
13 |
</table>
|
7 |
<small>Initial Setup</small>
|
8 |
</div>
|
9 |
<table class="table table-bordered table-hover">
|
10 |
+
{{ macros.row('breakpoint', 'Breakpoint', 'input', options, errors, '', '', '', '', 'This is the width of the screen in pixels at which point you would like the menu to start showing.', 'px', '', 'Set to 80000 if you want the menu to appear on all devices.') }}
|
11 |
{{ macros.row('menu_to_use', 'Menu to Use', 'select', options, errors, '', '', 'custom', '', 'If no options appear here, make sure you have set them up under <strong>Appearance > Menus</strong> or click <a href="' ~ admin_url ~ 'nav-menus.php">here</a>.', '', nav_menus, 'Please note that the <a class="scroll-to-option" href="#responsive-menu-theme-location-menu">Theme Location</a> option will take precedence over this.') }}
|
12 |
{{ macros.row('menu_to_hide', 'CSS Selector of Menu to Hide', 'input', options, errors, '', '', '', '', 'Any legal CSS selection criteria is valid here.', '', '', 'e.g: #nav-menu, nav, .other-nav') }}
|
13 |
</table>
|
views/admin/sections/menu.html.twig
CHANGED
@@ -62,19 +62,25 @@
|
|
62 |
</td>
|
63 |
<td class='pro'>
|
64 |
<div class='responsive-menu-pro-overlay'>
|
65 |
-
<a href='https://responsive.menu/
|
66 |
target='_blank'>Click to upgrade now to use</a>
|
67 |
</div>
|
68 |
<table id='font-icon-container'>
|
69 |
<tr>
|
70 |
-
<td>Menu Item
|
71 |
-
<td>Icon</td>
|
72 |
-
<td>Type</td>
|
73 |
<td></td>
|
74 |
</tr>
|
75 |
<tr>
|
76 |
-
<td
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
<td>
|
79 |
<select class='selectpicker show-tick' name='menu[menu_font_icons][type][]'>
|
80 |
<option value='font-awesome' selected='selected'>FontAwesome</option>
|
@@ -194,6 +200,14 @@
|
|
194 |
</table>
|
195 |
</div>
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
<div class='panel panel-default'>
|
198 |
<div class='panel-body'>Page Overlay<small>Menu</small></div>
|
199 |
<table class='table table-bordered table-hover'>
|
@@ -218,7 +232,8 @@
|
|
218 |
<div class='panel panel-default'>
|
219 |
<div class='panel-body'>Advanced<small>Menu</small></div>
|
220 |
<table class='table table-bordered table-hover'>
|
221 |
-
{{ macros.row('menu_disable_scrolling', 'Disable Background Scrolling', 'checkbox', options, errors, '', 'pro') }}
|
|
|
222 |
{{ macros.row('theme_location_menu', 'Theme Location Menu', 'select', options, errors, '', '', 'custom', '', '', '', location_menus, 'Please note that this will overwrite the <a class="scroll-to-option" href="#responsive-menu-menu-to-use">Menu to Use</a> option.') }}
|
223 |
</table>
|
224 |
</div>
|
62 |
</td>
|
63 |
<td class='pro'>
|
64 |
<div class='responsive-menu-pro-overlay'>
|
65 |
+
<a href='https://responsive.menu/pricing/?utm_source=free-plugin&utm_medium=option&utm_campaign=free-plugin-option-upgrade'
|
66 |
target='_blank'>Click to upgrade now to use</a>
|
67 |
</div>
|
68 |
<table id='font-icon-container'>
|
69 |
<tr>
|
70 |
+
<td style="width: 400px;">Menu Item</td>
|
71 |
+
<td style="width: 200px;">Icon</td>
|
72 |
+
<td style="width: 250px;">Type</td>
|
73 |
<td></td>
|
74 |
</tr>
|
75 |
<tr>
|
76 |
+
<td>
|
77 |
+
<select class='selectpicker show-tick' name='menu[menu_font_icons][id][]'>
|
78 |
+
<option value="">Select Menu Item</option>
|
79 |
+
</select>
|
80 |
+
</td>
|
81 |
+
<td>
|
82 |
+
<input type='text' class='form-control' name='menu[menu_font_icons][icon][]' placeholder='cog' />
|
83 |
+
</td>
|
84 |
<td>
|
85 |
<select class='selectpicker show-tick' name='menu[menu_font_icons][type][]'>
|
86 |
<option value='font-awesome' selected='selected'>FontAwesome</option>
|
200 |
</table>
|
201 |
</div>
|
202 |
|
203 |
+
<div class='panel panel-default'>
|
204 |
+
<div class='panel-body'>Keyboard Shortcuts<small>Menu</small></div>
|
205 |
+
<table class='table table-bordered table-hover'>
|
206 |
+
{{ macros.row('keyboard_shortcut_close_menu', 'Close Menu', 'selectize', options, errors, 'keyboard-shortcuts', 'pro') }}
|
207 |
+
{{ macros.row('keyboard_shortcut_open_menu', 'Open Menu', 'selectize', options, errors, 'keyboard-shortcuts', 'pro') }}
|
208 |
+
</table>
|
209 |
+
</div>
|
210 |
+
|
211 |
<div class='panel panel-default'>
|
212 |
<div class='panel-body'>Page Overlay<small>Menu</small></div>
|
213 |
<table class='table table-bordered table-hover'>
|
232 |
<div class='panel panel-default'>
|
233 |
<div class='panel-body'>Advanced<small>Menu</small></div>
|
234 |
<table class='table table-bordered table-hover'>
|
235 |
+
{{ macros.row('menu_disable_scrolling', 'Disable Background Scrolling', 'checkbox', options, errors, '', 'pro', '', '', 'Please ensure your theme follows WordPress theme development guidelines for this to work. Specifically that the html tag includes the language_attributes() function call.') }}
|
236 |
+
{{ macros.row('show_menu_on_page_load', 'Show Menu on Page Load', 'checkbox', options, errors, '', 'pro') }}
|
237 |
{{ macros.row('theme_location_menu', 'Theme Location Menu', 'select', options, errors, '', '', 'custom', '', '', '', location_menus, 'Please note that this will overwrite the <a class="scroll-to-option" href="#responsive-menu-menu-to-use">Menu to Use</a> option.') }}
|
238 |
</table>
|
239 |
</div>
|
views/admin/sections/technical.html.twig
CHANGED
@@ -6,6 +6,8 @@
|
|
6 |
{{ macros.row('external_files', 'Use external files?', 'checkbox', options, errors, '', '', '', '', 'This will create external files for CSS and JavaScript') }}
|
7 |
{{ macros.row('minify_scripts', 'Minify scripts?', 'checkbox', options, errors, '', '', '', '', 'This will minify the CSS and JavaScript output') }}
|
8 |
{{ macros.row('scripts_in_footer', 'Place scripts in footer?', 'checkbox', options, errors, '', '', '', '', 'This will place the JavaScript in the footer') }}
|
|
|
|
|
9 |
</table>
|
10 |
</div>
|
11 |
|
6 |
{{ macros.row('external_files', 'Use external files?', 'checkbox', options, errors, '', '', '', '', 'This will create external files for CSS and JavaScript') }}
|
7 |
{{ macros.row('minify_scripts', 'Minify scripts?', 'checkbox', options, errors, '', '', '', '', 'This will minify the CSS and JavaScript output') }}
|
8 |
{{ macros.row('scripts_in_footer', 'Place scripts in footer?', 'checkbox', options, errors, '', '', '', '', 'This will place the JavaScript in the footer') }}
|
9 |
+
{{ macros.row('remove_fontawesome', 'Remove FontAwesome scripts', 'checkbox', options, errors, '', 'pro', '', '', 'This will stop the plugins FontAwesome scripts from being loaded. Useful if you want to run your own FontAwesome version or already have it installed.') }}
|
10 |
+
{{ macros.row('remove_bootstrap', 'Remove BootStrap scripts', 'checkbox', options, errors, '', 'pro', '', '', 'This will stop the plugins BootStrap scripts from being loaded. Useful if you want to run your own BootStrap version for GlyphIcons or already have it installed.') }}
|
11 |
</table>
|
12 |
</div>
|
13 |
|
views/admin/tabs.html.twig
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<ul class='nav nav-tabs'>
|
2 |
<li{% if current_page() == 'initial-setup' %} class='active'{% endif %} id="initial-setup-tab"><a data-toggle='tab' href='#initial-setup'>Initial Setup <span class='badge'>3</span></a></li>
|
3 |
-
<li{% if current_page() == 'menu' %} class='active'{% endif %} id="menu-tab"><a data-toggle='tab' href='#menu'>Menu <span class='badge'>
|
4 |
-
<li{% if current_page() == 'button' %} class='active'{% endif %} id="button-tab"><a data-toggle='tab' href='#button'>Button <span class='badge'>
|
5 |
<li{% if current_page() == 'sub-menus' %} class='active'{% endif %} id="sub-menus-tab"><a data-toggle='tab' href='#sub-menus'>Sub Menus <span class='badge'>33</span></a></li>
|
6 |
-
<li{% if current_page() == 'technical' %} class='active'{% endif %} id="technical-tab"><a data-toggle='tab' href='#technical'>Technical <span class='badge'>
|
7 |
<li{% if current_page() == 'import-export' %} class='active'{% endif %} id="import-export-tabZz"><a data-toggle='tab' href='#import-export'>Import/Export <span class='badge'>4</span></a></li>
|
8 |
<li{% if current_page() == 'custom-css' %} class='active'{% endif %} id="custom-css-tab"><a data-toggle='tab' href='#custom-css'>Custom CSS <span class='badge progress-bar-danger'>Pro</span></a></li>
|
9 |
<li{% if current_page() == 'header-bar' %} class='active'{% endif %} id="header-bar-tab"><a data-toggle='tab' href='#header-bar'>Header Bar <span class='badge progress-bar-danger'>Pro</span></a></li>
|
1 |
<ul class='nav nav-tabs'>
|
2 |
<li{% if current_page() == 'initial-setup' %} class='active'{% endif %} id="initial-setup-tab"><a data-toggle='tab' href='#initial-setup'>Initial Setup <span class='badge'>3</span></a></li>
|
3 |
+
<li{% if current_page() == 'menu' %} class='active'{% endif %} id="menu-tab"><a data-toggle='tab' href='#menu'>Menu <span class='badge'>60</span></a></li>
|
4 |
+
<li{% if current_page() == 'button' %} class='active'{% endif %} id="button-tab"><a data-toggle='tab' href='#button'>Button <span class='badge'>33</span></a></li>
|
5 |
<li{% if current_page() == 'sub-menus' %} class='active'{% endif %} id="sub-menus-tab"><a data-toggle='tab' href='#sub-menus'>Sub Menus <span class='badge'>33</span></a></li>
|
6 |
+
<li{% if current_page() == 'technical' %} class='active'{% endif %} id="technical-tab"><a data-toggle='tab' href='#technical'>Technical <span class='badge'>10</span></a></li>
|
7 |
<li{% if current_page() == 'import-export' %} class='active'{% endif %} id="import-export-tabZz"><a data-toggle='tab' href='#import-export'>Import/Export <span class='badge'>4</span></a></li>
|
8 |
<li{% if current_page() == 'custom-css' %} class='active'{% endif %} id="custom-css-tab"><a data-toggle='tab' href='#custom-css'>Custom CSS <span class='badge progress-bar-danger'>Pro</span></a></li>
|
9 |
<li{% if current_page() == 'header-bar' %} class='active'{% endif %} id="header-bar-tab"><a data-toggle='tab' href='#header-bar'>Header Bar <span class='badge progress-bar-danger'>Pro</span></a></li>
|
views/app/button.html.twig
CHANGED
@@ -6,7 +6,10 @@
|
|
6 |
|
7 |
{% if options.button_title_position == 'top' or options.button_title_position == 'left' and options.button_title %}
|
8 |
<span class="responsive-menu-label responsive-menu-label-{{ options.button_title_position }}">
|
9 |
-
{{ options.button_title|translate('button_title') }}
|
|
|
|
|
|
|
10 |
</span>
|
11 |
{% endif %}
|
12 |
|
@@ -16,7 +19,10 @@
|
|
16 |
|
17 |
{% if options.button_title_position == 'bottom' or options.button_title_position == 'right' and options.button_title %}
|
18 |
<span class="responsive-menu-label responsive-menu-label-{{ options.button_title_position }}">
|
19 |
-
{{ options.button_title|translate('button_title') }}
|
|
|
|
|
|
|
20 |
</span>
|
21 |
{% endif %}
|
22 |
</button>
|
6 |
|
7 |
{% if options.button_title_position == 'top' or options.button_title_position == 'left' and options.button_title %}
|
8 |
<span class="responsive-menu-label responsive-menu-label-{{ options.button_title_position }}">
|
9 |
+
<span class="responsive-menu-button-text">{{ options.button_title|translate('button_title') }}</span>
|
10 |
+
{% if options.button_title_open %}
|
11 |
+
<span class="responsive-menu-button-text-open">{{ options.button_title_open|translate('button_title_open') }}</span>
|
12 |
+
{% endif %}
|
13 |
</span>
|
14 |
{% endif %}
|
15 |
|
19 |
|
20 |
{% if options.button_title_position == 'bottom' or options.button_title_position == 'right' and options.button_title %}
|
21 |
<span class="responsive-menu-label responsive-menu-label-{{ options.button_title_position }}">
|
22 |
+
<span class="responsive-menu-button-text">{{ options.button_title|translate('button_title') }}</span>
|
23 |
+
{% if options.button_title_open %}
|
24 |
+
<span class="responsive-menu-button-text-open">{{ options.button_title_open|translate('button_title_open') }}</span>
|
25 |
+
{% endif %}
|
26 |
</span>
|
27 |
{% endif %}
|
28 |
</button>
|
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/
|
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/pricing/?utm_source=free-plugin&utm_medium=preview&utm_campaign=free-plugin-preview" target="_blank">here</a> to upgrade today.
|
3 |
</div>
|