Version Description
Download this release
Release Info
Developer | Magnigenie |
Plugin | WP Responsive Menu |
Version | 3.1.2 |
Comparing to | |
See all releases |
Code changes from version 3.1.1 to 3.1.2
- css/wprmenu.css +0 -1
- inc/includes/untitled.php +0 -1067
- inc/wprmclass.php +22 -75
- readme.txt +6 -2
- wp-responsive-menu.php +1 -1
css/wprmenu.css
CHANGED
@@ -36,7 +36,6 @@ html body.wprmenu-body-fixed {
|
|
36 |
}
|
37 |
|
38 |
html body div.wprm-wrapper {
|
39 |
-
overflow: scroll;
|
40 |
z-index: 999999;
|
41 |
width: 100%;
|
42 |
}
|
36 |
}
|
37 |
|
38 |
html body div.wprm-wrapper {
|
|
|
39 |
z-index: 999999;
|
40 |
width: 100%;
|
41 |
}
|
inc/includes/untitled.php
DELETED
@@ -1,1067 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class WP_Responsive_Menu_PRO {
|
3 |
-
|
4 |
-
protected $options = '';
|
5 |
-
|
6 |
-
public $translatables = array(
|
7 |
-
'search_box_text',
|
8 |
-
'bar_title'
|
9 |
-
);
|
10 |
-
|
11 |
-
public function __construct() {
|
12 |
-
add_action( 'admin_notices', array( $this, 'check_wpr_exists' ) );
|
13 |
-
|
14 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'wprm_enque_scripts' ) );
|
15 |
-
|
16 |
-
add_action( 'wp_footer', array( $this, 'wprmenu_menu' ) );
|
17 |
-
|
18 |
-
$this->options = get_option( 'wprmenu_options' );
|
19 |
-
|
20 |
-
add_filter( 'woocommerce_add_to_cart_fragments', array( $this, 'wpr_cart_count_fragments' ), 10, 1 );
|
21 |
-
|
22 |
-
add_action( 'plugins_loaded', array($this, 'wprmenu_init') );
|
23 |
-
|
24 |
-
add_action( 'wpr_optionsframework_after_validate', array( $this, 'save_options_notice' ) );
|
25 |
-
|
26 |
-
add_action( 'wp_ajax_wpr_live_update', array($this, 'wpr_live_update'));
|
27 |
-
|
28 |
-
add_action( 'wp_footer', array($this, 'wpr_custom_css') );
|
29 |
-
|
30 |
-
add_action( 'wp_ajax_wprmenu_import_data', array($this, 'wprmenu_import_data') );
|
31 |
-
|
32 |
-
add_action( 'wp_ajax_wpr_get_transient_from_data', array($this, 'wpr_get_transient_from_data') );
|
33 |
-
|
34 |
-
}
|
35 |
-
|
36 |
-
|
37 |
-
public function option( $option ) {
|
38 |
-
if( isset($_GET['wprmenu']) && $_GET['wprmenu'] !== '' ) {
|
39 |
-
$data = get_option($_GET['wprmenu']);
|
40 |
-
$data = (array)json_decode($data);
|
41 |
-
return $data[$option];
|
42 |
-
}
|
43 |
-
else {
|
44 |
-
if( isset($_COOKIE['wprmenu_live_preview'])
|
45 |
-
&& $_COOKIE['wprmenu_live_preview'] == 'yes' ) {
|
46 |
-
$check_transient = get_transient('wpr_live_settings');
|
47 |
-
|
48 |
-
if( $check_transient ) {
|
49 |
-
if( isset( $check_transient[$option] )
|
50 |
-
&& $check_transient[$option] != '' ) {
|
51 |
-
return $check_transient[$option];
|
52 |
-
}
|
53 |
-
}
|
54 |
-
}
|
55 |
-
else {
|
56 |
-
if( isset( $this->options[$option] ) && $this->options[$option] != '' )
|
57 |
-
return $this->options[$option];
|
58 |
-
return '';
|
59 |
-
}
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
public function save_options_notice() {
|
64 |
-
if( $this->option('wpr_enable_external_css') == 'yes' ) {
|
65 |
-
|
66 |
-
//create folder for plugin in uploads directory
|
67 |
-
$base_dir = wp_upload_dir()['basedir'] . '/wp-responsive-menu-pro';
|
68 |
-
|
69 |
-
if( !wp_mkdir_p($base_dir . '/css') ) {
|
70 |
-
add_settings_error( 'options-framework', 'save_options', __( 'You don\'t have permissions to create CSS data folder - please check permissions.', 'wprmenu' ), 'error fade in' );
|
71 |
-
}
|
72 |
-
|
73 |
-
$css_file = $base_dir . '/css/wp-responsive-menu-pro-' . get_current_blog_id() . '.css';
|
74 |
-
|
75 |
-
$css_data = $this->wpr_inline_css();
|
76 |
-
|
77 |
-
if( $this->option('wpr_enable_minify') == 'yes' ) {
|
78 |
-
$css_data = $this->minify_external_css($css_data);
|
79 |
-
}
|
80 |
-
|
81 |
-
if( !file_put_contents($css_file, $css_data) ) {
|
82 |
-
add_settings_error( 'options-framework', 'save_options', __( 'You don\'t have permissions to write external CSS file - please check permissions.', 'wprmenu' ), 'error fade in' );
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
|
88 |
-
public function wprmenu_register_strings() {
|
89 |
-
if( is_admin() ) :
|
90 |
-
if( function_exists('pll_register_string')) :
|
91 |
-
pll_register_string('search_box_text', $this->option('search_box_text'), 'WP Responsive Menu');
|
92 |
-
pll_register_string('bar_title', $this->option('bar_title'), 'WP Responsive Menu');
|
93 |
-
endif;
|
94 |
-
endif;
|
95 |
-
}
|
96 |
-
|
97 |
-
public function wprmenu_init() {
|
98 |
-
$this->wprmenu_register_strings();
|
99 |
-
$this->wprmenu_run_translate();
|
100 |
-
$this->wprmenu_create_widget();
|
101 |
-
}
|
102 |
-
|
103 |
-
public function wprmenu_run_translate() {
|
104 |
-
foreach($this->translatables as $option_name) {
|
105 |
-
if( null !== $this->option($option_name) ) {
|
106 |
-
do_action('wpml_register_single_string', 'WP Responsive Menu', $option_name, $this->option($option_name));
|
107 |
-
}
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
//minify external css file
|
112 |
-
function minify_external_css($data) {
|
113 |
-
/* remove comments */
|
114 |
-
$minified = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $data);
|
115 |
-
|
116 |
-
/* remove tabs, spaces, newlines, etc. */
|
117 |
-
$minified = str_replace(array("\r\n","\r","\n","\t",' ',' ',' '), '', $minified);
|
118 |
-
|
119 |
-
/* remove other spaces before/after ; */
|
120 |
-
$minified = preg_replace(array('(( )+{)','({( )+)'), '{', $minified);
|
121 |
-
$minified = preg_replace(array('(( )+})','(}( )+)','(;( )*})'), '}', $minified);
|
122 |
-
$minified = preg_replace(array('(;( )+)','(( )+;)'), ';', $minified);
|
123 |
-
|
124 |
-
return $minified;
|
125 |
-
}
|
126 |
-
|
127 |
-
//convert hex color codes into RGB color
|
128 |
-
function hex2rgba($color, $opacity = false) {
|
129 |
-
$default = 'rgb(0,0,0)';
|
130 |
-
|
131 |
-
//Return default if no color provided
|
132 |
-
if ( empty($color) )
|
133 |
-
return $default;
|
134 |
-
|
135 |
-
//Sanitize $color if "#" is provided
|
136 |
-
if ( $color[0] == '#' ) {
|
137 |
-
$color = substr( $color, 1 );
|
138 |
-
}
|
139 |
-
|
140 |
-
//Check if color has 6 or 3 characters and get values
|
141 |
-
if ( strlen($color) == 6 ) {
|
142 |
-
$hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
|
143 |
-
} elseif ( strlen( $color ) == 3 ) {
|
144 |
-
$hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
|
145 |
-
} else {
|
146 |
-
return $default;
|
147 |
-
}
|
148 |
-
|
149 |
-
//Convert hexadec to rgb
|
150 |
-
$rgb = array_map('hexdec', $hex);
|
151 |
-
|
152 |
-
//Check if opacity is set(rgba or rgb)
|
153 |
-
if( $opacity ) {
|
154 |
-
if( abs($opacity) > 1 )
|
155 |
-
$opacity = 1.0;
|
156 |
-
$output = 'rgba('.implode(",",$rgb).','.$opacity.')';
|
157 |
-
} else {
|
158 |
-
$output = 'rgb('.implode(",",$rgb).')';
|
159 |
-
}
|
160 |
-
|
161 |
-
//Return rgb(a) color string
|
162 |
-
return $output;
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
*
|
167 |
-
* Check if responsive menu free version is installed and activated and if not
|
168 |
-
* If free version is installed and activated then show notice to make that disable
|
169 |
-
*
|
170 |
-
*/
|
171 |
-
public function check_wpr_exists() {
|
172 |
-
if( is_plugin_active('wp-responsive-menu/wp-responsive-menu.php') ) {
|
173 |
-
$notice = __('<p>It seems like you are using the free version of <a href="https://wordpress.org/plugins/wp-responsive-menu/" target="_blank">WP Responsive Menu</a>. Make sure to deactivate and remove the free version of the plugin to use the pro version. All your settings of free version will be automatically transferred to pro version.</p>');
|
174 |
-
?>
|
175 |
-
<div id="message" class="error">
|
176 |
-
<?php echo $notice; ?>
|
177 |
-
</div>
|
178 |
-
<?php
|
179 |
-
deactivate_plugins( 'wp-responsive-menu-pro/wp-responsive-menu-pro.php' );
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
*
|
185 |
-
* Generate inline style for responsive menu
|
186 |
-
*
|
187 |
-
* @since 1.0.2
|
188 |
-
* @param blank
|
189 |
-
* @return inline css
|
190 |
-
*/
|
191 |
-
public function wpr_inline_css() {
|
192 |
-
$inlinecss = '';
|
193 |
-
|
194 |
-
if( $this->option('enabled') ) :
|
195 |
-
|
196 |
-
$how_wide = $this->option('how_wide') !='' ? $this->option('how_wide') : '40';
|
197 |
-
$menu_max_width = $this->option('menu_max_width') != '' ? $this->option('menu_max_width') : '';
|
198 |
-
$from_width = $this->option('from_width') != '' ? $this->option('from_width') : '768';
|
199 |
-
$inlinecss .= '@media only screen and ( max-width: '.$from_width.'px ) {';
|
200 |
-
$border_top_color = $this->hex2rgba($this->option("menu_border_top"), $this->option("menu_border_top_opacity"));
|
201 |
-
|
202 |
-
$border_bottom_color = $this->hex2rgba($this->option("menu_border_bottom"), $this->option("menu_border_bottom_opacity"));
|
203 |
-
|
204 |
-
//menu background image
|
205 |
-
if( $this->option('menu_bg') != '' ) :
|
206 |
-
$inlinecss .= 'html body .wprm-wrapper #mg-wprm-wrap {
|
207 |
-
background-image: url( '.$this->option("menu_bg").' ) !important;
|
208 |
-
background-size: '.$this->option("menu_bg_size").' !important;
|
209 |
-
background-repeat: '.$this->option("menu_bg_rep").' !important;
|
210 |
-
}';
|
211 |
-
endif;
|
212 |
-
|
213 |
-
|
214 |
-
if( $this->option('enable_overlay') == '1' ) :
|
215 |
-
$overlay_bg_color = $this->hex2rgba($this->option("menu_bg_overlay_color"), $this->option("menu_background_overlay_opacity"));
|
216 |
-
$inlinecss .= 'html body div.wprm-overlay{ background: '.$overlay_bg_color .' }';
|
217 |
-
endif;
|
218 |
-
|
219 |
-
if( $this->option('menu_icon_type') == 'default' ) :
|
220 |
-
$menu_padding = $this->option("header_menu_height");
|
221 |
-
$menu_padding = intval($menu_padding);
|
222 |
-
|
223 |
-
if( $menu_padding > 50 ) {
|
224 |
-
$menu_padding = $menu_padding - 27;
|
225 |
-
$menu_padding = $menu_padding / 2;
|
226 |
-
$top_position = $menu_padding + 30;
|
227 |
-
|
228 |
-
$inlinecss .= 'html body div#wprmenu_bar {
|
229 |
-
padding-top: '.$menu_padding.'px;
|
230 |
-
padding-bottom: '.$menu_padding.'px;
|
231 |
-
}';
|
232 |
-
|
233 |
-
if( $this->option('menu_type') == 'default' ) {
|
234 |
-
$inlinecss .= '.wprmenu_bar div.wpr_search form {
|
235 |
-
top: '.$top_position.'px;
|
236 |
-
}';
|
237 |
-
}
|
238 |
-
}
|
239 |
-
|
240 |
-
$inlinecss .= 'html body div#wprmenu_bar {
|
241 |
-
height : '.$this->option("header_menu_height").'px;
|
242 |
-
}';
|
243 |
-
endif;
|
244 |
-
|
245 |
-
if( $this->option('menu_type') == 'default' ) :
|
246 |
-
$inlinecss .= '#mg-wprm-wrap.cbp-spmenu-left, #mg-wprm-wrap.cbp-spmenu-right, #mg-widgetmenu-wrap.cbp-spmenu-widget-left, #mg-widgetmenu-wrap.cbp-spmenu-widget-right {
|
247 |
-
top: '.$this->option("header_menu_height").'px !important;
|
248 |
-
}';
|
249 |
-
endif;
|
250 |
-
|
251 |
-
if( $this->option('fullwidth_menu_container') == '1' ) :
|
252 |
-
$inlinecss .= 'html body #mg-wprm-wrap.cbp-spmenu-left, html body #mg-wprm-wrap.cbp-spmenu-right, html body #mg-widgetmenu-wrap.cbp-spmenu-widget-left, html body #mg-widgetmenu-wrap.cbp-spmenu-widget-right {
|
253 |
-
top: 0px !important;
|
254 |
-
z-index: 9999999 !important;
|
255 |
-
}';
|
256 |
-
|
257 |
-
$inlinecss .= 'html body.admin-bar #mg-wprm-wrap.cbp-spmenu-left, html body.admin-bar #mg-wprm-wrap.cbp-spmenu-right, html body.admin-bar #mg-widgetmenu-wrap.cbp-spmenu-widget-left, html body.admin-bar #mg-widgetmenu-wrap.cbp-spmenu-widget-right {
|
258 |
-
top: 46px !important;
|
259 |
-
z-index: 9999999 !important;
|
260 |
-
}';
|
261 |
-
|
262 |
-
endif;
|
263 |
-
|
264 |
-
|
265 |
-
if( $this->option('menu_border_bottom_show') == 'yes' ) :
|
266 |
-
$inlinecss .= '
|
267 |
-
#mg-wprm-wrap ul li {
|
268 |
-
border-top: solid 1px '.$border_top_color.';
|
269 |
-
border-bottom: solid 1px '.$border_bottom_color.';
|
270 |
-
}';
|
271 |
-
endif;
|
272 |
-
|
273 |
-
if( $this->option('submenu_alignment') == 'right' ):
|
274 |
-
$inlinecss .= '
|
275 |
-
#mg-wprm-wrap li.menu-item-has-children ul.sub-menu li a {
|
276 |
-
text-align: right;
|
277 |
-
margin-right: 44px;
|
278 |
-
}';
|
279 |
-
endif;
|
280 |
-
|
281 |
-
if( $this->option('submenu_alignment') == 'center' ):
|
282 |
-
$inlinecss .= '
|
283 |
-
#mg-wprm-wrap li.menu-item-has-children ul.sub-menu li a {
|
284 |
-
text-align: center;
|
285 |
-
}';
|
286 |
-
endif;
|
287 |
-
|
288 |
-
if( $this->option('menu_bar_bg') != '' ) :
|
289 |
-
$inlinecss .= '
|
290 |
-
#wprmenu_bar {
|
291 |
-
background-image: url( '.$this->option("menu_bar_bg").' ) !important;
|
292 |
-
background-size: '.$this->option("menu_bar_bg_size").' !important;
|
293 |
-
background-repeat: '.$this->option("menu_bar_bg_rep").' !important;
|
294 |
-
}';
|
295 |
-
endif;
|
296 |
-
|
297 |
-
$inlinecss .= '
|
298 |
-
#wprmenu_bar { background-color: '.$this->option('bar_bgd').'; }
|
299 |
-
html body div#mg-wprm-wrap .wpr_submit .icon.icon-search {
|
300 |
-
color: '.$this->option("search_icon_color").';
|
301 |
-
}
|
302 |
-
#wprmenu_bar .menu_title, #wprmenu_bar .menu_title a, #wprmenu_bar .wprmenu_icon_menu, #wprmenu_bar .wprmenu_icon_menu a {
|
303 |
-
color: '.$this->option("bar_color").';
|
304 |
-
}
|
305 |
-
#wprmenu_bar .menu_title, #wprmenu_bar .menu_title a {
|
306 |
-
font-size: '.$this->option('menu_title_size').'px;
|
307 |
-
font-weight: '.$this->option('menu_title_weight').';
|
308 |
-
}
|
309 |
-
#mg-wprm-wrap li.menu-item a {
|
310 |
-
font-size: '.$this->option('menu_font_size').'px;
|
311 |
-
text-transform: '.$this->option('menu_font_text_type').';
|
312 |
-
font-weight: '.$this->option('menu_font_weight').';
|
313 |
-
}
|
314 |
-
#mg-wprm-wrap li.menu-item-has-children ul.sub-menu a {
|
315 |
-
font-size: '.$this->option('sub_menu_font_size').'px;
|
316 |
-
text-transform: '.$this->option('sub_menu_font_text_type').';
|
317 |
-
font-weight: '.$this->option('sub_menu_font_weight').';
|
318 |
-
}
|
319 |
-
#mg-wprm-wrap li.current-menu-item > a {
|
320 |
-
color: '.$this->option('active_menu_color').';
|
321 |
-
background: '.$this->option('active_menu_bg_color').';
|
322 |
-
}
|
323 |
-
#mg-wprm-wrap, div.wpr_search form {
|
324 |
-
background-color: '.$this->option("menu_bgd").';
|
325 |
-
}
|
326 |
-
#mg-wprm-wrap, #mg-widgetmenu-wrap {
|
327 |
-
width: '.$how_wide.'%;
|
328 |
-
max-width: '.$menu_max_width.'px;
|
329 |
-
}
|
330 |
-
#mg-wprm-wrap ul#wprmenu_menu_ul li.menu-item a,
|
331 |
-
div#mg-wprm-wrap ul li span.wprmenu_icon, div#mg-wprm-wrap ul li, div#mg-wprm-wrap ul * {
|
332 |
-
color: '.$this->option("menu_color").';
|
333 |
-
}
|
334 |
-
#mg-wprm-wrap ul#wprmenu_menu_ul li.menu-item a:hover {
|
335 |
-
background: '.$this->option("menu_textovrbgd").'!important;
|
336 |
-
color: '.$this->option("menu_color_hover").';
|
337 |
-
}
|
338 |
-
div#mg-wprm-wrap ul>li:hover>span.wprmenu_icon {
|
339 |
-
color: '.$this->option("menu_color_hover").';
|
340 |
-
}
|
341 |
-
|
342 |
-
.fullwidth-menu.hamburger .hamburger-inner, .fullwidth-menu.hamburger .hamburger-inner::before, .fullwidth-menu.hamburger .hamburger-inner::after { background: '.$this->option("menu_icon_color").'; }
|
343 |
-
|
344 |
-
.wprmenu_bar .hamburger-inner, .wprmenu_bar .hamburger-inner::before, .wprmenu_bar .hamburger-inner::after { background: '.$this->option("menu_icon_color").'; }
|
345 |
-
|
346 |
-
.fullwidth-menu.hamburger:hover .hamburger-inner, .fullwidth-menu.hamburger:hover .hamburger-inner::before,
|
347 |
-
.fullwidth-menu.hamburger:hover .hamburger-inner::after {
|
348 |
-
background: '.$this->option("menu_icon_hover_color").';
|
349 |
-
};
|
350 |
-
|
351 |
-
.wprmenu_bar .hamburger:hover .hamburger-inner, .wprmenu_bar .hamburger:hover .hamburger-inner::before,
|
352 |
-
.wprmenu_bar .hamburger:hover .hamburger-inner::after {
|
353 |
-
background: '.$this->option("menu_icon_hover_color").';
|
354 |
-
}';
|
355 |
-
|
356 |
-
if( $this->option("menu_symbol_pos") == 'right' ) :
|
357 |
-
$inlinecss .= '
|
358 |
-
html body .wprmenu_bar .hamburger {
|
359 |
-
float: '.$this->option("menu_symbol_pos").'!important;
|
360 |
-
}
|
361 |
-
.wprmenu_bar #custom_menu_icon.hamburger, .wprmenu_bar.custMenu .wpr-custom-menu {
|
362 |
-
top: '.$this->option("custom_menu_top").'px;
|
363 |
-
right: '.$this->option("custom_menu_left").'px;
|
364 |
-
float: right !important;
|
365 |
-
background-color: '.$this->option("custom_menu_bg_color").' !important;
|
366 |
-
}';
|
367 |
-
endif;
|
368 |
-
|
369 |
-
if( $this->option("menu_symbol_pos") == 'left' ) :
|
370 |
-
$inlinecss .= '
|
371 |
-
.wprmenu_bar .hamburger {
|
372 |
-
float: '.$this->option("menu_symbol_pos").'!important;
|
373 |
-
}
|
374 |
-
.wprmenu_bar #custom_menu_icon.hamburger, .wprmenu_bar.custMenu .wpr-custom-menu {
|
375 |
-
top: '.$this->option("custom_menu_top").'px;
|
376 |
-
left: '.$this->option("custom_menu_left").'px;
|
377 |
-
float: '.$this->option("menu_symbol_pos").'!important;
|
378 |
-
background-color: '.$this->option("custom_menu_bg_color").' !important;
|
379 |
-
}
|
380 |
-
';
|
381 |
-
endif;
|
382 |
-
|
383 |
-
if( $this->option('google_font_type') != '' && $this->option('google_font_type') == 'standard' ) :
|
384 |
-
$inlinecss .= 'body #mg-wprm-wrap *,#wprmenu_bar .menu_title,#wprmenu_bar input, html body body #mg-wprm-wrap a:not(i) {font-family: '.$this->option('google_font_family').' }';
|
385 |
-
endif;
|
386 |
-
|
387 |
-
if( $this->option('google_font_type') != '' && $this->option('google_font_type') == 'web_fonts' ) {
|
388 |
-
$font = str_replace('+', ' ', $this->option('google_web_font_family') );
|
389 |
-
$inlinecss .= 'body #mg-wprm-wrap *,#wprmenu_bar .menu_title,#wprmenu_bar input, html body body #mg-wprm-wrap a:not(::i) {font-family: '.$font.' }';
|
390 |
-
}
|
391 |
-
|
392 |
-
if( $this->option('hide') != '' ):
|
393 |
-
$inlinecss .= $this->option('hide').'{ display:none!important; }';
|
394 |
-
endif;
|
395 |
-
|
396 |
-
if( $this->option("menu_type") == 'default' ) :
|
397 |
-
$inlinecss .= 'html { padding-top: 42px!important; }';
|
398 |
-
endif;
|
399 |
-
|
400 |
-
$inlinecss .= '#wprmenu_bar,.wprmenu_bar.custMenu .wpr-custom-menu { display: block!important; }
|
401 |
-
div#wpadminbar { position: fixed; }';
|
402 |
-
|
403 |
-
endif;
|
404 |
-
|
405 |
-
$inlinecss .= 'div#mg-wprm-wrap .wpr_social_icons > a { color: '.$this->option('social_icon_color').' !important}';
|
406 |
-
$inlinecss .= 'div#mg-wprm-wrap .wpr_social_icons > a:hover { color: '.$this->option('social_icon_hover_color').' !important}';
|
407 |
-
$inlinecss .= '#wprmenu_bar .menu-elements.search-icon .toggle-search i { color: '.$this->option('search_icon_color').' !important}';
|
408 |
-
$inlinecss .= '#wprmenu_bar .wpr-custom-menu {float: '.$this->option('menu_symbol_pos').';}';
|
409 |
-
|
410 |
-
$inlinecss .= '.wprmenu_bar .wpr-custom-menu i { font-size: '.$this->option('custom_menu_font_size').'px !important; top: '.$this->option('custom_menu_icon_top').'px !important; color: '.$this->option('menu_icon_color').'}';
|
411 |
-
|
412 |
-
$inlinecss .= '.wprmenu_bar .wpr-widget-menu i { font-size: '.$this->option('widget_menu_font_size').'px !important; top: '.$this->option('widget_menu_top_position').'px !important;}';
|
413 |
-
|
414 |
-
$inlinecss .= '.wprmenu_bar .wpr-widget-menu i.wpr_widget_menu_open {color: '.$this->option('widget_menu_icon_color').'!important;}';
|
415 |
-
|
416 |
-
$inlinecss .= '.wprmenu_bar .wpr-widget-menu i.wpr_widget_menu_close {color: '.$this->option('widget_menu_icon_active_color').'!important;}';
|
417 |
-
|
418 |
-
$inlinecss .= 'div.wprm-wrapper #mg-widgetmenu-wrap {background-color: '.$this->option('widget_menu_bg_color').'!important;}';
|
419 |
-
|
420 |
-
$inlinecss .= 'div.wprm-wrapper #mg-widgetmenu-wrap * {color: '.$this->option('widget_menu_text_color').'!important;}';
|
421 |
-
|
422 |
-
$inlinecss .= '#mg-wprm-wrap div.wpr_social_icons i {font-size: '.$this->option('social_icon_font_size').'px !important}';
|
423 |
-
|
424 |
-
if( $this->woocommerce_installed() && $this->option('woocommerce_integration') == 'yes' ){
|
425 |
-
$inlinecss .= 'div.wpr_cart_icon .wpr-cart-item-contents{ background: '.$this->option('cart_contents_bubble_color').' !important; color: '.$this->option('cart_contents_bubble_text_color').' !important; font-size: '.$this->option('cart_contents_bubble_text_size').'px !important}';
|
426 |
-
$inlinecss .= '#wprmenu_bar .menu-elements.cart-icon i { color: '.$this->option('cart_icon_color').' !important}';
|
427 |
-
$inlinecss .= '#wprmenu_bar .menu-elements.cart-icon i:hover{color: '.$this->option('cart_icon_active_color').' !important}';
|
428 |
-
}
|
429 |
-
|
430 |
-
$inlinecss .= '#wprmenu_bar .menu-elements.search-icon .toggle-search i:hover{color: '.$this->option('search_icon_hover_color').' !important}';
|
431 |
-
$inlinecss .= '#mg-wprm-wrap .wpr_submit i::before {color: '.$this->option('search_icon_color').' !important }';
|
432 |
-
|
433 |
-
$inlinecss .= '}';
|
434 |
-
|
435 |
-
return $inlinecss;
|
436 |
-
|
437 |
-
}
|
438 |
-
|
439 |
-
/**
|
440 |
-
*
|
441 |
-
* Add necessary js and css for our wp responsive menu
|
442 |
-
*
|
443 |
-
* @since 1.0.2
|
444 |
-
* @param blank
|
445 |
-
* @return array
|
446 |
-
*/
|
447 |
-
public function wprm_enque_scripts() {
|
448 |
-
|
449 |
-
$is_restricted_page = $this->check_restricted_page();
|
450 |
-
|
451 |
-
if( $is_restricted_page )
|
452 |
-
return;
|
453 |
-
|
454 |
-
//hamburger menu icon style
|
455 |
-
wp_enqueue_style( 'hamburger.css' , plugins_url().'/wp-responsive-menu-pro/css/wpr-hamburger.css', array(), '1.0' );
|
456 |
-
|
457 |
-
if( $this->option('google_font_type') != '' && $this->option('google_font_type') == 'web_fonts' ) {
|
458 |
-
wp_enqueue_style('wprmenu-font', '//fonts.googleapis.com/css?family='.$this->option('google_web_font_family'));
|
459 |
-
}
|
460 |
-
|
461 |
-
wp_enqueue_style( 'wprmenu.fonts.css' , plugins_url().'/wp-responsive-menu-pro/inc/icons/style.css', array(), '1.0' );
|
462 |
-
|
463 |
-
wp_enqueue_style( 'wprmenu.css' , plugins_url().'/wp-responsive-menu-pro/css/wprmenu.css', array(), '1.0' );
|
464 |
-
|
465 |
-
if( $this->option('rtlview') == 1 ) :
|
466 |
-
wp_enqueue_style( 'wprmenu-rtl.css' , plugins_url().'/wp-responsive-menu-pro/css/wprmenu-rtl.css', array(), '1.0' );
|
467 |
-
endif;
|
468 |
-
|
469 |
-
//menu css
|
470 |
-
wp_enqueue_style( 'wpr-icons', plugins_url().'/wp-responsive-menu-pro/inc/icons/style.css', array(), '1.0' );
|
471 |
-
|
472 |
-
if( $this->option('wpr_enable_external_css') == 'yes' ) {
|
473 |
-
$css_file = wp_upload_dir()['baseurl'] . '/wp-responsive-menu-pro/css/wp-responsive-menu-pro-' . get_current_blog_id() . '.css';
|
474 |
-
wp_enqueue_style('wprmenu-external', $css_file, null, true);
|
475 |
-
}
|
476 |
-
else
|
477 |
-
wp_add_inline_style( 'wprmenu.css', $this->wpr_inline_css() );
|
478 |
-
|
479 |
-
wp_enqueue_script( 'modernizr', plugins_url(). '/wp-responsive-menu-pro/js/modernizr.custom.js', array( 'jquery' ), '1.0' );
|
480 |
-
|
481 |
-
//touchswipe js
|
482 |
-
wp_enqueue_script( 'touchSwipe', plugins_url(). '/wp-responsive-menu-pro/js/jquery.touchSwipe.min.js', array( 'jquery' ), '1.0' );
|
483 |
-
|
484 |
-
wp_enqueue_script( 'wprmenu.js', plugins_url(). '/wp-responsive-menu-pro/js/wprmenu.js', array( 'jquery' ), '1.0' );
|
485 |
-
|
486 |
-
$wpr_options = array(
|
487 |
-
'zooming' => $this->option('zooming'),
|
488 |
-
'from_width' => $this->option('from_width'),
|
489 |
-
'parent_click' => $this->option('parent_click'),
|
490 |
-
'swipe' => $this->option('swipe'),
|
491 |
-
'push_width' => $this->option('menu_max_width'),
|
492 |
-
'menu_width' => $this->option('how_wide'),
|
493 |
-
'submenu_open_icon' => $this->option('submenu_open_icon'),
|
494 |
-
'submenu_close_icon' => $this->option('submenu_close_icon'),
|
495 |
-
'SubmenuOpened' => $this->option('submenu_opened') != '' ? $this->option('submenu_opened') : '0',
|
496 |
-
'enable_overlay' => $this->option('enable_overlay'),
|
497 |
-
'menu_open_direction' => $this->option('position'),
|
498 |
-
'enable_fullwidth' => $this->option('fullwidth_menu_container'),
|
499 |
-
'widget_menu_open_direction' => $this->option('widget_menu_open_direction'),
|
500 |
-
);
|
501 |
-
wp_localize_script( 'wprmenu.js', 'wprmenu', $wpr_options );
|
502 |
-
}
|
503 |
-
|
504 |
-
/**
|
505 |
-
*
|
506 |
-
* Show woocommerce product counts in the cart
|
507 |
-
*
|
508 |
-
* @since 3.0.4
|
509 |
-
* @param array
|
510 |
-
* @return array
|
511 |
-
*/
|
512 |
-
public function wpr_cart_count_fragments( $fragments ) {
|
513 |
-
$fragments['span.wpr-cart-item-contents'] = '<span class="wpr-cart-item-contents">' . WC()->cart->get_cart_contents_count() . '</span>';
|
514 |
-
return $fragments;
|
515 |
-
}
|
516 |
-
|
517 |
-
public function woocommerce_installed() {
|
518 |
-
if ( class_exists( 'woocommerce' ) ) {
|
519 |
-
return true;
|
520 |
-
}
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
*
|
525 |
-
* WordPress deafult search form
|
526 |
-
*
|
527 |
-
* @since 3.0.4
|
528 |
-
* @param blank
|
529 |
-
* @return html
|
530 |
-
*/
|
531 |
-
public function wpr_search_form() {
|
532 |
-
|
533 |
-
$search_placeholder = $this->option('search_box_text');
|
534 |
-
|
535 |
-
$translated = apply_filters('wpml_translate_single_string', $this->option('search_box_text'), 'WP Responsive Menu', $this->option('search_box_text'));
|
536 |
-
$search_placeholder = function_exists('pll__') ? pll__($translated) : $translated;
|
537 |
-
|
538 |
-
$unique_id = esc_attr( uniqid( 'search-form-' ) );
|
539 |
-
$woocommerce_search = '';
|
540 |
-
|
541 |
-
if( $this->woocommerce_installed() && $this->option('woocommerce_integration') == 'yes' && $this->option('woocommerce_product_search') == 'yes' ) {
|
542 |
-
$woocommerce_search = '<input type="hidden" name="post_type" value="product" />';
|
543 |
-
}
|
544 |
-
|
545 |
-
echo '<form role="search" method="get" class="wpr-search-form" action="' . site_url() . '"><label for="'.$unique_id.'"></label><input type="search" class="wpr-search-field" placeholder="' . $search_placeholder . '" value="" name="s" title="Search for:"><button type="submit" class="wpr_submit"><i class="wpr-icon-search"></i></button>'.$woocommerce_search.'</form>';
|
546 |
-
}
|
547 |
-
|
548 |
-
/**
|
549 |
-
*
|
550 |
-
* Show widget menu on frontend
|
551 |
-
*
|
552 |
-
* @since 3.1
|
553 |
-
* @param blank
|
554 |
-
* @return boolean
|
555 |
-
*/
|
556 |
-
public function wpr_show_widget_menu() {
|
557 |
-
if( $this->option('wpr_enable_widget') == 1 ) {
|
558 |
-
if( is_active_sidebar('wp-responsive-menu') ) {
|
559 |
-
dynamic_sidebar( 'wp-responsive-menu' );
|
560 |
-
}
|
561 |
-
}
|
562 |
-
}
|
563 |
-
|
564 |
-
|
565 |
-
/**
|
566 |
-
*
|
567 |
-
* Creates menu bar for responsive menu
|
568 |
-
*
|
569 |
-
* @since 1.2
|
570 |
-
* @param blank
|
571 |
-
* @return html
|
572 |
-
*/
|
573 |
-
public function show_menu_bar_element() {
|
574 |
-
$html = '';
|
575 |
-
|
576 |
-
if( $this->option('wpr_enable_widget') == 'on' || $this->option('wpr_enable_widget') == '1') :
|
577 |
-
$widget_menu_icon = $this->option('widget_menu_icon');
|
578 |
-
$widget_menu_active_icon = $this->option('widget_menu_close_icon');
|
579 |
-
|
580 |
-
$html .= '<div class="wpr-widget-menu">';
|
581 |
-
$html .= '<i class="wpr_widget_menu_open '.$widget_menu_icon.' "></i>';
|
582 |
-
$html .= '<i class="wpr_widget_menu_close '.$widget_menu_active_icon.' "></i>';
|
583 |
-
$html .= '</div>';
|
584 |
-
endif;
|
585 |
-
|
586 |
-
if( $this->option('search_box_menubar') == '1' || $this->option('search_box_menubar') == 'on' ) :
|
587 |
-
$html .= '<div class="wpr-search-wrap menu-bar-elements menu-elements search-icon"><div class="toggle-search"><i class="'.$this->option('search_icon').'"></i></div></div>';
|
588 |
-
endif;
|
589 |
-
|
590 |
-
if( $this->option('cart-icon') != '' ) :
|
591 |
-
//show woocommerce cart icon if woocommerce and cart is enabled
|
592 |
-
if( $this->option('woocommerce_integration') == 'yes' && $this->woocommerce_installed() ) :
|
593 |
-
global $woocommerce;
|
594 |
-
$cart_url = wc_get_cart_url();
|
595 |
-
$html .='<div class="wpr-cart-wrap menu-bar-elements menu-elements cart-icon"><div class="wpr_cart_icon"><a class="wpr_cart_item" href="'.$cart_url.'"><i class='.$this->option('cart-icon').'></i>';
|
596 |
-
|
597 |
-
if( WC()->cart->get_cart_contents_count() > 0 ) :
|
598 |
-
$html .= '<span class="wpr-cart-item-contents">'.WC()->cart->get_cart_contents_count().'</span>';
|
599 |
-
else :
|
600 |
-
$html .= '<span class="wpr-cart-item-contents">0</span>';
|
601 |
-
endif;
|
602 |
-
$html .= '</a></div></div>';
|
603 |
-
endif;
|
604 |
-
endif;
|
605 |
-
echo $html;
|
606 |
-
}
|
607 |
-
|
608 |
-
/**
|
609 |
-
*
|
610 |
-
* Get demo settings from the file
|
611 |
-
*
|
612 |
-
* @since 1.2
|
613 |
-
* @param blank
|
614 |
-
* @return html
|
615 |
-
*/
|
616 |
-
public function wpr_social_icons() {
|
617 |
-
|
618 |
-
$socials = json_decode( $this->option('social') );
|
619 |
-
|
620 |
-
if( $this->option('social') !='' && !empty($socials) ){
|
621 |
-
$output = '';
|
622 |
-
if( is_array ( $socials ) && count( $socials ) > 0 ) {
|
623 |
-
foreach( $socials as $social ) {
|
624 |
-
$output .= '<a href="'.$social->link.'" target="_blank"><i class="'.$social->icon.'"></i></a>';
|
625 |
-
}
|
626 |
-
}
|
627 |
-
}
|
628 |
-
return $output;
|
629 |
-
}
|
630 |
-
|
631 |
-
// function for hide menu on selected pages
|
632 |
-
public function check_restricted_page() {
|
633 |
-
$id = '';
|
634 |
-
|
635 |
-
if( get_the_ID() ) {
|
636 |
-
$id = get_the_ID();
|
637 |
-
}
|
638 |
-
|
639 |
-
$menu_hide_pages = $this->option('hide_menu_pages');
|
640 |
-
|
641 |
-
if( is_array($menu_hide_pages) && !empty($menu_hide_pages) ) {
|
642 |
-
foreach( $menu_hide_pages as $key => $val ) {
|
643 |
-
if( $key == $id )
|
644 |
-
return true;
|
645 |
-
}
|
646 |
-
}
|
647 |
-
}
|
648 |
-
|
649 |
-
/**
|
650 |
-
*
|
651 |
-
* Outputs Responsive Menu Html
|
652 |
-
*
|
653 |
-
* @since 1.0
|
654 |
-
* @param blank
|
655 |
-
* @return html
|
656 |
-
*/
|
657 |
-
public function wprmenu_menu() {
|
658 |
-
|
659 |
-
if( $this->option('enabled') ) :
|
660 |
-
|
661 |
-
$is_restricted_page = $this->check_restricted_page();
|
662 |
-
|
663 |
-
if( $is_restricted_page )
|
664 |
-
return;
|
665 |
-
|
666 |
-
$menu_title = $this->option('bar_title');
|
667 |
-
$translated = apply_filters('wpml_translate_single_string', $this->option('bar_title'), 'WP Responsive Menu', $this->option('bar_title'));
|
668 |
-
$menu_title = function_exists('pll__') ? pll__($translated) : $translated;
|
669 |
-
|
670 |
-
$logo_link = $this->option('logo_link') != '' ? $this->option('logo_link') : get_site_url();
|
671 |
-
$openDirection = $this->option('position');
|
672 |
-
$widget_menu_open_direction = $this->option('widget_menu_open_direction');
|
673 |
-
|
674 |
-
$menu_icon_animation = $this->option('menu_icon_animation') != '' ? $this->option('menu_icon_animation') : 'hamburger--slider';
|
675 |
-
|
676 |
-
if( $this->option('menu_type') == 'custom' ) : ?>
|
677 |
-
<div class="wprmenu_bar custMenu <?php if ( $this->option('slide_type') == 'bodyslide' ) { echo $this->option('slide_type'); echo ' '.$this->option('position'); } ?>">
|
678 |
-
<?php
|
679 |
-
$menu_icon_type = $this->option('menu_icon_type') != '' ? $this->option('menu_icon_type') : 'custom';
|
680 |
-
|
681 |
-
if( $menu_icon_type !== 'custom' ) : //show default menu
|
682 |
-
?>
|
683 |
-
<div id="custom_menu_icon" class="hamburger <?php echo $menu_icon_animation; ?>">
|
684 |
-
<span class="hamburger-box">
|
685 |
-
<span class="hamburger-inner"></span>
|
686 |
-
</span>
|
687 |
-
</div>
|
688 |
-
<?php
|
689 |
-
endif;
|
690 |
-
?>
|
691 |
-
|
692 |
-
<?php if( $menu_icon_type == 'custom' ) : ?>
|
693 |
-
<div class="wpr-custom-menu">
|
694 |
-
<i class="wpr_open <?php echo $this->option('menu_icon'); ?>"></i>
|
695 |
-
<i class="wpr_close <?php echo $this->option('menu_close_icon'); ?>"></i>
|
696 |
-
</div>
|
697 |
-
<?php endif; ?>
|
698 |
-
|
699 |
-
</div>
|
700 |
-
<?php
|
701 |
-
else:
|
702 |
-
$logo_class = ' wpr-logo-' . $this->option( 'bar_logo_pos' );
|
703 |
-
?>
|
704 |
-
|
705 |
-
|
706 |
-
<!-- Menu Elements Here -->
|
707 |
-
<div class="wprm-wrapper">
|
708 |
-
|
709 |
-
<?php
|
710 |
-
if( $this->option('enable_overlay') == '1' ) : ?>
|
711 |
-
<div class="wprm-overlay"></div>
|
712 |
-
<?php endif; ?>
|
713 |
-
|
714 |
-
<div id="wprmenu_bar" class="wprmenu_bar <?php echo $this->option('slide_type'); echo ' '.$this->option('position'); echo ' widget-menu-'.$this->option('widget_menu_open_direction'); echo $logo_class; ?>">
|
715 |
-
|
716 |
-
<?php
|
717 |
-
/**
|
718 |
-
*
|
719 |
-
* Before Menu Filter Hook
|
720 |
-
*
|
721 |
-
* @since 3.1
|
722 |
-
*/
|
723 |
-
echo apply_filters('before_wp_responsive_menu_header', $before_menu_header);
|
724 |
-
?>
|
725 |
-
|
726 |
-
<!-- menu search box -->
|
727 |
-
<div class="search-expand">
|
728 |
-
<div class="wpr_search">
|
729 |
-
<?php
|
730 |
-
echo $this->wpr_search_form();
|
731 |
-
?>
|
732 |
-
</div>
|
733 |
-
</div>
|
734 |
-
|
735 |
-
<?php
|
736 |
-
$this->show_menu_bar_element();
|
737 |
-
$menu_icon_type = $this->option('menu_icon_type') != '' ? $this->option('menu_icon_type') : 'custom';
|
738 |
-
|
739 |
-
if( $menu_icon_type !== 'custom' ) : //show default menu
|
740 |
-
?>
|
741 |
-
|
742 |
-
<div class="hamburger <?php echo $menu_icon_animation; ?>">
|
743 |
-
<span class="hamburger-box">
|
744 |
-
<span class="hamburger-inner"></span>
|
745 |
-
</span>
|
746 |
-
</div>
|
747 |
-
<?php
|
748 |
-
endif;
|
749 |
-
|
750 |
-
if( $menu_icon_type == 'custom' ) :
|
751 |
-
?>
|
752 |
-
<div class="wpr-custom-menu">
|
753 |
-
<i class="wpr_open <?php echo $this->option('menu_icon'); ?>"></i>
|
754 |
-
<i class="wpr_close <?php echo $this->option('menu_close_icon'); ?>"></i>
|
755 |
-
</div>
|
756 |
-
<?php endif; ?>
|
757 |
-
|
758 |
-
|
759 |
-
<div class="menu_title">
|
760 |
-
<?php if( $this->option('bar_logo') == '' && $this->option('logo_link') !== '' ) : ?>
|
761 |
-
<a href="<?php echo $this->option('logo_link'); ?>"><?php echo $menu_title; ?></a>
|
762 |
-
<?php else: ?>
|
763 |
-
<?php echo $menu_title; ?>
|
764 |
-
<?php endif; ?>
|
765 |
-
</div>
|
766 |
-
|
767 |
-
<?php
|
768 |
-
if( $this->option('bar_logo') != '' ) :
|
769 |
-
echo '<span class="wpr-logo-wrap menu-elements"><a href="'.$logo_link.'"><img alt="logo" src="'.$this->option('bar_logo').'"/></a></span>';
|
770 |
-
endif;
|
771 |
-
?>
|
772 |
-
|
773 |
-
<?php
|
774 |
-
/**
|
775 |
-
*
|
776 |
-
* After Menu Filter Hook
|
777 |
-
*
|
778 |
-
* @since 3.1
|
779 |
-
*/
|
780 |
-
echo apply_filters('after_wp_responsive_menu_header', $after_menu_header);
|
781 |
-
?>
|
782 |
-
</div>
|
783 |
-
<?php endif; ?>
|
784 |
-
|
785 |
-
|
786 |
-
<!-- Widget Menu Elements Starts Here -->
|
787 |
-
<?php
|
788 |
-
if( ( $this->option('wpr_enable_widget') == '1' || $this->option('wpr_enable_widget') == 'on' )
|
789 |
-
&& is_active_sidebar('wp-responsive-menu') ) :
|
790 |
-
?>
|
791 |
-
<div class="widget-menu-elements-wrapper cbp-spmenu-widget cbp-spmenu-widget-vertical cbp-spmenu-widget-<?php echo $widget_menu_open_direction; ?>" id="mg-widgetmenu-wrap">
|
792 |
-
<?php dynamic_sidebar( 'wp-responsive-menu' ); ?>
|
793 |
-
</div>
|
794 |
-
<?php
|
795 |
-
endif;
|
796 |
-
?>
|
797 |
-
<!-- Widget Menu Elements Ends Here -->
|
798 |
-
|
799 |
-
<!-- Menu Elements Starts Here -->
|
800 |
-
<div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-<?php echo $openDirection; ?> <?php echo $this->option('menu_type'); ?> " id="mg-wprm-wrap">
|
801 |
-
|
802 |
-
<?php if( $this->option('fullwidth_menu_container') == '1' ) : ?>
|
803 |
-
<div class="wprmenu-fixed-close-button">
|
804 |
-
<div class="fullwidth-menu hamburger <?php echo $menu_icon_animation; ?>">
|
805 |
-
<span class="hamburger-box">
|
806 |
-
<span class="hamburger-inner"></span>
|
807 |
-
</span>
|
808 |
-
</div>
|
809 |
-
</div>
|
810 |
-
<?php endif; ?>
|
811 |
-
|
812 |
-
<?php
|
813 |
-
$search_position = $this->option('order_menu_items') != '' ? $this->option('order_menu_items') : 'Menu,Search,Social';
|
814 |
-
?>
|
815 |
-
|
816 |
-
<ul id="wprmenu_menu_ul">
|
817 |
-
<?php
|
818 |
-
/**
|
819 |
-
* Before Menu Filter Hook
|
820 |
-
* @since 3.1
|
821 |
-
*/
|
822 |
-
echo apply_filters('before_wp_responsive_menu_element', $before_menu_elements);
|
823 |
-
|
824 |
-
//Content Before Menu
|
825 |
-
if( $this->option('content_before_menu_element') !== '' ) {
|
826 |
-
$content_before_menu_elements = preg_replace('/\\\\/', '', $this->option('content_before_menu_element'));
|
827 |
-
|
828 |
-
echo '<li class="wprm_before_menu_content">'. $content_before_menu_elements . '</li>';
|
829 |
-
}
|
830 |
-
|
831 |
-
foreach( explode(',', $search_position) as $element_position ) :
|
832 |
-
//Show search element
|
833 |
-
if( $element_position == 'Search' ) :
|
834 |
-
if( $this->option('search_box_menu_block') != '' && $this->option('search_box_menu_block') == 1 ) :
|
835 |
-
?>
|
836 |
-
<li class="search-menu">
|
837 |
-
<div class="wpr_search">
|
838 |
-
<?php echo $this->wpr_search_form(); ?>
|
839 |
-
</div>
|
840 |
-
</li>
|
841 |
-
<?php
|
842 |
-
endif;
|
843 |
-
endif;
|
844 |
-
|
845 |
-
//Show social block
|
846 |
-
if( $element_position == 'Social' ) :
|
847 |
-
$socials = json_decode( $this->option('social') );
|
848 |
-
if( !empty($socials) ) : ?>
|
849 |
-
<li>
|
850 |
-
<div class="wpr_social_icons">
|
851 |
-
<?php echo $this->wpr_social_icons(); ?>
|
852 |
-
</div>
|
853 |
-
</li>
|
854 |
-
<?php
|
855 |
-
endif;
|
856 |
-
endif; // End of social block
|
857 |
-
|
858 |
-
//Show menu elements
|
859 |
-
if( $element_position == 'Menu' ) :
|
860 |
-
$menu = '';
|
861 |
-
$menus = get_terms( 'nav_menu', array( 'hide_empty'=>false ) );
|
862 |
-
|
863 |
-
if( !function_exists('icl_get_languages') ) {
|
864 |
-
if( $menus ) :
|
865 |
-
foreach( $menus as $m ) :
|
866 |
-
if( $m->term_id == $this->option('menu') ) $menu = $m;
|
867 |
-
endforeach;
|
868 |
-
endif;
|
869 |
-
}
|
870 |
-
|
871 |
-
if( function_exists('icl_get_languages') ) {
|
872 |
-
$language_menu_id = $this->option(ICL_LANGUAGE_CODE.'_menu');
|
873 |
-
|
874 |
-
if( $menus ) :
|
875 |
-
foreach( $menus as $m ) :
|
876 |
-
if( $m->term_id == $language_menu_id ) $menu = $m;
|
877 |
-
endforeach;
|
878 |
-
endif;
|
879 |
-
}
|
880 |
-
|
881 |
-
if( is_object( $menu ) ) :
|
882 |
-
wp_nav_menu( array( 'menu'=>$menu->name,'container'=>false,'items_wrap'=>'%3$s' ) );
|
883 |
-
endif;
|
884 |
-
endif;
|
885 |
-
|
886 |
-
endforeach;
|
887 |
-
|
888 |
-
//Content After Menu
|
889 |
-
if( $this->option('content_after_menu_element') !== '' ) {
|
890 |
-
$content_after_menu_element = preg_replace('/\\\\/', '', $this->option('content_after_menu_element'));
|
891 |
-
|
892 |
-
echo '<li class="wprm_after_menu_content">'. $content_after_menu_element . '</li>';
|
893 |
-
}
|
894 |
-
|
895 |
-
echo apply_filters('after_wp_responsive_menu_element', $after_menu_element);
|
896 |
-
?>
|
897 |
-
</ul>
|
898 |
-
</div>
|
899 |
-
<!-- Menu Elements Ends Here-->
|
900 |
-
|
901 |
-
</div>
|
902 |
-
<?php
|
903 |
-
endif;
|
904 |
-
}
|
905 |
-
|
906 |
-
/**
|
907 |
-
*
|
908 |
-
* Create Menu Widget
|
909 |
-
*
|
910 |
-
* @since 3.1
|
911 |
-
* @param blank
|
912 |
-
* @return array
|
913 |
-
*/
|
914 |
-
public function wprmenu_create_widget() {
|
915 |
-
if( $this->option('enabled') && $this->option('wpr_enable_widget') ) :
|
916 |
-
register_sidebar( array(
|
917 |
-
'name' => __( 'WP Responsive Menu', 'wprmenu' ),
|
918 |
-
'description' => __('Widgets added here will appear in the widget menu of wp responsive menu', 'wprmenu'),
|
919 |
-
'id' => 'wp-responsive-menu',
|
920 |
-
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
921 |
-
'after_widget' => '</section>',
|
922 |
-
'before_title' => '<h2 class="widget-title">',
|
923 |
-
'after_title' => '</h2>',
|
924 |
-
) );
|
925 |
-
endif;
|
926 |
-
}
|
927 |
-
|
928 |
-
/**
|
929 |
-
*
|
930 |
-
* Save settings into transient
|
931 |
-
*
|
932 |
-
* @since 3.1
|
933 |
-
* @param blank
|
934 |
-
* @return array
|
935 |
-
*/
|
936 |
-
public function wpr_live_update() {
|
937 |
-
if( isset($_POST['wprmenu_options']) ) {
|
938 |
-
set_transient('wpr_live_settings', $_POST['wprmenu_options'], 60 * 60 * 24);
|
939 |
-
}
|
940 |
-
wp_die();
|
941 |
-
}
|
942 |
-
|
943 |
-
/**
|
944 |
-
*
|
945 |
-
* Show custom css from the plugin settings
|
946 |
-
*
|
947 |
-
* @since 3.1
|
948 |
-
* @param blank
|
949 |
-
* @return string
|
950 |
-
*/
|
951 |
-
public function wpr_custom_css() {
|
952 |
-
$wpr_custom_css = $this->option('wpr_custom_css');
|
953 |
-
|
954 |
-
if( !empty($wpr_custom_css) ) :
|
955 |
-
?>
|
956 |
-
<style type="text/css">
|
957 |
-
<?php
|
958 |
-
echo '/* WPR Custom CSS */' . "\n";
|
959 |
-
echo $wpr_custom_css . "\n";
|
960 |
-
?>
|
961 |
-
</style>
|
962 |
-
<?php
|
963 |
-
endif;
|
964 |
-
}
|
965 |
-
|
966 |
-
/**
|
967 |
-
*
|
968 |
-
* Get demo settings from the file
|
969 |
-
*
|
970 |
-
* @since 3.1
|
971 |
-
* @param blank
|
972 |
-
* @return json object
|
973 |
-
*/
|
974 |
-
public function wprmenu_import_data() {
|
975 |
-
|
976 |
-
$response = 'error';
|
977 |
-
$menu = '';
|
978 |
-
|
979 |
-
if( $this->option('menu') ) {
|
980 |
-
$menu = $this->option('menu');
|
981 |
-
}
|
982 |
-
|
983 |
-
if( isset($_POST) ) {
|
984 |
-
$settings_id = isset($_POST['settings_id']) ? $_POST['settings_id'] : '';
|
985 |
-
$demo_type = isset($_POST['demo_type']) ? $_POST['demo_type'] : '';
|
986 |
-
|
987 |
-
$demo_id = isset($_POST['demo_id']) ? $_POST['demo_id'] : '';
|
988 |
-
|
989 |
-
if( $settings_id !== ''
|
990 |
-
&& $demo_type !== ''
|
991 |
-
&& $demo_id !== '' ) {
|
992 |
-
$site_name = MG_WPRM_DEMO_SITE_URL;
|
993 |
-
$remoteLink = $site_name.'/wp-json/wprmenu-server/v2/type='.$demo_type.'/demo_name='.$demo_id.'/settings_id='.$settings_id;
|
994 |
-
|
995 |
-
|
996 |
-
$content = wp_remote_get($remoteLink);
|
997 |
-
|
998 |
-
if( is_array($content)
|
999 |
-
&& isset($content['response'])
|
1000 |
-
&& $content['response']['code'] == 200 ) {
|
1001 |
-
|
1002 |
-
$content = $content['body'];
|
1003 |
-
$items = json_decode($content, true);
|
1004 |
-
|
1005 |
-
if( is_array($items) ) {
|
1006 |
-
$items['menu'] = $menu;
|
1007 |
-
}
|
1008 |
-
|
1009 |
-
$content = maybe_serialize($items);
|
1010 |
-
|
1011 |
-
if( $content ) {
|
1012 |
-
$response = 'success';
|
1013 |
-
global $wpdb;
|
1014 |
-
|
1015 |
-
$wpdb->update(
|
1016 |
-
$wpdb->prefix.'options',
|
1017 |
-
array(
|
1018 |
-
'option_value' => $content,
|
1019 |
-
),
|
1020 |
-
array(
|
1021 |
-
'option_name' => 'wprmenu_options',
|
1022 |
-
)
|
1023 |
-
);
|
1024 |
-
}
|
1025 |
-
else {
|
1026 |
-
$response = 'error';
|
1027 |
-
}
|
1028 |
-
}
|
1029 |
-
else {
|
1030 |
-
$response = 'error';
|
1031 |
-
}
|
1032 |
-
}
|
1033 |
-
else {
|
1034 |
-
$response = 'error';
|
1035 |
-
}
|
1036 |
-
}
|
1037 |
-
else {
|
1038 |
-
$response = 'error';
|
1039 |
-
}
|
1040 |
-
echo json_encode( array('status' => $response) );
|
1041 |
-
wp_die();
|
1042 |
-
}
|
1043 |
-
|
1044 |
-
/**
|
1045 |
-
*
|
1046 |
-
* Get settings from transient and save into options api
|
1047 |
-
*
|
1048 |
-
* @since 3.1
|
1049 |
-
* @param blank
|
1050 |
-
* @return json object
|
1051 |
-
*/
|
1052 |
-
public function wpr_get_transient_from_data() {
|
1053 |
-
$response = 'error';
|
1054 |
-
$check_transient = get_transient('wpr_live_settings');
|
1055 |
-
|
1056 |
-
if( $check_transient) {
|
1057 |
-
$content = maybe_serialize($check_transient);
|
1058 |
-
update_option('wprmenu_options', $check_transient);
|
1059 |
-
$response = 'success';
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
echo json_encode( array('status' => $response) );
|
1063 |
-
wp_die();
|
1064 |
-
}
|
1065 |
-
|
1066 |
-
|
1067 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
inc/wprmclass.php
CHANGED
@@ -112,6 +112,10 @@ class WP_Responsive_Menu {
|
|
112 |
$border_bottom_color = $this->hex2rgba($this->option("menu_border_bottom"), $this->option("menu_border_bottom_opacity"));
|
113 |
$menu_title_font = $this->option('menu_title_size') == '' ? '20' : $this->option('menu_title_size');
|
114 |
|
|
|
|
|
|
|
|
|
115 |
//manu background image
|
116 |
if( $this->option('menu_bg') != '' ) :
|
117 |
$inlinecss .= '#mg-wprm-wrap {
|
@@ -385,7 +389,7 @@ class WP_Responsive_Menu {
|
|
385 |
* Outputs Responsive Menu Html
|
386 |
*
|
387 |
* @since 1.0
|
388 |
-
* @param
|
389 |
* @return html
|
390 |
*/
|
391 |
public function wprmenu_menu() {
|
@@ -416,16 +420,6 @@ class WP_Responsive_Menu {
|
|
416 |
<?php else: ?>
|
417 |
<div id="wprmenu_bar" class="wprmenu_bar <?php echo $this->option('slide_type'); echo ' '.$this->option('position'); ?>">
|
418 |
|
419 |
-
<?php
|
420 |
-
/**
|
421 |
-
*
|
422 |
-
* Before Menu Filter Hook
|
423 |
-
*
|
424 |
-
* @since 3.1
|
425 |
-
*/
|
426 |
-
apply_filters('before_wp_responsive_menu_header', 'before_menu_header');
|
427 |
-
?>
|
428 |
-
|
429 |
<div class="hamburger <?php echo $menu_icon_animation; ?>">
|
430 |
<span class="hamburger-box">
|
431 |
<span class="hamburger-inner"></span>
|
@@ -455,14 +449,19 @@ class WP_Responsive_Menu {
|
|
455 |
<?php if( $this->option('bar_logo') ) echo '<img class="bar_logo" alt="logo" src="'.$this->option('bar_logo').'"/>' ?>
|
456 |
</div>
|
457 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
<ul id="wprmenu_menu_ul">
|
459 |
-
|
460 |
-
/**
|
461 |
-
* Before Menu Elements Filter Hook
|
462 |
-
* @since 3.1
|
463 |
-
*/
|
464 |
-
apply_filters('before_wp_responsive_menu_element', 'before_menu_elements');
|
465 |
-
?>
|
466 |
|
467 |
<?php
|
468 |
/* Content Before Menu */
|
@@ -514,77 +513,25 @@ class WP_Responsive_Menu {
|
|
514 |
}
|
515 |
?>
|
516 |
|
517 |
-
|
518 |
-
/**
|
519 |
-
* After Menu Elements Filter Hook
|
520 |
-
* @since 3.1
|
521 |
-
*/
|
522 |
-
apply_filters('after_wp_responsive_menu_element', 'after_menu_element');
|
523 |
-
?>
|
524 |
</ul>
|
525 |
|
526 |
<?php
|
527 |
/**
|
528 |
*
|
529 |
-
* After Menu
|
530 |
*
|
531 |
-
* @since 3.1
|
532 |
*/
|
533 |
-
|
534 |
?>
|
|
|
535 |
</div>
|
536 |
</div>
|
537 |
<?php
|
538 |
endif;
|
539 |
}
|
540 |
|
541 |
-
/**
|
542 |
-
*
|
543 |
-
* Before menu elements filter
|
544 |
-
*
|
545 |
-
* @since 3.1
|
546 |
-
* @param string
|
547 |
-
* @return string
|
548 |
-
*/
|
549 |
-
function before_menu_elements($before_menu_elements) {
|
550 |
-
return $before_menu_elements;
|
551 |
-
}
|
552 |
-
|
553 |
-
/**
|
554 |
-
*
|
555 |
-
* After menu elements filter
|
556 |
-
*
|
557 |
-
* @since 3.1
|
558 |
-
* @param string
|
559 |
-
* @return string
|
560 |
-
*/
|
561 |
-
function after_menu_element($after_menu_element) {
|
562 |
-
return $after_menu_element;
|
563 |
-
}
|
564 |
-
|
565 |
-
/**
|
566 |
-
*
|
567 |
-
* Before menu header filter
|
568 |
-
*
|
569 |
-
* @since 3.1
|
570 |
-
* @param string
|
571 |
-
* @return string
|
572 |
-
*/
|
573 |
-
function before_menu_header($before_menu_header) {
|
574 |
-
return $before_menu_header;
|
575 |
-
}
|
576 |
-
|
577 |
-
/**
|
578 |
-
*
|
579 |
-
* After menu elements filter
|
580 |
-
*
|
581 |
-
* @since 3.1
|
582 |
-
* @param string
|
583 |
-
* @return string
|
584 |
-
*/
|
585 |
-
function after_menu_header($after_menu_header) {
|
586 |
-
return $after_menu_header;
|
587 |
-
}
|
588 |
|
589 |
/**
|
590 |
*
|
112 |
$border_bottom_color = $this->hex2rgba($this->option("menu_border_bottom"), $this->option("menu_border_bottom_opacity"));
|
113 |
$menu_title_font = $this->option('menu_title_size') == '' ? '20' : $this->option('menu_title_size');
|
114 |
|
115 |
+
$inlinecss .= 'html body div.wprm-wrapper {
|
116 |
+
overflow: scroll;
|
117 |
+
}';
|
118 |
+
|
119 |
//manu background image
|
120 |
if( $this->option('menu_bg') != '' ) :
|
121 |
$inlinecss .= '#mg-wprm-wrap {
|
389 |
* Outputs Responsive Menu Html
|
390 |
*
|
391 |
* @since 1.0
|
392 |
+
* @param empty
|
393 |
* @return html
|
394 |
*/
|
395 |
public function wprmenu_menu() {
|
420 |
<?php else: ?>
|
421 |
<div id="wprmenu_bar" class="wprmenu_bar <?php echo $this->option('slide_type'); echo ' '.$this->option('position'); ?>">
|
422 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
<div class="hamburger <?php echo $menu_icon_animation; ?>">
|
424 |
<span class="hamburger-box">
|
425 |
<span class="hamburger-inner"></span>
|
449 |
<?php if( $this->option('bar_logo') ) echo '<img class="bar_logo" alt="logo" src="'.$this->option('bar_logo').'"/>' ?>
|
450 |
</div>
|
451 |
<?php endif; ?>
|
452 |
+
|
453 |
+
<?php
|
454 |
+
/**
|
455 |
+
*
|
456 |
+
* After Menu Header Hook
|
457 |
+
*
|
458 |
+
* @since 3.1.2
|
459 |
+
*/
|
460 |
+
do_action('wpr_after_menu_bar');
|
461 |
+
?>
|
462 |
+
|
463 |
<ul id="wprmenu_menu_ul">
|
464 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
|
466 |
<?php
|
467 |
/* Content Before Menu */
|
513 |
}
|
514 |
?>
|
515 |
|
516 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
</ul>
|
518 |
|
519 |
<?php
|
520 |
/**
|
521 |
*
|
522 |
+
* After Menu Container Hook
|
523 |
*
|
524 |
+
* @since 3.1.2
|
525 |
*/
|
526 |
+
do_action('wpr_after_menu_container');
|
527 |
?>
|
528 |
+
|
529 |
</div>
|
530 |
</div>
|
531 |
<?php
|
532 |
endif;
|
533 |
}
|
534 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
|
536 |
/**
|
537 |
*
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: WordPress Responsive Menu, Genesis responsive menu, Genesis Mobile Menu, T
|
|
4 |
Requires at least: 3.0
|
5 |
Requires PHP: 5.4
|
6 |
Tested up to: 5.0.3
|
7 |
-
Stable tag: 3.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -98,10 +98,14 @@ Yes of course. We are always ready to convert your ideas into a plugin. Contact
|
|
98 |
|
99 |
== ChangeLog ==
|
100 |
|
|
|
|
|
|
|
|
|
|
|
101 |
= Version 3.1.1 =
|
102 |
|
103 |
* Fixed issue for constant
|
104 |
-
* Fixed issue for menu on iPhone device
|
105 |
|
106 |
= Version 3.1 =
|
107 |
|
4 |
Requires at least: 3.0
|
5 |
Requires PHP: 5.4
|
6 |
Tested up to: 5.0.3
|
7 |
+
Stable tag: 3.1.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
98 |
|
99 |
== ChangeLog ==
|
100 |
|
101 |
+
= Version 3.1.2 =
|
102 |
+
|
103 |
+
* Changed hooks
|
104 |
+
* Fixed issue for menu on iPhone device
|
105 |
+
|
106 |
= Version 3.1.1 =
|
107 |
|
108 |
* Fixed issue for constant
|
|
|
109 |
|
110 |
= Version 3.1 =
|
111 |
|
wp-responsive-menu.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Responsive Menu
|
4 |
Plugin URI: http://magnigenie.com/wp-responsive-menu-mobile-menu-plugin-wordpress/
|
5 |
Description: WP Responsive Menu is mobile menu plugin that lets you add a highly customizable responsive menu to any WordPress site in no time.
|
6 |
-
Version: 3.1.
|
7 |
Author: MagniGenie
|
8 |
Author URI: http://magnigenie.com
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: WP Responsive Menu
|
4 |
Plugin URI: http://magnigenie.com/wp-responsive-menu-mobile-menu-plugin-wordpress/
|
5 |
Description: WP Responsive Menu is mobile menu plugin that lets you add a highly customizable responsive menu to any WordPress site in no time.
|
6 |
+
Version: 3.1.2
|
7 |
Author: MagniGenie
|
8 |
Author URI: http://magnigenie.com
|
9 |
License: GPLv2 or later
|