Version Description
Download this release
Release Info
Developer | Magnigenie |
Plugin | WP Responsive Menu |
Version | 3.1.6 |
Comparing to | |
See all releases |
Code changes from version 3.1.4 to 3.1.6
- assets/css/wpr-hamburger.css +0 -0
- assets/css/wprmenu.css +0 -0
- assets/fonts/wprmenu.eot +0 -0
- assets/fonts/wprmenu.svg +0 -0
- assets/fonts/wprmenu.ttf +0 -0
- assets/fonts/wprmenu.woff +0 -0
- assets/js/jquery.touchSwipe.min.js +0 -0
- assets/js/modernizr.custom.js +0 -0
- assets/js/wprmenu.js +0 -0
- css/wpr-hamburger.css +0 -0
- inc/assets/css/iconpicker.eot +0 -0
- inc/assets/css/iconpicker.svg +0 -0
- inc/assets/css/iconpicker.ttf +0 -0
- inc/assets/css/iconpicker.woff +0 -0
- inc/assets/css/jquery.fonticonpicker.bootstrap.min.css +0 -0
- inc/assets/css/jquery.fonticonpicker.min.css +0 -0
- inc/assets/css/select2.min.css +0 -0
- inc/assets/css/site.min.css +0 -0
- inc/assets/css/sweetalert2.min.css +0 -0
- inc/assets/css/wprmenu-settings-framework.css +0 -0
- inc/assets/icons/fonts/icomoon.eot +0 -0
- inc/assets/icons/fonts/icomoon.svg +0 -0
- inc/assets/icons/fonts/icomoon.ttf +0 -0
- inc/assets/icons/fonts/icomoon.woff +0 -0
- inc/assets/icons/fonts/preview.eot +0 -0
- inc/assets/icons/fonts/preview.svg +0 -0
- inc/assets/icons/fonts/preview.ttf +0 -0
- inc/assets/icons/fonts/preview.woff +0 -0
- inc/assets/icons/selection.json +0 -0
- inc/assets/icons/wpr-icons.css +0 -0
- inc/assets/images/8.gif +0 -0
- inc/assets/images/check_flat/default.png +0 -0
- inc/assets/images/ico-delete.png +0 -0
- inc/assets/images/pro.jpg +0 -0
- inc/assets/images/review.jpg +0 -0
- inc/assets/images/support.jpg +0 -0
- inc/assets/js/ace-min-noconflict/ace.js +0 -0
- inc/assets/js/ace-min-noconflict/mode-css.js +0 -0
- inc/assets/js/ace-min-noconflict/theme-chrome.js +0 -0
- inc/assets/js/ace-min-noconflict/worker-css.js +0 -0
- inc/assets/js/jquery.fonticonpicker.min.js +0 -0
- inc/assets/js/media-uploader.js +0 -0
- inc/assets/js/select2.full.js +0 -0
- inc/assets/js/sweetalert2.all.min.js +0 -0
- inc/assets/js/wpr-exit-intent.js +0 -0
- inc/assets/js/wprmenu-options.js +0 -0
- inc/class-wp-responsive-menu.php +3 -15
- inc/css/iconpicker.eot +0 -0
- inc/css/iconpicker.svg +0 -0
- inc/css/iconpicker.ttf +0 -0
- inc/css/iconpicker.woff +0 -0
- inc/css/jquery.fonticonpicker.bootstrap.min.css +0 -0
- inc/css/jquery.fonticonpicker.min.css +0 -0
- inc/css/select2.min.css +0 -0
- inc/css/site.min.css +0 -0
- inc/google-web-fonts.php +0 -0
- inc/icons/fonts/icomoon.eot +0 -0
- inc/icons/fonts/icomoon.svg +0 -0
- inc/icons/fonts/icomoon.ttf +0 -0
- inc/icons/fonts/icomoon.woff +0 -0
- inc/icons/selection.json +0 -0
- inc/icons/style.css +0 -0
- inc/images/check_flat/default.png +0 -0
- inc/images/pro.jpg +0 -0
- inc/images/review.jpg +0 -0
- inc/images/support.jpg +0 -0
- inc/images/wpr-mobile.png +0 -0
- inc/includes/class-wprmenu-framework-admin.php +4 -2
- inc/includes/class-wprmenu-framework.php +0 -0
- inc/includes/class-wprmenu-interface.php +0 -0
- inc/includes/class-wprmenu-media-uploader.php +0 -0
- inc/includes/class-wprmenu-sanitization.php +1 -1
- inc/includes/untitled.php +0 -1067
- inc/js/ace-min-noconflict/ace.js +0 -0
- inc/js/ace-min-noconflict/mode-css.js +0 -0
- inc/js/ace-min-noconflict/theme-chrome.js +0 -0
- inc/js/ace-min-noconflict/worker-css.js +0 -0
- inc/js/jquery.fonticonpicker.min.js +0 -0
- inc/js/select2.full.js +0 -0
- inc/options-framework.php +0 -69
- inc/options.php +0 -868
- inc/wprmclass.php +0 -0
- inc/wprmenu-framework.php +0 -0
- inc/wprmenu-loader.php +1 -1
- inc/wprmenu-options.php +5 -5
- inc/wprmenu-styles.php +5 -2
- js/jquery.touchSwipe.min.js +0 -0
- js/modernizr.custom.js +0 -0
- languages/wprmenu-en_US.mo +0 -0
- languages/wprmenu-en_US.po +0 -0
- readme.txt +13 -2
- wp-responsive-menu.php +1 -1
assets/css/wpr-hamburger.css
CHANGED
File without changes
|
assets/css/wprmenu.css
CHANGED
File without changes
|
assets/fonts/wprmenu.eot
CHANGED
File without changes
|
assets/fonts/wprmenu.svg
CHANGED
File without changes
|
assets/fonts/wprmenu.ttf
CHANGED
File without changes
|
assets/fonts/wprmenu.woff
CHANGED
File without changes
|
assets/js/jquery.touchSwipe.min.js
CHANGED
File without changes
|
assets/js/modernizr.custom.js
CHANGED
File without changes
|
assets/js/wprmenu.js
CHANGED
File without changes
|
css/wpr-hamburger.css
CHANGED
File without changes
|
inc/assets/css/iconpicker.eot
CHANGED
File without changes
|
inc/assets/css/iconpicker.svg
CHANGED
File without changes
|
inc/assets/css/iconpicker.ttf
CHANGED
File without changes
|
inc/assets/css/iconpicker.woff
CHANGED
File without changes
|
inc/assets/css/jquery.fonticonpicker.bootstrap.min.css
CHANGED
File without changes
|
inc/assets/css/jquery.fonticonpicker.min.css
CHANGED
File without changes
|
inc/assets/css/select2.min.css
CHANGED
File without changes
|
inc/assets/css/site.min.css
CHANGED
File without changes
|
inc/assets/css/sweetalert2.min.css
CHANGED
File without changes
|
inc/assets/css/wprmenu-settings-framework.css
CHANGED
File without changes
|
inc/assets/icons/fonts/icomoon.eot
CHANGED
File without changes
|
inc/assets/icons/fonts/icomoon.svg
CHANGED
File without changes
|
inc/assets/icons/fonts/icomoon.ttf
CHANGED
File without changes
|
inc/assets/icons/fonts/icomoon.woff
CHANGED
File without changes
|
inc/assets/icons/fonts/preview.eot
CHANGED
File without changes
|
inc/assets/icons/fonts/preview.svg
CHANGED
File without changes
|
inc/assets/icons/fonts/preview.ttf
CHANGED
File without changes
|
inc/assets/icons/fonts/preview.woff
CHANGED
File without changes
|
inc/assets/icons/selection.json
CHANGED
File without changes
|
inc/assets/icons/wpr-icons.css
CHANGED
File without changes
|
inc/assets/images/8.gif
CHANGED
File without changes
|
inc/assets/images/check_flat/default.png
CHANGED
File without changes
|
inc/assets/images/ico-delete.png
CHANGED
File without changes
|
inc/assets/images/pro.jpg
CHANGED
File without changes
|
inc/assets/images/review.jpg
CHANGED
File without changes
|
inc/assets/images/support.jpg
CHANGED
File without changes
|
inc/assets/js/ace-min-noconflict/ace.js
CHANGED
File without changes
|
inc/assets/js/ace-min-noconflict/mode-css.js
CHANGED
File without changes
|
inc/assets/js/ace-min-noconflict/theme-chrome.js
CHANGED
File without changes
|
inc/assets/js/ace-min-noconflict/worker-css.js
CHANGED
File without changes
|
inc/assets/js/jquery.fonticonpicker.min.js
CHANGED
File without changes
|
inc/assets/js/media-uploader.js
CHANGED
File without changes
|
inc/assets/js/select2.full.js
CHANGED
File without changes
|
inc/assets/js/sweetalert2.all.min.js
CHANGED
File without changes
|
inc/assets/js/wpr-exit-intent.js
CHANGED
File without changes
|
inc/assets/js/wprmenu-options.js
CHANGED
File without changes
|
inc/class-wp-responsive-menu.php
CHANGED
@@ -93,22 +93,10 @@ class WP_Responsive_Menu {
|
|
93 |
return array_merge( $links, $new_links );
|
94 |
}
|
95 |
|
96 |
-
public function wprm_settings_links( $links ) {
|
97 |
-
echo 'dsdsa';
|
98 |
-
exit;
|
99 |
-
$admin_url = admin_url('admin.php?page=wp-responsive-menu');
|
100 |
-
// $settings_link = sprintf( '<a href="%1$s" title="%2$s">%2$s</a>', $admin_url, esc_attr__( 'Settings', 'wprmenu' ) );
|
101 |
-
|
102 |
-
$settings_link = '<a href="'.admin_url('admin.php?page=wp-responsive-menu').'">Settings</a>';
|
103 |
-
array_unshift( $links, $settings_link );
|
104 |
-
return $links;
|
105 |
-
}
|
106 |
-
|
107 |
-
|
108 |
public function option( $option ){
|
109 |
-
if ( isset($_COOKIE['wprmenu_live_preview'])
|
110 |
&& $_COOKIE['wprmenu_live_preview'] == 'yes' ) {
|
111 |
-
$check_transient = get_transient('wpr_live_settings');
|
112 |
|
113 |
if ( $check_transient ) {
|
114 |
if ( isset( $check_transient[$option] )
|
@@ -355,7 +343,7 @@ class WP_Responsive_Menu {
|
|
355 |
* @return array
|
356 |
*/
|
357 |
public function wpr_live_update() {
|
358 |
-
if ( isset($_POST['wprmenu_options']) ) {
|
359 |
set_transient('wpr_live_settings', $_POST['wprmenu_options'], 60 * 60 * 24);
|
360 |
}
|
361 |
wp_die();
|
93 |
return array_merge( $links, $new_links );
|
94 |
}
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
public function option( $option ){
|
97 |
+
if ( isset( $_COOKIE['wprmenu_live_preview'] )
|
98 |
&& $_COOKIE['wprmenu_live_preview'] == 'yes' ) {
|
99 |
+
$check_transient = get_transient( 'wpr_live_settings' );
|
100 |
|
101 |
if ( $check_transient ) {
|
102 |
if ( isset( $check_transient[$option] )
|
343 |
* @return array
|
344 |
*/
|
345 |
public function wpr_live_update() {
|
346 |
+
if ( isset( $_POST['wprmenu_options'] ) ) {
|
347 |
set_transient('wpr_live_settings', $_POST['wprmenu_options'], 60 * 60 * 24);
|
348 |
}
|
349 |
wp_die();
|
inc/css/iconpicker.eot
CHANGED
File without changes
|
inc/css/iconpicker.svg
CHANGED
File without changes
|
inc/css/iconpicker.ttf
CHANGED
File without changes
|
inc/css/iconpicker.woff
CHANGED
File without changes
|
inc/css/jquery.fonticonpicker.bootstrap.min.css
CHANGED
File without changes
|
inc/css/jquery.fonticonpicker.min.css
CHANGED
File without changes
|
inc/css/select2.min.css
CHANGED
File without changes
|
inc/css/site.min.css
CHANGED
File without changes
|
inc/google-web-fonts.php
CHANGED
File without changes
|
inc/icons/fonts/icomoon.eot
CHANGED
File without changes
|
inc/icons/fonts/icomoon.svg
CHANGED
File without changes
|
inc/icons/fonts/icomoon.ttf
CHANGED
File without changes
|
inc/icons/fonts/icomoon.woff
CHANGED
File without changes
|
inc/icons/selection.json
CHANGED
File without changes
|
inc/icons/style.css
CHANGED
File without changes
|
inc/images/check_flat/default.png
CHANGED
File without changes
|
inc/images/pro.jpg
CHANGED
File without changes
|
inc/images/review.jpg
CHANGED
File without changes
|
inc/images/support.jpg
CHANGED
File without changes
|
inc/images/wpr-mobile.png
CHANGED
File without changes
|
inc/includes/class-wprmenu-framework-admin.php
CHANGED
@@ -200,6 +200,8 @@ class WPRMenu_Framework_Admin {
|
|
200 |
|
201 |
wp_register_script( 'wprmenu-import-demo', $this->wprmenu_admin_url() . '/assets/js/wprmenu-import-demo.js', array('jquery', 'wpr-exit-intent', 'Sweetalert2-js'), WPRMENU_VERSION );
|
202 |
|
|
|
|
|
203 |
$params = array(
|
204 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
205 |
'please_wait' => __('Please Wait !', 'wprmenu'),
|
@@ -213,7 +215,7 @@ class WPRMenu_Framework_Admin {
|
|
213 |
'import_error_title' => __('Oops...', 'wprmenu'),
|
214 |
'pro_version_error' => __('Please upgrade to PRO Version to import this demo.', 'wprmenu'),
|
215 |
'preview_url' => home_url(),
|
216 |
-
'enable_preview' => $
|
217 |
'import_error' => __('Something went wrong', 'wprmenu'),
|
218 |
);
|
219 |
|
@@ -421,7 +423,7 @@ class WPRMenu_Framework_Admin {
|
|
421 |
}
|
422 |
|
423 |
// For a value to be submitted to database it must pass through a sanitization filter
|
424 |
-
if ( has_filter( 'wpr_of_sanitize_' . $option['type'] ) ) {
|
425 |
$clean[$id] = apply_filters( 'wpr_of_sanitize_' . $option['type'], $input[$id], $option );
|
426 |
}
|
427 |
}
|
200 |
|
201 |
wp_register_script( 'wprmenu-import-demo', $this->wprmenu_admin_url() . '/assets/js/wprmenu-import-demo.js', array('jquery', 'wpr-exit-intent', 'Sweetalert2-js'), WPRMENU_VERSION );
|
202 |
|
203 |
+
$enable_preview = !empty( $options ) ? $options['wpr_live_preview'] : 0;
|
204 |
+
|
205 |
$params = array(
|
206 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
207 |
'please_wait' => __('Please Wait !', 'wprmenu'),
|
215 |
'import_error_title' => __('Oops...', 'wprmenu'),
|
216 |
'pro_version_error' => __('Please upgrade to PRO Version to import this demo.', 'wprmenu'),
|
217 |
'preview_url' => home_url(),
|
218 |
+
'enable_preview' => $enable_preview,
|
219 |
'import_error' => __('Something went wrong', 'wprmenu'),
|
220 |
);
|
221 |
|
423 |
}
|
424 |
|
425 |
// For a value to be submitted to database it must pass through a sanitization filter
|
426 |
+
if ( has_filter( 'wpr_of_sanitize_' . $option['type'] ) && !empty( $input[$id] ) ) {
|
427 |
$clean[$id] = apply_filters( 'wpr_of_sanitize_' . $option['type'], $input[$id], $option );
|
428 |
}
|
429 |
}
|
inc/includes/class-wprmenu-framework.php
CHANGED
File without changes
|
inc/includes/class-wprmenu-interface.php
CHANGED
File without changes
|
inc/includes/class-wprmenu-media-uploader.php
CHANGED
File without changes
|
inc/includes/class-wprmenu-sanitization.php
CHANGED
@@ -126,7 +126,7 @@ add_filter( 'wpr_of_sanitize_info', 'wpr_of_sanitize_allowedposttags' );
|
|
126 |
|
127 |
function wpr_of_sanitize_enum( $input, $option ) {
|
128 |
$output = '';
|
129 |
-
if ( array_key_exists( $input, $option['options'] ) ) {
|
130 |
$output = $input;
|
131 |
}
|
132 |
return $output;
|
126 |
|
127 |
function wpr_of_sanitize_enum( $input, $option ) {
|
128 |
$output = '';
|
129 |
+
if ( is_array( $option['options'] ) && array_key_exists( $input, $option['options'] ) ) {
|
130 |
$output = $input;
|
131 |
}
|
132 |
return $output;
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/js/ace-min-noconflict/ace.js
CHANGED
File without changes
|
inc/js/ace-min-noconflict/mode-css.js
CHANGED
File without changes
|
inc/js/ace-min-noconflict/theme-chrome.js
CHANGED
File without changes
|
inc/js/ace-min-noconflict/worker-css.js
CHANGED
File without changes
|
inc/js/jquery.fonticonpicker.min.js
CHANGED
File without changes
|
inc/js/select2.full.js
CHANGED
File without changes
|
inc/options-framework.php
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// If this file is called directly, abort.
|
4 |
-
if ( ! defined( 'WPINC' ) ) {
|
5 |
-
die;
|
6 |
-
}
|
7 |
-
|
8 |
-
// Don't load if wpr_optionsframework_init is already defined
|
9 |
-
if (is_admin() && ! function_exists( 'wpr_optionsframework_init' ) ) :
|
10 |
-
|
11 |
-
function wpr_optionsframework_init() {
|
12 |
-
|
13 |
-
// If user can't edit theme options, exit
|
14 |
-
if ( ! current_user_can( 'edit_theme_options' ) )
|
15 |
-
return;
|
16 |
-
|
17 |
-
// Loads the required Options Framework classes.
|
18 |
-
require plugin_dir_path( __FILE__ ) . 'includes/class-options-framework.php';
|
19 |
-
require plugin_dir_path( __FILE__ ) . 'includes/class-options-framework-admin.php';
|
20 |
-
require plugin_dir_path( __FILE__ ) . 'includes/class-options-interface.php';
|
21 |
-
require plugin_dir_path( __FILE__ ) . 'includes/class-options-media-uploader.php';
|
22 |
-
require plugin_dir_path( __FILE__ ) . 'includes/class-options-sanitization.php';
|
23 |
-
|
24 |
-
// Instantiate the main plugin class.
|
25 |
-
$options_framework = new Wpr_Options_Framework;
|
26 |
-
$options_framework->init();
|
27 |
-
|
28 |
-
// Instantiate the options page.
|
29 |
-
$Wpr_Options_Framework_Admin = new Wpr_Options_Framework_Admin;
|
30 |
-
$Wpr_Options_Framework_Admin->init();
|
31 |
-
|
32 |
-
// Instantiate the media uploader class
|
33 |
-
$options_framework_media_uploader = new Wpr_Options_Framework_Media_Uploader;
|
34 |
-
$options_framework_media_uploader->init();
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
add_action( 'init', 'wpr_optionsframework_init', 20 );
|
39 |
-
|
40 |
-
endif;
|
41 |
-
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Helper function to return the theme option value.
|
45 |
-
* If no value has been saved, it returns $default.
|
46 |
-
* Needed because options are saved as serialized strings.
|
47 |
-
*
|
48 |
-
* Not in a class to support backwards compatibility in themes.
|
49 |
-
*/
|
50 |
-
|
51 |
-
if ( ! function_exists( 'wpr_of_get_option' ) ) :
|
52 |
-
|
53 |
-
function wpr_of_get_option( $name, $default = false ) {
|
54 |
-
$config = get_option( 'wpr_optionsframework' );
|
55 |
-
|
56 |
-
if ( ! isset( $config['id'] ) ) {
|
57 |
-
return $default;
|
58 |
-
}
|
59 |
-
|
60 |
-
$options = get_option( $config['id'] );
|
61 |
-
|
62 |
-
if ( isset( $options[$name] ) ) {
|
63 |
-
return $options[$name];
|
64 |
-
}
|
65 |
-
|
66 |
-
return $default;
|
67 |
-
}
|
68 |
-
|
69 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/options.php
DELETED
@@ -1,868 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* A unique identifier is defined to store the options in the database and reference them from the theme.
|
4 |
-
* By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed.
|
5 |
-
* If the identifier changes, it'll appear as if the options have been reset.
|
6 |
-
*/
|
7 |
-
|
8 |
-
function wpr_optionsframework_option_name() {
|
9 |
-
$wpr_optionsframework_settings = get_option( 'wpr_optionsframework' );
|
10 |
-
$wpr_optionsframework_settings['id'] = 'wprmenu_options';
|
11 |
-
update_option( 'wpr_optionsframework', $wpr_optionsframework_settings );
|
12 |
-
}
|
13 |
-
add_action( 'wpr_optionsframework_after', 'wpr_support_link' );
|
14 |
-
|
15 |
-
function wpr_support_link() {
|
16 |
-
$options = get_option( 'wprmenu_options' );
|
17 |
-
?>
|
18 |
-
<div class="queries-holder live-preview">
|
19 |
-
<div class="live-preview-badge"><?php _e('Show Live Preview', 'wprmenu'); ?></div>
|
20 |
-
<div class="live-preview-container disable">
|
21 |
-
|
22 |
-
<div class="wpr-load-preview-wrap">
|
23 |
-
<span class="wpr-load-priv"><?php _e('Click Here To Load Preview', 'wprmenu'); ?></span>
|
24 |
-
</div>
|
25 |
-
|
26 |
-
<div class="wpr-smartphone">
|
27 |
-
<div class="smartphone-content">
|
28 |
-
<div class="overlay"></div>
|
29 |
-
<iframe id="wpr_iframe" scrolling="yes" style="width: 100%; border: none; height: 100%;" src="<?php echo get_site_url(); ?>"></iframe>
|
30 |
-
</div>
|
31 |
-
</div>
|
32 |
-
|
33 |
-
</div>
|
34 |
-
</div>
|
35 |
-
|
36 |
-
<?php
|
37 |
-
/*
|
38 |
-
<div class="queries-holder">
|
39 |
-
<a href="http://magnigenie.com/open-ticket/" target="_blank">
|
40 |
-
<img src="<?php echo WPR_PRO_OPTIONS_FRAMEWORK_DIRECTORY;?>/images/support.jpg" alt="support">
|
41 |
-
</a>
|
42 |
-
</div>
|
43 |
-
|
44 |
-
<div class="queries-holder">
|
45 |
-
<a href="http://magnigenie.com/purchase-history" target="_blank">
|
46 |
-
<img src="<?php echo WPR_PRO_OPTIONS_FRAMEWORK_DIRECTORY;?>/images/review.jpg" alt="review">
|
47 |
-
</a>
|
48 |
-
</div>
|
49 |
-
*/
|
50 |
-
?>
|
51 |
-
<?php
|
52 |
-
}
|
53 |
-
|
54 |
-
add_filter( 'wpr_optionsframework_menu', 'wpr_add_responsive_menu' );
|
55 |
-
|
56 |
-
function wpr_add_responsive_menu( $menu ) {
|
57 |
-
$menu['page_title'] = 'WP Responsive Menu';
|
58 |
-
$menu['menu_title'] = 'WPR Menu';
|
59 |
-
$menu['mode'] = 'menu';
|
60 |
-
$menu['menu_slug'] = 'wp-responsive-menu';
|
61 |
-
$menu['position'] = '200';
|
62 |
-
return $menu;
|
63 |
-
}
|
64 |
-
|
65 |
-
function woocommerce_installed() {
|
66 |
-
if ( class_exists( 'woocommerce' ) ) {
|
67 |
-
return true;
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
//get all the pages from site
|
72 |
-
function menu_pages() {
|
73 |
-
$pages = get_pages();
|
74 |
-
|
75 |
-
$opt_pages = array();
|
76 |
-
|
77 |
-
if( is_array($pages) && !empty($pages) ) {
|
78 |
-
foreach ($pages as $page) {
|
79 |
-
$opt_pages[$page->ID] = $page->post_title;
|
80 |
-
}
|
81 |
-
}
|
82 |
-
return $opt_pages;
|
83 |
-
}
|
84 |
-
|
85 |
-
function wpr_google_fonts() {
|
86 |
-
$fonts = array(
|
87 |
-
"Arial, Helvetica, sans-serif" => "Arial, Helvetica, sans-serif",
|
88 |
-
"'Arial Black', Gadget, sans-serif" => "'Arial Black', Gadget, sans-serif",
|
89 |
-
"'Bookman Old Style', serif" => "'Bookman Old Style', serif",
|
90 |
-
"'Comic Sans MS', cursive" => "'Comic Sans MS', cursive",
|
91 |
-
"Courier, monospace" => "Courier, monospace",
|
92 |
-
"Garamond, serif" => "Garamond, serif",
|
93 |
-
"Georgia, serif" => "Georgia, serif",
|
94 |
-
"Impact, Charcoal, sans-serif" => "Impact, Charcoal, sans-serif",
|
95 |
-
"'Lucida Console', Monaco, monospace" => "'Lucida Console', Monaco, monospace",
|
96 |
-
"'Lucida Sans Unicode', 'Lucida Grande', sans-serif" => "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
|
97 |
-
"'MS Sans Serif', Geneva, sans-serif" => "'MS Sans Serif', Geneva, sans-serif",
|
98 |
-
"'MS Serif', 'New York', sans-serif" => "'MS Serif', 'New York', sans-serif",
|
99 |
-
"'Palatino Linotype', 'Book Antiqua', Palatino, serif" => "'Palatino Linotype', 'Book Antiqua', Palatino, serif",
|
100 |
-
"Tahoma,Geneva, sans-serif" => "Tahoma, Geneva, sans-serif",
|
101 |
-
"'Times New Roman', Times,serif" => "'Times New Roman', Times, serif",
|
102 |
-
"'Trebuchet MS', Helvetica, sans-serif" => "'Trebuchet MS', Helvetica, sans-serif",
|
103 |
-
"Verdana, Geneva, sans-serif" => "Verdana, Geneva, sans-serif",
|
104 |
-
);
|
105 |
-
|
106 |
-
return $fonts;
|
107 |
-
}
|
108 |
-
|
109 |
-
function wpr_google_web_fonts() {
|
110 |
-
$file_path = plugin_dir_path(__FILE__).'google-web-fonts.php';
|
111 |
-
if( file_exists($file_path) ) {
|
112 |
-
require_once dirname( __FILE__ ) . '/google-web-fonts.php';
|
113 |
-
$fonts = get_custom_fonts();
|
114 |
-
$fonts = json_decode($fonts);
|
115 |
-
return $fonts;
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
add_action( 'admin_notices', 'wpr_menu_admin_notice__error' );
|
120 |
-
|
121 |
-
function wpr_menu_admin_notice__error() {
|
122 |
-
if( isset($_GET['page']) && $_GET['page'] == 'wp-responsive-menu' ) {
|
123 |
-
$menus = wpr_get_menus();
|
124 |
-
|
125 |
-
if( empty($menus) ) {
|
126 |
-
$class = 'notice notice-error';
|
127 |
-
$menu_link = admin_url('nav-menus.php?action=edit&menu=0');
|
128 |
-
$message = __( 'It seems that you haven\'t created any menu. Please create menu from <a href="'.$menu_link.'"> here </a> ', 'wprmenu' );
|
129 |
-
|
130 |
-
printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message );
|
131 |
-
}
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
function wpr_get_menus() {
|
136 |
-
$menu = array();
|
137 |
-
$menus = get_terms( 'nav_menu',array( 'hide_empty'=>false ) );
|
138 |
-
|
139 |
-
if( is_array( $menus ) && !empty( $menus ) ) {
|
140 |
-
foreach( $menus as $m ) {
|
141 |
-
$menu[$m->term_id] = $m->name;
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
return $menu;
|
146 |
-
}
|
147 |
-
|
148 |
-
|
149 |
-
$options = get_option( 'wprmenu_options' );
|
150 |
-
function wpr_optionsframework_options() {
|
151 |
-
|
152 |
-
$options = array();
|
153 |
-
|
154 |
-
$options[] = array( 'name' => __( 'General', 'wprmenu' ),
|
155 |
-
'type' => 'heading' );
|
156 |
-
|
157 |
-
$options[] = array( 'name' => __( 'Enable Responsive Menu', 'wprmenu' ),
|
158 |
-
'desc' => __( 'Turn on if you want to enable WP Responsive Menu functionality on your site.', 'wprmenu' ),
|
159 |
-
'id' => 'enabled',
|
160 |
-
'std' => '1',
|
161 |
-
'type' => 'checkbox' );
|
162 |
-
|
163 |
-
$options[] = array( 'name' => __( 'Live preview', 'wprmenu' ),
|
164 |
-
'desc' => __( 'You can see a live preview of menu directly on your dashboard.', 'wprmenu' ),
|
165 |
-
'id' => 'wpr_live_preview',
|
166 |
-
'std' => '1',
|
167 |
-
'type' => 'checkbox' );
|
168 |
-
|
169 |
-
$options[] = array( 'name' => __( 'Search input within menu', 'wprmenu' ),
|
170 |
-
'desc' => __( 'Enables the display of search input box inside the menu.', 'wprmenu' ),
|
171 |
-
'id' => 'search_box_menu_block',
|
172 |
-
'std' => '1',
|
173 |
-
'type' => 'checkbox' );
|
174 |
-
|
175 |
-
$options[] = array( 'name' => __( 'Enable Widget Menu', 'wprmenu' ),
|
176 |
-
'desc' => __( 'This will enable widget menu', 'wprmenu' ),
|
177 |
-
'id' => 'wpr_enable_widget',
|
178 |
-
'std' => '0',
|
179 |
-
'class' => 'pro-feature',
|
180 |
-
'type' => 'checkbox' );
|
181 |
-
|
182 |
-
$options[] = array( 'name' => __( 'Search On Menu Bar', 'wprmenu' ),
|
183 |
-
'desc' => __( 'Enables the display of search option on menu bar.', 'wprmenu' ),
|
184 |
-
'id' => 'search_box_menubar',
|
185 |
-
'std' => '0',
|
186 |
-
'class' => 'pro-feature',
|
187 |
-
'type' => 'checkbox' );
|
188 |
-
|
189 |
-
$options[] = array( 'name' => __( 'Enable RTL Mode', 'wprmenu' ),
|
190 |
-
'desc' => __( 'If your site uses RTL styles then enable it.', 'wprmenu' ),
|
191 |
-
'id' => 'rtlview',
|
192 |
-
'class' => 'pro-feature',
|
193 |
-
'std' => '0',
|
194 |
-
'type' => 'checkbox' );
|
195 |
-
|
196 |
-
$options[] = array( 'name' => __( 'Keep Submenus Open', 'wprmenu' ),
|
197 |
-
'desc' => __( 'This option allows you to keep the submenus opened by default.', 'wprmenu' ),
|
198 |
-
'id' => 'submenu_opened',
|
199 |
-
'class' => 'pro-feature',
|
200 |
-
'std' => '0',
|
201 |
-
'type' => 'checkbox' );
|
202 |
-
|
203 |
-
$options[] = array( 'name' => __( 'Enable Full Width Menu Container', 'wprmenu' ),
|
204 |
-
'desc' => __( 'This option makes the menu container in full width.', 'wprmenu' ),
|
205 |
-
'id' => 'fullwidth_menu_container',
|
206 |
-
'class' => 'pro-feature',
|
207 |
-
'std' => '0',
|
208 |
-
'type' => 'checkbox' );
|
209 |
-
|
210 |
-
$options[] = array( 'name' => __( 'Select Menu', 'wprmenu' ),
|
211 |
-
'desc' => __( 'Select the menu you want to display for mobile devices.', 'wprmenu' ),
|
212 |
-
'id' => 'menu',
|
213 |
-
'std' => '',
|
214 |
-
'class' => 'mini',
|
215 |
-
'options' => wpr_get_menus(),
|
216 |
-
'type' => 'radio' );
|
217 |
-
|
218 |
-
$options[] = array( 'name' => __( 'Elements To Hide On Mobile', 'wprmenu' ),
|
219 |
-
'desc' => __( 'Enter the css class/ids for different elements you want to hide on mobile separated by a comma( , ). Example: .nav,#main-menu', 'wprmenu' ),
|
220 |
-
'id' => 'hide',
|
221 |
-
'std' => '',
|
222 |
-
'type' => 'text' );
|
223 |
-
|
224 |
-
$options[] = array( 'name' => __( 'Search Box Placeholder', 'wprmenu' ),
|
225 |
-
'desc' => __( 'Enter the text that would be displayed on the search box placeholder.', 'wprmenu' ),
|
226 |
-
'id' => 'search_box_text',
|
227 |
-
'std' => 'Search...',
|
228 |
-
'type' => 'text' );
|
229 |
-
|
230 |
-
$options[] = array( 'name' => __( 'Menu Title Text', 'wprmenu' ),
|
231 |
-
'id' => 'bar_title',
|
232 |
-
'std' => 'MENU',
|
233 |
-
'class' => 'mini',
|
234 |
-
'type' => 'text' );
|
235 |
-
|
236 |
-
$options[] = array( 'name' => __( 'Menu Bar Logo', 'wprmenu' ),
|
237 |
-
'id' => 'bar_logo',
|
238 |
-
'std' => '',
|
239 |
-
'type' => 'upload' );
|
240 |
-
|
241 |
-
$options[] = array( 'name' => __( 'Menu Logo Position', 'wprmenu' ),
|
242 |
-
'desc' => __( 'Position of logo on menu bar.', 'wprmenu' ),
|
243 |
-
'id' => 'bar_logo_pos',
|
244 |
-
'std' => 'left',
|
245 |
-
'class' => 'pro-feature',
|
246 |
-
'options' => array( 'left' => 'Left','center' => 'Center' ),
|
247 |
-
'type' => 'radio' );
|
248 |
-
|
249 |
-
$options[] = array('name' => __('Logo link / Title link', 'wprmenu'),
|
250 |
-
'desc' => __('Enter custom link you would like to open when clicking on the logo. If no link has been entered your site link would be use by default ', 'wprmenu'),
|
251 |
-
'id' => 'logo_link',
|
252 |
-
'std' => site_url(),
|
253 |
-
'type' => 'text');
|
254 |
-
|
255 |
-
$options[] = array( 'name' => __( 'Swipe', 'wprmenu' ),
|
256 |
-
'desc' => __( 'Enables swipe gesture to open/close menus, Only applicable for left/right menu.', 'wprmenu' ),
|
257 |
-
'id' => 'swipe',
|
258 |
-
'std' => 'yes',
|
259 |
-
'options' => array( 'yes' => 'Yes','no' => 'No' ),
|
260 |
-
'type' => 'radio' );
|
261 |
-
|
262 |
-
$options[] = array( 'name' => __( 'Zoom On Mobile Devices', 'wprmenu' ),
|
263 |
-
'desc' => __( 'Enable/Disable zoom on mobile devices', 'wprmenu' ),
|
264 |
-
'id' => 'zooming',
|
265 |
-
'std' => 'no',
|
266 |
-
'options' => array( 'yes' => 'Yes','no' => 'No' ),
|
267 |
-
'type' => 'radio' );
|
268 |
-
|
269 |
-
$options[] = array('name' => __('Open Submenu On Parent Click' , 'wprmenu'),
|
270 |
-
'desc' => __('Enable this option if you would like to open submenu when clicking on the parent menu.', 'wprmenu'),
|
271 |
-
'id' => 'parent_click',
|
272 |
-
'std' => 'yes',
|
273 |
-
'options' => array('yes' => 'Yes','no' => 'No'),
|
274 |
-
'type' => 'radio');
|
275 |
-
|
276 |
-
//Show the options if WooCommerce is installed and activated
|
277 |
-
if( woocommerce_installed() ) :
|
278 |
-
|
279 |
-
$options[] = array( 'name' => __( 'WooCommerce integration', 'wprmenu' ),
|
280 |
-
'desc' => __( 'This option integrates woocommerce option', 'wprmenu' ),
|
281 |
-
'id' => 'woocommerce_integration',
|
282 |
-
'std' => 'no',
|
283 |
-
'class' => 'pro-feature',
|
284 |
-
'options' => array( 'yes' => 'Yes','no' => 'No' ),
|
285 |
-
'type' => 'radio' );
|
286 |
-
|
287 |
-
$options[] = array( 'name' => __( 'Search Woocommerce products', 'wprmenu' ),
|
288 |
-
'desc' => __( 'This will only search products from your woocommerce store', 'wprmenu' ),
|
289 |
-
'id' => 'woocommerce_product_search',
|
290 |
-
'std' => 'no',
|
291 |
-
'class' => 'pro-feature',
|
292 |
-
'options' => array( 'yes' => 'Yes','no' => 'No' ),
|
293 |
-
'type' => 'radio' );
|
294 |
-
|
295 |
-
endif;
|
296 |
-
|
297 |
-
$options[] = array('name' => __('Hide Menu On Pages', 'wwv'),
|
298 |
-
'id' => 'hide_menu_pages',
|
299 |
-
'options' => menu_pages(),
|
300 |
-
'desc' => __('Select the pages where you want to hide the responsive menu', 'wprmenu'),
|
301 |
-
'class' => 'pro-feature',
|
302 |
-
'type' => 'hidemenupages');
|
303 |
-
|
304 |
-
$options[] = array( 'name' => __( 'Create External File For CSS', 'wprmenu' ),
|
305 |
-
'desc' => __( 'This will create an external css file for the responsive menu', 'wprmenu' ),
|
306 |
-
'id' => 'wpr_enable_external_css',
|
307 |
-
'std' => 'no',
|
308 |
-
'class' => 'pro-feature',
|
309 |
-
'options' => array( 'yes' => 'Yes','no' => 'No' ),
|
310 |
-
'type' => 'radio' );
|
311 |
-
|
312 |
-
$options[] = array( 'name' => __( 'Minify External CSS', 'wprmenu' ),
|
313 |
-
'desc' => __( 'This will minify external responsive menu css file', 'wprmenu' ),
|
314 |
-
'id' => 'wpr_enable_minify',
|
315 |
-
'std' => 'no',
|
316 |
-
'class' => 'pro-feature',
|
317 |
-
'options' => array( 'yes' => 'Yes','no' => 'No' ),
|
318 |
-
'type' => 'radio' );
|
319 |
-
|
320 |
-
$options[] = array( 'name' => __( 'Custom CSS', 'wprmenu' ),
|
321 |
-
'desc' => __( 'Put your custom css here', 'wprmenu' ),
|
322 |
-
'id' => 'wpr_custom_css',
|
323 |
-
'type' => 'code' );
|
324 |
-
|
325 |
-
$options[] = array( 'name' => __( 'Content Before Menu Element', 'wprmenu' ),
|
326 |
-
'desc' => __( 'Set custom content before menu elements.', 'wprmenu' ),
|
327 |
-
'id' => 'content_before_menu_element',
|
328 |
-
'std' => '',
|
329 |
-
'type' => 'editor' );
|
330 |
-
|
331 |
-
$options[] = array( 'name' => __( 'Content After Menu Element', 'wprmenu' ),
|
332 |
-
'desc' => __( 'Set custom content after menu elements.', 'wprmenu' ),
|
333 |
-
'id' => 'content_after_menu_element',
|
334 |
-
'std' => '',
|
335 |
-
'type' => 'editor' );
|
336 |
-
|
337 |
-
|
338 |
-
$options[] = array( 'name' => __( 'Appearance', 'wprmenu' ),
|
339 |
-
'type' => 'heading' );
|
340 |
-
|
341 |
-
$options[] = array( 'name' => __( 'Header Menu Height', 'wprmenu' ),
|
342 |
-
'id' => 'header_menu_height',
|
343 |
-
'desc' => __( 'This will be the height for the menu bar', 'wprmenu' ),
|
344 |
-
'class' => 'mini',
|
345 |
-
'std' => '42',
|
346 |
-
'type' => 'text' );
|
347 |
-
|
348 |
-
$options[] = array( 'name' => __( 'Menu Icon Position', 'wprmenu' ),
|
349 |
-
'desc' => __( 'You can choose to display the menu bar or put the menu icon as per your needs.', 'wprmenu' ),
|
350 |
-
'id' => 'menu_type',
|
351 |
-
'std' => 'default',
|
352 |
-
'options' => array( 'default' => 'Default','custom' => 'Custom' ),
|
353 |
-
'type' => 'radio' );
|
354 |
-
|
355 |
-
$options[] = array( 'name' => __( 'Menu Icon Top Distance(px)', 'wprmenu' ),
|
356 |
-
'desc' => __( 'Enter the menu icon distance from top in px( Eg. 10px ).', 'wprmenu' ),
|
357 |
-
'id' => 'custom_menu_top',
|
358 |
-
'class' => 'mini',
|
359 |
-
'std' => '0',
|
360 |
-
'type' => 'text' );
|
361 |
-
|
362 |
-
$options[] = array( 'name' => __( 'Menu Icon Direction', 'wprmenu' ),
|
363 |
-
'id' => 'menu_symbol_pos',
|
364 |
-
'std' => 'left',
|
365 |
-
'class' => 'mini',
|
366 |
-
'options' => array( 'left' => 'Left','right' => 'Right' ),
|
367 |
-
'type' => 'radio' );
|
368 |
-
|
369 |
-
$options[] = array( 'name' => __( 'Menu Icon Horizontal Distance(px)', 'wprmenu' ),
|
370 |
-
'desc' => __( 'Enter the menu icon distance from left/right based on direction chosen in px(Eg. 10px).', 'wprmenu' ),
|
371 |
-
'id' => 'custom_menu_left',
|
372 |
-
'class' => 'mini',
|
373 |
-
'std' => '0',
|
374 |
-
'type' => 'text' );
|
375 |
-
|
376 |
-
$options[] = array( 'name' => __( 'Menu Icon Background Color', 'wprmenu' ),
|
377 |
-
'desc' => __( 'Select custom menu icon background color.', 'wprmenu' ),
|
378 |
-
'id' => 'custom_menu_bg_color',
|
379 |
-
'std' => '#CCCCCC',
|
380 |
-
'type' => 'color' );
|
381 |
-
|
382 |
-
$options[] = array( 'name' => __( 'Menu Icon Animation', 'wprmenu' ),
|
383 |
-
'desc' => __( 'Select the animation for menu icon', 'wprmenu' ),
|
384 |
-
'id' => 'menu_icon_animation',
|
385 |
-
'options' => array( 'hamburger--3dx' => '3DX','hamburger--3dx-r' => '3DX Reverse', 'hamburger--3dy' => '3DY', 'hamburger--3dy-r' => '3DY Reverse', 'hamburger--3dxy' => '3DXY', 'hamburger--3dxy-r' => '3DXY Reverse', 'hamburger--boring' => 'Boring', 'hamburger--collapse' => 'Collapse', 'hamburger--collapse-r' => 'Collapse Reverse', 'hamburger--elastic' => 'Elastic', 'hamburger--elastic-r' => 'Elastic Reverse', 'hamburger--minus' => 'Minus', 'hamburger--slider' => 'Slider', 'hamburger--slider-r' => 'Slider Reverse', 'hamburger--spring' => 'Spring', 'hamburger--spring-r' => 'Spring Reverse', 'hamburger--stand' => 'Stand', 'hamburger--stand-r' => 'Stand Reverse', 'hamburger--spin' => 'Spin', 'hamburger--spin-r' => 'Spin Reverse', 'hamburger--squeeze' => 'Squeeze', 'hamburger--vortex' => 'Vortex', 'hamburger--vortex-r' => 'Vortex Reverse' ),
|
386 |
-
'std' => 'hamburger--slider',
|
387 |
-
'type' => 'select' );
|
388 |
-
|
389 |
-
|
390 |
-
$options[] = array( 'name' => __( 'Menu Slide Style', 'wprmenu' ),
|
391 |
-
'id' => 'slide_type',
|
392 |
-
'std' => 'bodyslide',
|
393 |
-
'class' => 'mini',
|
394 |
-
'options' => array( 'normalslide' => 'Slide menu', 'bodyslide' => 'Push menu' ),
|
395 |
-
'type' => 'radio' );
|
396 |
-
|
397 |
-
$options[] = array( 'name' => __( 'Menu Open Direction', 'wprmenu' ),
|
398 |
-
'desc' => __( 'Select the direction from where menu will open.', 'wprmenu' ),
|
399 |
-
'id' => 'position',
|
400 |
-
'std' => 'left',
|
401 |
-
'class' => 'mini',
|
402 |
-
'options' => array( 'left' => 'Left','right' => 'Right', 'top' => 'Top', 'bottom' => 'Bottom' ),
|
403 |
-
'type' => 'radio' );
|
404 |
-
|
405 |
-
$options[] = array( 'name' => __( 'Display Menu From Width(px)', 'wprmenu' ),
|
406 |
-
'desc' => __( 'Enter the width (Eg. 768) below which the responsive menu will be visible on screen. Enter 6000 if you want to display menu on desktop/laptops.', 'wprmenu' ),
|
407 |
-
'id' => 'from_width',
|
408 |
-
'std' => '768',
|
409 |
-
'class' => 'mini',
|
410 |
-
'type' => 'text' );
|
411 |
-
|
412 |
-
$options[] = array( 'name' => __( 'Menu Container Width(%)', 'wprmenu' ),
|
413 |
-
'id' => 'how_wide',
|
414 |
-
'std' => '80',
|
415 |
-
'class' => 'mini',
|
416 |
-
'type' => 'text' );
|
417 |
-
|
418 |
-
$options[] = array( 'name' => __( 'Menu Container Max Width(px)', 'wprmenu' ),
|
419 |
-
'desc' => __( 'Enter menu container max width(px).', 'wprmenu' ),
|
420 |
-
'id' => 'menu_max_width',
|
421 |
-
'std' => '400',
|
422 |
-
'class' => 'mini',
|
423 |
-
'type' => 'text' );
|
424 |
-
|
425 |
-
$options[] = array( 'name' => __( 'Menu Title Font Size', 'wprmenu' ),
|
426 |
-
'id' => 'menu_title_size',
|
427 |
-
'std' => '20',
|
428 |
-
'class' => 'mini',
|
429 |
-
'type' => 'text' );
|
430 |
-
|
431 |
-
$options[] = array( 'name' => __( 'Menu Title Font Weight', 'wprmenu' ),
|
432 |
-
'id' => 'menu_title_weight',
|
433 |
-
'std' => 'normal',
|
434 |
-
'options' => array('100' => '100', '200' => '200', '300' =>'300', '400' => '400', '500' => '500', '600' => '600', '700' => '700', '800' => '800', '900' => '900', 'bold' => 'Bold', 'bolder' => 'Bolder', 'lighter' => 'Lighter' ,'normal' => 'Normal'),
|
435 |
-
'type' => 'select' );
|
436 |
-
|
437 |
-
$options[] = array( 'name' => __( 'Menu Item Font Size', 'wprmenu' ),
|
438 |
-
'desc' => __( 'Enter the font size in(px) for main menu items.', 'wprmenu' ),
|
439 |
-
'id' => 'menu_font_size',
|
440 |
-
'std' => '15',
|
441 |
-
'type' => 'text' );
|
442 |
-
|
443 |
-
$options[] = array( 'name' => __( 'Menu Item Font Weight', 'wprmenu' ),
|
444 |
-
'desc' => __( 'Enter the font weight for main menu elements', 'wprmenu' ),
|
445 |
-
'id' => 'menu_font_weight',
|
446 |
-
'std' => 'normal',
|
447 |
-
'options' => array('100' => '100', '200' => '200', '300' =>'300', '400' => '400', '500' => '500', '600' => '600', '700' => '700', '800' => '800', '900' => '900', 'bold' => 'Bold', 'bolder' => 'Bolder', 'lighter' => 'Lighter' ,'normal' => 'Normal'),
|
448 |
-
'type' => 'select' );
|
449 |
-
|
450 |
-
$options[] = array( 'name' => __( 'Menu Item Text Style', 'wprmenu' ),
|
451 |
-
'id' => 'menu_font_text_type',
|
452 |
-
'std' => 'uppercase',
|
453 |
-
'options' => array('none' => 'None', 'capitalize' => 'Capitalize', 'uppercase' =>'Uppercase', 'lowercase' => 'Lowercase'),
|
454 |
-
'type' => 'select' );
|
455 |
-
|
456 |
-
$options[] = array('name' => __('Submenu Alignment', 'wprmenu'),
|
457 |
-
'desc' => __('Select the text alignment of submenu items.', 'wprmenu'),
|
458 |
-
'id' => 'submenu_alignment',
|
459 |
-
'std' => 'left',
|
460 |
-
'class' => 'mini pro-feature',
|
461 |
-
'options' => array('left' => 'Left','right' => 'Right', 'center' => 'Center' ),
|
462 |
-
'type' => 'radio');
|
463 |
-
|
464 |
-
$options[] = array( 'name' => __( 'Submenu Font Size', 'wprmenu' ),
|
465 |
-
'desc' => __( 'Enter the font size in(px) for submenu items.', 'wprmenu' ),
|
466 |
-
'id' => 'sub_menu_font_size',
|
467 |
-
'std' => '15',
|
468 |
-
'type' => 'text' );
|
469 |
-
|
470 |
-
$options[] = array( 'name' => __( 'Submenu Font Weight', 'wprmenu' ),
|
471 |
-
'desc' => __( 'Enter the font weight for sub menu elements', 'wprmenu' ),
|
472 |
-
'id' => 'sub_menu_font_weight',
|
473 |
-
'std' => 'normal',
|
474 |
-
'options' => array('100' => '100', '200' => '200', '300' =>'300', '400' => '400', '500' => '500', '600' => '600', '700' => '700', '800' => '800', '900' => '900', 'bold' => 'Bold', 'bolder' => 'Bolder', 'lighter' => 'Lighter' ,'normal' => 'Normal'),
|
475 |
-
'type' => 'select' );
|
476 |
-
|
477 |
-
$options[] = array( 'name' => __( 'Submenu Text Style', 'wprmenu' ),
|
478 |
-
'id' => 'sub_menu_font_text_type',
|
479 |
-
'std' => 'uppercase',
|
480 |
-
'options' => array('none' => 'None', 'capitalize' => 'Capitalize', 'uppercase' =>'Uppercase', 'lowercase' => 'Lowercase'),
|
481 |
-
'type' => 'select' );
|
482 |
-
|
483 |
-
|
484 |
-
$options[] = array( 'name' => __( 'Cart Quantity Text Size', 'wprmenu' ),
|
485 |
-
'id' => 'cart_contents_bubble_text_size',
|
486 |
-
'std' => '12',
|
487 |
-
'class' => 'pro-feature',
|
488 |
-
'type' => 'text' );
|
489 |
-
|
490 |
-
|
491 |
-
$options[] = array( 'name' => __( 'Borders For Menu Items', 'wprmenu' ),
|
492 |
-
'desc' => __( 'Enable to show border for main menu items', 'wprmenu' ),
|
493 |
-
'id' => 'menu_border_bottom_show',
|
494 |
-
'std' => 'yes',
|
495 |
-
'options' => array( 'yes' => 'Yes','no' => 'No' ),
|
496 |
-
'type' => 'radio' );
|
497 |
-
|
498 |
-
$options[] = array('name' => __('Menu border top opacity', 'wprmenu'),
|
499 |
-
'id' => 'menu_border_top_opacity',
|
500 |
-
'std' => '0.05',
|
501 |
-
'type' => 'text');
|
502 |
-
|
503 |
-
$options[] = array('name' => __('Menu border bottom opacity', 'wprmenu'),
|
504 |
-
'id' => 'menu_border_bottom_opacity',
|
505 |
-
'std' => '0.05',
|
506 |
-
'type' => 'text');
|
507 |
-
|
508 |
-
$options[] = array( 'name' => __( 'Menu container background image', 'wprmenu' ),
|
509 |
-
'id' => 'menu_bg',
|
510 |
-
'std' => '',
|
511 |
-
'type' => 'upload' );
|
512 |
-
|
513 |
-
$options[] = array( 'name' => __( 'Menu container background size', 'wprmenu' ),
|
514 |
-
'id' => 'menu_bg_size',
|
515 |
-
'std' => 'cover',
|
516 |
-
'options' => array( 'contain' => 'Contain','cover' => 'Cover','100%' => '100%' ),
|
517 |
-
'type' => 'radio' );
|
518 |
-
|
519 |
-
$options[] = array( 'name' => __( 'Menu container background repeat', 'wprmenu' ),
|
520 |
-
'id' => 'menu_bg_rep',
|
521 |
-
'std' => 'repeat',
|
522 |
-
'options' => array( 'repeat' => 'Repeat','no-repeat' => 'No repeat' ),
|
523 |
-
'type' => 'radio' );
|
524 |
-
|
525 |
-
$options[] = array( 'name' => __( 'Menu Bar Background image', 'wprmenu' ),
|
526 |
-
'id' => 'menu_bar_bg',
|
527 |
-
'std' => '',
|
528 |
-
'type' => 'upload' );
|
529 |
-
|
530 |
-
$options[] = array( 'name' => __( 'Menu Bar Background Size', 'wprmenu' ),
|
531 |
-
'id' => 'menu_bar_bg_size',
|
532 |
-
'std' => 'cover',
|
533 |
-
'options' => array( 'contain' => 'Contain','cover' => 'Cover','100%' => '100%' ),
|
534 |
-
'type' => 'radio' );
|
535 |
-
|
536 |
-
$options[] = array( 'name' => __( 'Menu Bar Background Repeat', 'wprmenu' ),
|
537 |
-
'id' => 'menu_bar_bg_rep',
|
538 |
-
'std' => 'repeat',
|
539 |
-
'options' => array( 'repeat' => 'Repeat','no-repeat' => 'No repeat' ),
|
540 |
-
'type' => 'radio' );
|
541 |
-
|
542 |
-
$options[] = array( 'name' => __( 'Enable Menu Background Overlay', 'wprmenu' ),
|
543 |
-
'desc' => __( 'Turn on if you want to enable Menu Background Overlay.', 'wprmenu' ),
|
544 |
-
'id' => 'enable_overlay',
|
545 |
-
'std' => '1',
|
546 |
-
'type' => 'checkbox' );
|
547 |
-
|
548 |
-
$options[] = array( 'name' => __( 'Menu Background Overlay Opacity', 'wprmenu' ),
|
549 |
-
'desc' => __( 'Set menu background overlay opacity.', 'wprmenu' ),
|
550 |
-
'id' => 'menu_background_overlay_opacity',
|
551 |
-
'std' => '0.83',
|
552 |
-
'type' => 'text' );
|
553 |
-
|
554 |
-
$options[] = array( 'name' => __( 'Menu elements position', 'wprmenu' ),
|
555 |
-
'desc' => __( 'Drag and drop to reorder the menu elements.', 'wprmenu' ),
|
556 |
-
'id' => 'order_menu_items',
|
557 |
-
'type' => 'menusort' );
|
558 |
-
|
559 |
-
$options[] = array( 'name' => __( 'Widget Menu<span class="badge badge-info">Pro</span>', 'wprmenu' ),
|
560 |
-
'type' => 'heading',
|
561 |
-
);
|
562 |
-
|
563 |
-
$options[] = array('name' => __('Widget Menu Icon', 'wprmenu'),
|
564 |
-
'id' => 'widget_menu_icon',
|
565 |
-
'std' => 'wpr-icon-menu',
|
566 |
-
'desc' => __( 'Set widget menu icon', 'wprmenu' ),
|
567 |
-
'class' => 'mini pro-feature',
|
568 |
-
'type' => 'icon');
|
569 |
-
|
570 |
-
$options[] = array('name' => __('Widget Menu Close Icon', 'wprmenu'),
|
571 |
-
'id' => 'widget_menu_close_icon',
|
572 |
-
'std' => 'wpr-icon-cancel2',
|
573 |
-
'desc' => __( 'Set widget menu close icon', 'wprmenu' ),
|
574 |
-
'class' => 'mini pro-feature',
|
575 |
-
'type' => 'icon');
|
576 |
-
|
577 |
-
$options[] = array( 'name' => __( 'Wiget Menu Icon Size', 'wprmenu' ),
|
578 |
-
'desc' => __( 'Set widget menu font size', 'wprmenu' ),
|
579 |
-
'id' => 'widget_menu_font_size',
|
580 |
-
'desc' => __( 'Set widget menu icon size', 'wprmenu' ),
|
581 |
-
'class' => 'mini pro-feature',
|
582 |
-
'std' => '28',
|
583 |
-
'type' => 'text' );
|
584 |
-
|
585 |
-
$options[] = array( 'name' => __( 'Wiget Menu Top Position', 'wprmenu' ),
|
586 |
-
'desc' => __( 'Set widget menu position from top', 'wprmenu' ),
|
587 |
-
'id' => 'widget_menu_top_position',
|
588 |
-
'class' => 'mini pro-feature',
|
589 |
-
'std' => '0',
|
590 |
-
'type' => 'text' );
|
591 |
-
|
592 |
-
$options[] = array( 'name' => __( 'Widget Menu Icon Color', 'wprmenu' ),
|
593 |
-
'id' => 'widget_menu_icon_color',
|
594 |
-
'std' => '#FFFFFF',
|
595 |
-
'class' => 'mini pro-feature',
|
596 |
-
'desc' => __( 'Set widget menu icon color', 'wprmenu' ),
|
597 |
-
'type' => 'color' );
|
598 |
-
|
599 |
-
$options[] = array( 'name' => __( 'Widget Menu Close Icon Color', 'wprmenu' ),
|
600 |
-
'desc' => __( 'Select the direction from where widget menu will open.', 'wprmenu' ),
|
601 |
-
'id' => 'widget_menu_icon_active_color',
|
602 |
-
'class' => 'mini pro-feature',
|
603 |
-
'std' => '#FFFFFF',
|
604 |
-
'desc' => __( 'Set widget menu close icon color', 'wprmenu' ),
|
605 |
-
'type' => 'color' );
|
606 |
-
|
607 |
-
$options[] = array( 'name' => __( 'Widget Menu Elements Background Color', 'wprmenu' ),
|
608 |
-
'class' => 'mini pro-feature',
|
609 |
-
'id' => 'widget_menu_bg_color',
|
610 |
-
'desc' => __( 'Set widget menu elements background color', 'wprmenu' ),
|
611 |
-
'std' => '#c82d2d',
|
612 |
-
'type' => 'color' );
|
613 |
-
|
614 |
-
$options[] = array( 'name' => __( 'Widget Menu Elements Color', 'wprmenu' ),
|
615 |
-
'class' => 'mini pro-feature',
|
616 |
-
'desc' => __( 'Set widget menu elements font color', 'wprmenu' ),
|
617 |
-
'id' => 'widget_menu_text_color',
|
618 |
-
'std' => '#FFFFFF',
|
619 |
-
'type' => 'color' );
|
620 |
-
|
621 |
-
$options[] = array( 'name' => __( 'Widget Menu Open Direction', 'wprmenu' ),
|
622 |
-
'class' => 'mini pro-feature',
|
623 |
-
'desc' => __( 'Select the direction from where widget menu will open.', 'wprmenu' ),
|
624 |
-
'id' => 'widget_menu_open_direction',
|
625 |
-
'std' => 'left',
|
626 |
-
'options' => array( 'left' => 'Left','right' => 'Right', 'top' => 'Top', 'bottom' => 'Bottom' ),
|
627 |
-
'type' => 'radio' );
|
628 |
-
|
629 |
-
$options[] = array( 'name' => __( 'Color', 'wprmenu' ),
|
630 |
-
'type' => 'heading' );
|
631 |
-
|
632 |
-
$options[] = array( 'name' => __( 'Menu Bar Background', 'wprmenu' ),
|
633 |
-
'id' => 'bar_bgd',
|
634 |
-
'std' => '#C92C2C',
|
635 |
-
'type' => 'color' );
|
636 |
-
|
637 |
-
$options[] = array( 'name' => __( 'Menu Bar Text Color', 'wprmenu' ),
|
638 |
-
'id' => 'bar_color',
|
639 |
-
'std' => '#FFFFFF',
|
640 |
-
'type' => 'color' );
|
641 |
-
|
642 |
-
$options[] = array( 'name' => __( 'Menu Container background', 'wprmenu' ),
|
643 |
-
'id' => 'menu_bgd',
|
644 |
-
'std' => '#c82d2d',
|
645 |
-
'type' => 'color' );
|
646 |
-
|
647 |
-
$options[] = array( 'name' => __( 'Menu Item Text', 'wprmenu' ),
|
648 |
-
'id' => 'menu_color',
|
649 |
-
'std' => '#FFFFFF',
|
650 |
-
'type' => 'color' );
|
651 |
-
|
652 |
-
$options[] = array( 'name' => __( 'Menu Item Text Hover', 'wprmenu' ),
|
653 |
-
'id' => 'menu_color_hover',
|
654 |
-
'std' => '#FFFFFF',
|
655 |
-
'type' => 'color' );
|
656 |
-
|
657 |
-
$options[] = array( 'name' => __( 'Menu Item Hover Background', 'wprmenu' ),
|
658 |
-
'id' => 'menu_textovrbgd',
|
659 |
-
'std' => '#d53f3f',
|
660 |
-
'type' => 'color' );
|
661 |
-
|
662 |
-
$options[] = array( 'name' => __( 'Active Menu Item', 'wprmenu' ),
|
663 |
-
'id' => 'active_menu_color',
|
664 |
-
'std' => '#FFFFFF',
|
665 |
-
'type' => 'color' );
|
666 |
-
|
667 |
-
$options[] = array( 'name' => __( 'Active Menu Item Background', 'wprmenu' ),
|
668 |
-
'id' => 'active_menu_bg_color',
|
669 |
-
'std' => '#d53f3f',
|
670 |
-
'type' => 'color' );
|
671 |
-
|
672 |
-
$options[] = array( 'name' => __( 'Menu Icon Color', 'wprmenu' ),
|
673 |
-
'id' => 'menu_icon_color',
|
674 |
-
'std' => '#FFFFFF',
|
675 |
-
'type' => 'color' );
|
676 |
-
|
677 |
-
$options[] = array( 'name' => __( 'Menu Icon Hover/Focus', 'wprmenu' ),
|
678 |
-
'id' => 'menu_icon_hover_color',
|
679 |
-
'std' => '#FFFFFF',
|
680 |
-
'type' => 'color' );
|
681 |
-
|
682 |
-
$options[] = array('name' => __('Menu Border Top', 'wprmenu'),
|
683 |
-
'id' => 'menu_border_top',
|
684 |
-
'std' => '#FFFFFF',
|
685 |
-
'type' => 'color');
|
686 |
-
|
687 |
-
$options[] = array('name' => __('Menu Border Bottom', 'wprmenu'),
|
688 |
-
'id' => 'menu_border_bottom',
|
689 |
-
'std' => '#FFFFFF',
|
690 |
-
'type' => 'color');
|
691 |
-
|
692 |
-
$options[] = array( 'name' => __( 'Social Icon', 'wprmenu' ),
|
693 |
-
'id' => 'social_icon_color',
|
694 |
-
'std' => '#FFFFFF',
|
695 |
-
'class' => 'pro-feature',
|
696 |
-
'type' => 'color' );
|
697 |
-
|
698 |
-
$options[] = array( 'name' => __( 'Social Icon Hover', 'wprmenu' ),
|
699 |
-
'id' => 'social_icon_hover_color',
|
700 |
-
'class' => 'pro-feature',
|
701 |
-
'std' => '#FFFFFF',
|
702 |
-
'type' => 'color' );
|
703 |
-
|
704 |
-
$options[] = array( 'name' => __( 'Search icon', 'wprmenu' ),
|
705 |
-
'id' => 'search_icon_color',
|
706 |
-
'class' => 'pro-feature',
|
707 |
-
'std' => '#FFFFFF',
|
708 |
-
'type' => 'color' );
|
709 |
-
|
710 |
-
$options[] = array( 'name' => __( 'Search Icon Hover', 'wprmenu' ),
|
711 |
-
'id' => 'search_icon_hover_color',
|
712 |
-
'class' => 'pro-feature',
|
713 |
-
'std' => '#FFFFFF',
|
714 |
-
'type' => 'color' );
|
715 |
-
|
716 |
-
//Show options if woocommerce is installed and activated
|
717 |
-
if( woocommerce_installed() ) :
|
718 |
-
|
719 |
-
$options[] = array( 'name' => __( 'Cart Icon', 'wprmenu' ),
|
720 |
-
'id' => 'cart_icon_color',
|
721 |
-
'class' => 'pro-feature',
|
722 |
-
'std' => '#FFFFFF',
|
723 |
-
'type' => 'color' );
|
724 |
-
|
725 |
-
$options[] = array( 'name' => __( 'Cart Icon Hover', 'wprmenu' ),
|
726 |
-
'id' => 'cart_icon_active_color',
|
727 |
-
'class' => 'pro-feature',
|
728 |
-
'std' => '#FFFFFF',
|
729 |
-
'type' => 'color' );
|
730 |
-
|
731 |
-
$options[] = array( 'name' => __( 'Cart Quantity Text', 'wprmenu' ),
|
732 |
-
'id' => 'cart_contents_bubble_text_color',
|
733 |
-
'std' => '#FFFFFF',
|
734 |
-
'class' => 'pro-feature',
|
735 |
-
'type' => 'color' );
|
736 |
-
|
737 |
-
$options[] = array( 'name' => __( 'Cart Quantity Background', 'wprmenu' ),
|
738 |
-
'id' => 'cart_contents_bubble_color',
|
739 |
-
'std' => '#d53f3f',
|
740 |
-
'class' => 'pro-feature',
|
741 |
-
'type' => 'color' );
|
742 |
-
|
743 |
-
$options[] = array( 'name' => __( 'Menu Background Overlay Color', 'wprmenu' ),
|
744 |
-
'id' => 'menu_bg_overlay_color',
|
745 |
-
'std' => '#000000',
|
746 |
-
'type' => 'color' );
|
747 |
-
|
748 |
-
endif;
|
749 |
-
|
750 |
-
$options[] = array( 'name' => __( 'Fonts<span class="badge badge-info">Pro</span>', 'wprmenu' ),
|
751 |
-
'type' => 'heading',
|
752 |
-
);
|
753 |
-
|
754 |
-
$options[] = array( 'name' => __( 'Google Font Type', 'wprmenu' ),
|
755 |
-
'desc' => __( 'Select Font Type', 'wprmenu' ),
|
756 |
-
'class' => 'wpr_font_type pro-feature',
|
757 |
-
'id' => 'google_font_type',
|
758 |
-
'std' => '',
|
759 |
-
'options' => array('standard' => 'Standard', 'web_fonts' => 'Web Fonts'),
|
760 |
-
'type' => 'select' );
|
761 |
-
|
762 |
-
$options[] = array( 'name' => __( 'Font Family', 'wprmenu' ),
|
763 |
-
'class' => 'wpr_font_family pro-feature',
|
764 |
-
'id' => 'google_font_family',
|
765 |
-
'std' => '',
|
766 |
-
'options' => wpr_google_fonts(),
|
767 |
-
'type' => 'select' );
|
768 |
-
|
769 |
-
$options[] = array( 'name' => __( 'Web Font Family', 'wprmenu' ),
|
770 |
-
'class' => 'wpr_web_font_family pro-feature',
|
771 |
-
'id' => 'google_web_font_family',
|
772 |
-
'std' => '',
|
773 |
-
'options' => wpr_google_web_fonts(),
|
774 |
-
'type' => 'select' );
|
775 |
-
|
776 |
-
|
777 |
-
$options[] = array( 'name' => __( 'Icons <span class="badge badge-info">Pro</span>', 'wprmenu' ),
|
778 |
-
'type' => 'heading' );
|
779 |
-
|
780 |
-
$options[] = array( 'name' => __( 'Menu Icon Type', 'wprmenu' ),
|
781 |
-
'id' => 'menu_icon_type',
|
782 |
-
'std' => 'default',
|
783 |
-
'class' => 'pro-feature',
|
784 |
-
'options' => array( 'default' => 'Default','custom' => 'Custom' ),
|
785 |
-
'type' => 'radio' );
|
786 |
-
|
787 |
-
$options[] = array( 'name' => __( 'Menu Icon Font Size', 'wprmenu' ),
|
788 |
-
'id' => 'custom_menu_font_size',
|
789 |
-
'class' => 'mini pro-feature',
|
790 |
-
'std' => '40',
|
791 |
-
'type' => 'text' );
|
792 |
-
|
793 |
-
$options[] = array( 'name' => __( 'Menu Top Position', 'wprmenu' ),
|
794 |
-
'desc' => __( 'Menu icon position from top', 'wprmenu' ),
|
795 |
-
'id' => 'custom_menu_icon_top',
|
796 |
-
'class' => 'mini pro-feature',
|
797 |
-
'std' => '-7',
|
798 |
-
'type' => 'text' );
|
799 |
-
|
800 |
-
$options[] = array('name' => __('Menu Icon', 'wprmenu'),
|
801 |
-
'id' => 'menu_icon',
|
802 |
-
'std' => 'wpr-icon-menu',
|
803 |
-
'class' => 'mini pro-feature',
|
804 |
-
'type' => 'icon');
|
805 |
-
|
806 |
-
$options[] = array('name' => __('Menu Active Icon', 'wprmenu'),
|
807 |
-
'id' => 'menu_close_icon',
|
808 |
-
'std' => 'wpr-icon-cancel2',
|
809 |
-
'class' => 'mini pro-feature',
|
810 |
-
'type' => 'icon');
|
811 |
-
|
812 |
-
$options[] = array('name' => __('Submenu Open Icon', 'wprmenu'),
|
813 |
-
'desc' => __('This icon will appear for the menu items having submenu. Which will be used to expand the submenu.', 'wprmenu'),
|
814 |
-
'id' => 'submenu_open_icon',
|
815 |
-
'std' => 'wpr-icon-plus',
|
816 |
-
'class' => 'mini pro-feature',
|
817 |
-
'type' => 'icon');
|
818 |
-
|
819 |
-
$options[] = array('name' => __('Submenu Close Icon', 'wprmenu'),
|
820 |
-
'desc' => __('This icon will appear for closing an expanded submenu.', 'wprmenu'),
|
821 |
-
'id' => 'submenu_close_icon',
|
822 |
-
'class' => 'mini pro-feature',
|
823 |
-
'std' => 'wpr-icon-minus',
|
824 |
-
'type' => 'icon');
|
825 |
-
|
826 |
-
$options[] = array('name' => __('Search Icon', 'wprmenu'),
|
827 |
-
'id' => 'search_icon',
|
828 |
-
'class' => 'mini pro-feature',
|
829 |
-
'std' => 'wpr-icon-search',
|
830 |
-
'type' => 'icon');
|
831 |
-
|
832 |
-
//Show option if woocommerce is installed and activated
|
833 |
-
if( woocommerce_installed() ) :
|
834 |
-
|
835 |
-
$options[] = array('name' => __('Cart icon', 'wprmenu'),
|
836 |
-
'desc' => __('Select Cart icon', 'wprmenu'),
|
837 |
-
'id' => 'cart-icon',
|
838 |
-
'class' => 'mini pro-feature',
|
839 |
-
'std' => 'wpr-icon-cart',
|
840 |
-
'type' => 'icon');
|
841 |
-
|
842 |
-
endif;
|
843 |
-
|
844 |
-
$options[] = array( 'name' => __( 'Social <span class="badge badge-info">Pro</span>', 'wprmenu' ),
|
845 |
-
'type' => 'heading' );
|
846 |
-
|
847 |
-
$options[] = array( 'name' => __( 'Social Icon Font Size', 'wprmenu' ),
|
848 |
-
'id' => 'social_icon_font_size',
|
849 |
-
'class' => 'mini pro-feature',
|
850 |
-
'std' => '16',
|
851 |
-
'type' => 'text' );
|
852 |
-
|
853 |
-
$options[] = array('name' => __('Add Your Social Links', 'wprmenu'),
|
854 |
-
'id' => 'social',
|
855 |
-
'class' => 'pro-feature',
|
856 |
-
'std' => '',
|
857 |
-
'type' => 'social');
|
858 |
-
|
859 |
-
$options[] = array( 'name' => __( 'Demo Data', 'wprmenu' ),
|
860 |
-
'type' => 'heading' );
|
861 |
-
|
862 |
-
$options[] = array('name' => __('Showcase', 'wprmenu'),
|
863 |
-
'id' => 'wprmenu_showcase',
|
864 |
-
'class' => 'pro',
|
865 |
-
'std' => '',
|
866 |
-
'type' => 'showcase');
|
867 |
-
return $options;
|
868 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/wprmclass.php
CHANGED
File without changes
|
inc/wprmenu-framework.php
CHANGED
File without changes
|
inc/wprmenu-loader.php
CHANGED
@@ -19,7 +19,7 @@ final class WPR_Menu_Loader {
|
|
19 |
*
|
20 |
* @var string
|
21 |
*/
|
22 |
-
public $version = '3.1.
|
23 |
|
24 |
|
25 |
/**
|
19 |
*
|
20 |
* @var string
|
21 |
*/
|
22 |
+
public $version = '3.1.6';
|
23 |
|
24 |
|
25 |
/**
|
inc/wprmenu-options.php
CHANGED
@@ -104,19 +104,19 @@ function wpr_optionsframework_options() {
|
|
104 |
$options[] = array( 'name' => __( 'Enable Responsive Menu', 'wprmenu' ),
|
105 |
'desc' => __( 'Turn on if you want to enable WP Responsive Menu functionality on your site.', 'wprmenu' ),
|
106 |
'id' => 'enabled',
|
107 |
-
'std' => '
|
108 |
'type' => 'checkbox' );
|
109 |
|
110 |
$options[] = array( 'name' => __( 'Live Preview', 'wprmenu' ),
|
111 |
'desc' => __( 'Enable this option to see a live preview of menu directly on your dashboard.', 'wprmenu' ),
|
112 |
'id' => 'wpr_live_preview',
|
113 |
-
'std' => '
|
114 |
'type' => 'checkbox' );
|
115 |
|
116 |
$options[] = array( 'name' => __( 'Search Input Within Menu', 'wprmenu' ),
|
117 |
'desc' => __( 'Enables the display of search input box inside the menu.', 'wprmenu' ),
|
118 |
'id' => 'search_box_menu_block',
|
119 |
-
'std' => '
|
120 |
'type' => 'checkbox' );
|
121 |
|
122 |
$options[] = array( 'name' => __( 'Enable Widget Menu', 'wprmenu' ),
|
@@ -487,7 +487,7 @@ function wpr_optionsframework_options() {
|
|
487 |
$options[] = array( 'name' => __( 'Enable Menu Background Overlay', 'wprmenu' ),
|
488 |
'desc' => __( 'Turn on if you want to enable Menu Background Overlay.', 'wprmenu' ),
|
489 |
'id' => 'enable_overlay',
|
490 |
-
'std' => '
|
491 |
'type' => 'checkbox' );
|
492 |
|
493 |
$options[] = array( 'name' => __( 'Menu Background Overlay Opacity', 'wprmenu' ),
|
@@ -499,7 +499,7 @@ function wpr_optionsframework_options() {
|
|
499 |
$options[] = array( 'name' => __( 'Hide Menu Bar On Scroll', 'wprmenu' ),
|
500 |
'desc' => __( 'Turn on if you want to hide menu bar on scroll.', 'wprmenu' ),
|
501 |
'id' => 'hide_menubar_on_scroll',
|
502 |
-
'std' => '
|
503 |
'class' => 'pro-feature',
|
504 |
'type' => 'checkbox' );
|
505 |
|
104 |
$options[] = array( 'name' => __( 'Enable Responsive Menu', 'wprmenu' ),
|
105 |
'desc' => __( 'Turn on if you want to enable WP Responsive Menu functionality on your site.', 'wprmenu' ),
|
106 |
'id' => 'enabled',
|
107 |
+
'std' => '0',
|
108 |
'type' => 'checkbox' );
|
109 |
|
110 |
$options[] = array( 'name' => __( 'Live Preview', 'wprmenu' ),
|
111 |
'desc' => __( 'Enable this option to see a live preview of menu directly on your dashboard.', 'wprmenu' ),
|
112 |
'id' => 'wpr_live_preview',
|
113 |
+
'std' => '0',
|
114 |
'type' => 'checkbox' );
|
115 |
|
116 |
$options[] = array( 'name' => __( 'Search Input Within Menu', 'wprmenu' ),
|
117 |
'desc' => __( 'Enables the display of search input box inside the menu.', 'wprmenu' ),
|
118 |
'id' => 'search_box_menu_block',
|
119 |
+
'std' => '0',
|
120 |
'type' => 'checkbox' );
|
121 |
|
122 |
$options[] = array( 'name' => __( 'Enable Widget Menu', 'wprmenu' ),
|
487 |
$options[] = array( 'name' => __( 'Enable Menu Background Overlay', 'wprmenu' ),
|
488 |
'desc' => __( 'Turn on if you want to enable Menu Background Overlay.', 'wprmenu' ),
|
489 |
'id' => 'enable_overlay',
|
490 |
+
'std' => '0',
|
491 |
'type' => 'checkbox' );
|
492 |
|
493 |
$options[] = array( 'name' => __( 'Menu Background Overlay Opacity', 'wprmenu' ),
|
499 |
$options[] = array( 'name' => __( 'Hide Menu Bar On Scroll', 'wprmenu' ),
|
500 |
'desc' => __( 'Turn on if you want to hide menu bar on scroll.', 'wprmenu' ),
|
501 |
'id' => 'hide_menubar_on_scroll',
|
502 |
+
'std' => '0',
|
503 |
'class' => 'pro-feature',
|
504 |
'type' => 'checkbox' );
|
505 |
|
inc/wprmenu-styles.php
CHANGED
@@ -111,7 +111,7 @@ if ( ! class_exists('WPRMenu_Styles') ) {
|
|
111 |
html body div#mg-wprm-wrap .wpr_submit .icon.icon-search {
|
112 |
color: '.$this->wprmenu_option( 'search_icon_color' ).';
|
113 |
}
|
114 |
-
#wprmenu_bar .menu_title, #wprmenu_bar .wprmenu_icon_menu {
|
115 |
color: '.$this->wprmenu_option( 'bar_color' ).';
|
116 |
}
|
117 |
#wprmenu_bar .menu_title {
|
@@ -154,7 +154,10 @@ if ( ! class_exists('WPRMenu_Styles') ) {
|
|
154 |
}
|
155 |
#mg-wprm-wrap ul#wprmenu_menu_ul li.menu-item a,
|
156 |
div#mg-wprm-wrap ul li span.wprmenu_icon {
|
157 |
-
color: '.$this->wprmenu_option( 'menu_color' ).'
|
|
|
|
|
|
|
158 |
}
|
159 |
#mg-wprm-wrap ul#wprmenu_menu_ul li.menu-item a:hover {
|
160 |
background: '.$this->wprmenu_option( 'menu_textovrbgd' ).';
|
111 |
html body div#mg-wprm-wrap .wpr_submit .icon.icon-search {
|
112 |
color: '.$this->wprmenu_option( 'search_icon_color' ).';
|
113 |
}
|
114 |
+
#wprmenu_bar .menu_title, #wprmenu_bar .wprmenu_icon_menu, #wprmenu_bar .menu_title a {
|
115 |
color: '.$this->wprmenu_option( 'bar_color' ).';
|
116 |
}
|
117 |
#wprmenu_bar .menu_title {
|
154 |
}
|
155 |
#mg-wprm-wrap ul#wprmenu_menu_ul li.menu-item a,
|
156 |
div#mg-wprm-wrap ul li span.wprmenu_icon {
|
157 |
+
color: '.$this->wprmenu_option( 'menu_color' ).';
|
158 |
+
}
|
159 |
+
#mg-wprm-wrap ul#wprmenu_menu_ul li.menu-item:valid ~ a{
|
160 |
+
color: '.$this->wprmenu_option( 'active_menu_color' ).';
|
161 |
}
|
162 |
#mg-wprm-wrap ul#wprmenu_menu_ul li.menu-item a:hover {
|
163 |
background: '.$this->wprmenu_option( 'menu_textovrbgd' ).';
|
js/jquery.touchSwipe.min.js
CHANGED
File without changes
|
js/modernizr.custom.js
CHANGED
File without changes
|
languages/wprmenu-en_US.mo
CHANGED
File without changes
|
languages/wprmenu-en_US.po
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: sagarseth9,magnigenie,kshirod-patel
|
|
3 |
Tags: WordPress Responsive Menu, Genesis responsive menu, Genesis Mobile Menu, Thesis Mobile Menu, Thesis Responsive Menu, Mobile Menu, Responsive Menu Plugin, WP Responsive Menu, WordPress mobile menu
|
4 |
Requires at least: 3.0
|
5 |
Requires PHP: 5.4
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 3.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -86,6 +86,17 @@ If you have any suggestions for a new plugin, feel free to email us at info@mag
|
|
86 |
|
87 |
== ChangeLog ==
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
= Version 3.1.4 =
|
90 |
|
91 |
* Changed core structure
|
3 |
Tags: WordPress Responsive Menu, Genesis responsive menu, Genesis Mobile Menu, Thesis Mobile Menu, Thesis Responsive Menu, Mobile Menu, Responsive Menu Plugin, WP Responsive Menu, WordPress mobile menu
|
4 |
Requires at least: 3.0
|
5 |
Requires PHP: 5.4
|
6 |
+
Tested up to: 5.7.2
|
7 |
+
Stable tag: 3.1.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
86 |
|
87 |
== ChangeLog ==
|
88 |
|
89 |
+
= Version 3.1.6 =
|
90 |
+
|
91 |
+
* Removed unused files
|
92 |
+
* Admin settings Checkbox Enable/Disable issue fixed
|
93 |
+
* Fixed blank value saving issue
|
94 |
+
|
95 |
+
= Version 3.1.5 =
|
96 |
+
|
97 |
+
* Tested with latest WordPress and PHP.
|
98 |
+
* Fixed issues related PHP 8.0
|
99 |
+
|
100 |
= Version 3.1.4 =
|
101 |
|
102 |
* Changed core structure
|
wp-responsive-menu.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Description: WP Responsive Menu is mobile menu plugin that lets you add a highly customizable responsive menu to any WordPress site in no time.
|
5 |
* Plugin URI: http://magnigenie.com/wp-responsive-menu-mobile-menu-plugin-wordpress?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
|
6 |
* Author: MagniGenie
|
7 |
-
* Version: 3.1.
|
8 |
* Author URI: http://magnigenie.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
|
9 |
* Text Domain: wprmenu
|
10 |
* Domain Path: /languages/
|
4 |
* Description: WP Responsive Menu is mobile menu plugin that lets you add a highly customizable responsive menu to any WordPress site in no time.
|
5 |
* Plugin URI: http://magnigenie.com/wp-responsive-menu-mobile-menu-plugin-wordpress?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
|
6 |
* Author: MagniGenie
|
7 |
+
* Version: 3.1.6
|
8 |
* Author URI: http://magnigenie.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
|
9 |
* Text Domain: wprmenu
|
10 |
* Domain Path: /languages/
|