Version Description
- Fix! - 403 error when quick editing
- Fix! - Visual tool fix
Download this release
Release Info
Developer | takanakui |
Plugin | WP Mobile Menu |
Version | 2.8.1.8 |
Comparing to | |
See all releases |
Code changes from version 2.8.1.7 to 2.8.1.8
includes/css/mobmenu-admin.css
CHANGED
@@ -637,4 +637,5 @@ td.second.tf-multicheck-pages fieldset {
|
|
637 |
background: #fefdfd;
|
638 |
border: 15px solid #222020;
|
639 |
border-radius: 25px;
|
|
|
640 |
}
|
637 |
background: #fefdfd;
|
638 |
border: 15px solid #222020;
|
639 |
border-radius: 25px;
|
640 |
+
z-index:9999;
|
641 |
}
|
includes/js/mobmenu-admin.js
CHANGED
@@ -21,8 +21,6 @@
|
|
21 |
|
22 |
$( '#mobmenu_hide_elements' ).after( '<a href="#" class="mobmenu-find-element">Find element</a>' );
|
23 |
$('body').append('<iframe class="mobmenu-preview-iframe" scrolling="no" id="mobmenu-preview-iframe" width="380" height="650" >');
|
24 |
-
setTimeout(function(){ $( '#mobmenu-preview-iframe' ).attr( 'src', document.location.protocol + '//' + document.location.hostname + '/?mobmenu-action=find-element' ); }, 3000);
|
25 |
-
|
26 |
|
27 |
// Initilialize the CodeMirror on the custom CSS option.
|
28 |
if ( $('#mobmenu_custom_css').length > 0 ) {
|
@@ -457,6 +455,10 @@
|
|
457 |
$( document ).on( 'click', ' .mobmenu-find-element' , function( e ) {
|
458 |
|
459 |
e.preventDefault();
|
|
|
|
|
|
|
|
|
460 |
$( '#mobmenu-preview-iframe' ).show();
|
461 |
});
|
462 |
|
21 |
|
22 |
$( '#mobmenu_hide_elements' ).after( '<a href="#" class="mobmenu-find-element">Find element</a>' );
|
23 |
$('body').append('<iframe class="mobmenu-preview-iframe" scrolling="no" id="mobmenu-preview-iframe" width="380" height="650" >');
|
|
|
|
|
24 |
|
25 |
// Initilialize the CodeMirror on the custom CSS option.
|
26 |
if ( $('#mobmenu_custom_css').length > 0 ) {
|
455 |
$( document ).on( 'click', ' .mobmenu-find-element' , function( e ) {
|
456 |
|
457 |
e.preventDefault();
|
458 |
+
var href = window.location.href;
|
459 |
+
var index = href.indexOf('/wp-admin');
|
460 |
+
var homeUrl = href.substring(0, index);
|
461 |
+
$( '#mobmenu-preview-iframe' ).attr( 'src', homeUrl + '/?mobmenu-action=find-element' );
|
462 |
$( '#mobmenu-preview-iframe' ).show();
|
463 |
});
|
464 |
|
includes/js/mobmenu.js
CHANGED
@@ -9,77 +9,64 @@
|
|
9 |
*/
|
10 |
|
11 |
"use strict";
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
document.getElementById('m_on').addEventListener('click', () => {
|
71 |
-
p.on();
|
72 |
-
});
|
73 |
-
document.getElementById('m_off').addEventListener('click', () => {
|
74 |
-
p.off();
|
75 |
-
});
|
76 |
-
document.getElementById('m_cover').addEventListener('click', () => {
|
77 |
-
p.changeMode('cover');
|
78 |
-
});
|
79 |
-
document.getElementById('m_target').addEventListener('click', () => {
|
80 |
-
p.changeMode('target');
|
81 |
-
});
|
82 |
-
}
|
83 |
jQuery( document ).ready( function($) {
|
84 |
|
85 |
const urlParams = new URLSearchParams( window.location.search );
|
9 |
*/
|
10 |
|
11 |
"use strict";
|
12 |
+
function getSelector(el){
|
13 |
+
var $el = jQuery(el);
|
14 |
+
|
15 |
+
var id = $el.attr("id");
|
16 |
+
if (id) { //"should" only be one of these if theres an ID
|
17 |
+
return "#"+ id;
|
18 |
+
}
|
19 |
+
|
20 |
+
var selector = $el.parents()
|
21 |
+
.map(function() { return this.tagName; })
|
22 |
+
.get().reverse().join(" ");
|
23 |
+
|
24 |
+
if (selector) {
|
25 |
+
selector += " "+ $el[0].nodeName;
|
26 |
+
}
|
27 |
+
|
28 |
+
var classNames = $el.attr("class");
|
29 |
+
if (classNames) {
|
30 |
+
selector += "." + jQuery.trim(classNames).replace(/\s/gi, ".");
|
31 |
+
}
|
32 |
+
|
33 |
+
var name = $el.attr('name');
|
34 |
+
if (name) {
|
35 |
+
selector += "[name='" + name + "']";
|
36 |
+
}
|
37 |
+
if (!name){
|
38 |
+
var index = $el.index();
|
39 |
+
if (index) {
|
40 |
+
index = index + 1;
|
41 |
+
selector += ":nth-child(" + index + ")";
|
42 |
+
}
|
43 |
+
}
|
44 |
+
return selector;
|
45 |
+
}
|
46 |
+
function enableMobileMenuElementPicker(){
|
47 |
+
const p = new Picker({
|
48 |
+
elm: document.getElementById('elm1'),
|
49 |
+
mode: 'cover',
|
50 |
+
excludeElmName: ['body'],
|
51 |
+
events: [{
|
52 |
+
key: 'contextmenu',
|
53 |
+
fn(event) {
|
54 |
+
event.preventDefault();
|
55 |
+
},
|
56 |
+
}],
|
57 |
+
onInit() {
|
58 |
+
},
|
59 |
+
onClick(event) {
|
60 |
+
var selector = getSelector(event.target).toLowerCase();
|
61 |
+
window.parent.receivePickedElement(selector);
|
62 |
+
jQuery(selector).hide();
|
63 |
+
},
|
64 |
+
onHover(event) {
|
65 |
+
},
|
66 |
+
});
|
67 |
+
|
68 |
+
}
|
69 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
jQuery( document ).ready( function($) {
|
71 |
|
72 |
const urlParams = new URLSearchParams( window.location.search );
|
mobmenu.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Plugin Name: Mobile Menu
|
5 |
* Description: An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.
|
6 |
-
* Version: 2.8.1.
|
7 |
* Plugin URI: https://www.wpmobilemenu.com/
|
8 |
* Author: Rui Guerreiro
|
9 |
* Author URI: https://www.jedipress.com/
|
@@ -16,7 +16,7 @@
|
|
16 |
if ( !defined( 'ABSPATH' ) ) {
|
17 |
die;
|
18 |
}
|
19 |
-
define( 'WP_MOBILE_MENU_VERSION', '2.8.1.
|
20 |
define( 'WP_MOBILE_MENU_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
21 |
define( 'WP_MOBILE_MENU_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
22 |
if ( !class_exists( 'WP_Mobile_Menu' ) ) {
|
@@ -172,8 +172,13 @@ if ( !class_exists( 'WP_Mobile_Menu' ) ) {
|
|
172 |
$mobmenu_options = TitanFramework::getInstance( 'mobmenu' );
|
173 |
$is_mobile_only = $mobmenu_options->getOption( 'only_mobile_devices' );
|
174 |
$is_testing_mode = $mobmenu_options->getOption( 'only_testing_mode' );
|
175 |
-
|
176 |
-
|
|
|
|
|
|
|
|
|
|
|
177 |
// Enqueue Html to the Footer.
|
178 |
add_action( 'wp_footer', array( $this->mobmenu_core, 'load_menu_html_markup' ) );
|
179 |
// Frontend Scripts.
|
@@ -259,8 +264,13 @@ if ( isset( $admin_options['only_mobile_devices'] ) ) {
|
|
259 |
$is_mobile_only = false;
|
260 |
}
|
261 |
|
|
|
|
|
|
|
|
|
|
|
262 |
|
263 |
-
if ( is_admin() || (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
|
264 |
// Instanciate the WP_Mobile_Menu.
|
265 |
$mobile_menu_instance = new WP_Mobile_Menu();
|
266 |
$mobile_menu_instance->init_mobile_menu();
|
3 |
/**
|
4 |
* Plugin Name: Mobile Menu
|
5 |
* Description: An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.
|
6 |
+
* Version: 2.8.1.8
|
7 |
* Plugin URI: https://www.wpmobilemenu.com/
|
8 |
* Author: Rui Guerreiro
|
9 |
* Author URI: https://www.jedipress.com/
|
16 |
if ( !defined( 'ABSPATH' ) ) {
|
17 |
die;
|
18 |
}
|
19 |
+
define( 'WP_MOBILE_MENU_VERSION', '2.8.1.8' );
|
20 |
define( 'WP_MOBILE_MENU_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
21 |
define( 'WP_MOBILE_MENU_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
22 |
if ( !class_exists( 'WP_Mobile_Menu' ) ) {
|
172 |
$mobmenu_options = TitanFramework::getInstance( 'mobmenu' );
|
173 |
$is_mobile_only = $mobmenu_options->getOption( 'only_mobile_devices' );
|
174 |
$is_testing_mode = $mobmenu_options->getOption( 'only_testing_mode' );
|
175 |
+
$mobmenu_action = '';
|
176 |
+
|
177 |
+
if ( isset($_GET['mobmenu-action']) ) {
|
178 |
+
$mobmenu_action = $_GET['mobmenu-action'];
|
179 |
+
}
|
180 |
+
|
181 |
+
if ( $mobmenu_action == 'find-element' || $is_testing_mode && current_user_can( 'administrator' ) || !$is_testing_mode && (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
|
182 |
// Enqueue Html to the Footer.
|
183 |
add_action( 'wp_footer', array( $this->mobmenu_core, 'load_menu_html_markup' ) );
|
184 |
// Frontend Scripts.
|
264 |
$is_mobile_only = false;
|
265 |
}
|
266 |
|
267 |
+
$mobmenu_action = '';
|
268 |
+
|
269 |
+
if ( isset($_GET['mobmenu-action']) ) {
|
270 |
+
$mobmenu_action = $_GET['mobmenu-action'];
|
271 |
+
}
|
272 |
|
273 |
+
if ( $mobmenu_action == 'find-element' || is_admin() || (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
|
274 |
// Instanciate the WP_Mobile_Menu.
|
275 |
$mobile_menu_instance = new WP_Mobile_Menu();
|
276 |
$mobile_menu_instance->init_mobile_menu();
|
options-framework/titan-framework/lib/class-meta-box.php
CHANGED
@@ -143,6 +143,11 @@ class TitanFrameworkMetaBox {
|
|
143 |
return false;
|
144 |
}
|
145 |
|
|
|
|
|
|
|
|
|
|
|
146 |
// Don't save on autosave
|
147 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
148 |
return false;
|
143 |
return false;
|
144 |
}
|
145 |
|
146 |
+
// Don't save on inline edit.
|
147 |
+
if ( !empty( $_POST['action'] ) && $_POST['action'] == 'inline-save' ) {
|
148 |
+
return false;
|
149 |
+
}
|
150 |
+
|
151 |
// Don't save on autosave
|
152 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
153 |
return false;
|
options-framework/titan-framework/lib/class-titan-css.php
CHANGED
@@ -95,7 +95,14 @@ class TitanFrameworkCSS
|
|
95 |
$mobmenu_options = TitanFramework::getInstance( 'mobmenu' );
|
96 |
$is_mobile_only = $mobmenu_options->getOption( 'only_mobile_devices' );
|
97 |
$is_testing_mode = $mobmenu_options->getOption( 'only_testing_mode' );
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
// Only enqueue the generated css if we have the settings for it.
|
100 |
|
101 |
if ( $this->frameworkInstance->settings['css'] == 'generate' ) {
|
95 |
$mobmenu_options = TitanFramework::getInstance( 'mobmenu' );
|
96 |
$is_mobile_only = $mobmenu_options->getOption( 'only_mobile_devices' );
|
97 |
$is_testing_mode = $mobmenu_options->getOption( 'only_testing_mode' );
|
98 |
+
|
99 |
+
$mobmenu_action = '';
|
100 |
+
|
101 |
+
if ( isset($_GET['mobmenu-action']) ) {
|
102 |
+
$mobmenu_action = $_GET['mobmenu-action'];
|
103 |
+
}
|
104 |
+
|
105 |
+
if ( $mobmenu_action == 'find-element' || $is_testing_mode && current_user_can( 'administrator' ) || !$is_testing_mode && (!$is_mobile_only || $is_mobile_only && wp_is_mobile()) ) {
|
106 |
// Only enqueue the generated css if we have the settings for it.
|
107 |
|
108 |
if ( $this->frameworkInstance->settings['css'] == 'generate' ) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ link: http://profiles.wordpress.org/takanakui
|
|
4 |
Tags: mobile, navigation, responsive, menu, responsive menu, mobile menu, tablet menu, hamburger menu, hamburger, wordpress responsive menu, wordpress mobile menu, canvas menu
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 5.6
|
7 |
-
Stable tag: 2.8.1.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -132,6 +132,10 @@ Not available at the moment
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
|
|
|
|
|
|
|
|
135 |
= 2.8.1.7 =
|
136 |
* New! - Visual tool to identify menus and other elements to hide
|
137 |
|
4 |
Tags: mobile, navigation, responsive, menu, responsive menu, mobile menu, tablet menu, hamburger menu, hamburger, wordpress responsive menu, wordpress mobile menu, canvas menu
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 2.8.1.8
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 2.8.1.8 =
|
136 |
+
* Fix! - 403 error when quick editing
|
137 |
+
* Fix! - Visual tool fix
|
138 |
+
|
139 |
= 2.8.1.7 =
|
140 |
* New! - Visual tool to identify menus and other elements to hide
|
141 |
|