Version Description
- Improvement: Styling improvements to color picker
- New feature: Add "Close sub menu after click" option to menu item options
- New feature: Add "First click will follow the link (the arrow must be used to toggle sub menu visiblity)" to second click options
- Fix: PHP 8.0 compatibility
- Fix: Expanded mobile sub menus collapse if page background is clicked, even when "Mobile state" is set to "Expand all"
- Fix: Only reverse right aligned items on mobile when the menu orientation is Horizontal
- Fix: Widgets without any content will no longer be output (instead of displaying the widget ID)
Download this release
Release Info
Developer | megamenu |
Plugin | Max Mega Menu |
Version | 2.9.4 |
Comparing to | |
See all releases |
Code changes from version 2.9.3 to 2.9.4
- classes/menu-item-manager.class.php +19 -10
- classes/nav-menus.class.php +1 -0
- classes/pages/general.php +0 -1
- classes/pages/locations.php +8 -3
- classes/pages/themes.php +4 -2
- classes/walker.class.php +6 -2
- classes/widget-manager.class.php +1 -2
- css/admin/admin.css +11 -5
- css/admin/admin.scss +8 -3
- css/megamenu.scss +0 -1
- js/maxmegamenu.js +13 -2
- megamenu.php +7 -3
- readme.txt +12 -2
classes/menu-item-manager.class.php
CHANGED
@@ -114,7 +114,7 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
114 |
// only check the checkbox values if the general settings form was submitted
|
115 |
if ( isset( $_POST['tab'] ) && $_POST['tab'] == 'general_settings' ) {
|
116 |
|
117 |
-
$checkboxes = array( 'hide_text', 'disable_link', 'hide_arrow', 'hide_on_mobile', 'hide_on_desktop', 'hide_sub_menu_on_mobile', 'collapse_children' );
|
118 |
|
119 |
foreach ( $checkboxes as $checkbox ) {
|
120 |
if ( ! isset( $submitted_settings[ $checkbox ] ) ) {
|
@@ -644,7 +644,7 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
644 |
$return .= ' <table>';
|
645 |
$return .= ' <tr>';
|
646 |
$return .= ' <td class="mega-name">';
|
647 |
-
$return .= __( 'Hide
|
648 |
$return .= ' </td>';
|
649 |
$return .= ' <td class="mega-value">';
|
650 |
$return .= ' <input type="checkbox" name="settings[hide_text]" value="true" ' . checked( $menu_item_meta['hide_text'], 'true', false ) . ' />';
|
@@ -652,7 +652,7 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
652 |
$return .= ' </tr>';
|
653 |
$return .= ' <tr>';
|
654 |
$return .= ' <td class="mega-name">';
|
655 |
-
$return .= __( 'Hide
|
656 |
$return .= ' </td>';
|
657 |
$return .= ' <td class="mega-value">';
|
658 |
$return .= ' <input type="checkbox" name="settings[hide_arrow]" value="true" ' . checked( $menu_item_meta['hide_arrow'], 'true', false ) . ' />';
|
@@ -660,7 +660,7 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
660 |
$return .= ' </tr>';
|
661 |
$return .= ' <tr>';
|
662 |
$return .= ' <td class="mega-name">';
|
663 |
-
$return .= __( 'Disable
|
664 |
$return .= ' </td>';
|
665 |
$return .= ' <td class="mega-value">';
|
666 |
$return .= ' <input type="checkbox" name="settings[disable_link]" value="true" ' . checked( $menu_item_meta['disable_link'], 'true', false ) . ' />';
|
@@ -668,7 +668,7 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
668 |
$return .= ' </tr>';
|
669 |
$return .= ' <tr>';
|
670 |
$return .= ' <td class="mega-name">';
|
671 |
-
$return .= __( 'Hide
|
672 |
$return .= ' </td>';
|
673 |
$return .= ' <td class="mega-value">';
|
674 |
$return .= ' <input type="checkbox" name="settings[hide_on_mobile]" value="true" ' . checked( $menu_item_meta['hide_on_mobile'], 'true', false ) . ' />';
|
@@ -676,15 +676,24 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
676 |
$return .= ' </tr>';
|
677 |
$return .= ' <tr>';
|
678 |
$return .= ' <td class="mega-name">';
|
679 |
-
$return .= __( 'Hide
|
680 |
$return .= ' </td>';
|
681 |
$return .= ' <td class="mega-value">';
|
682 |
$return .= ' <input type="checkbox" name="settings[hide_on_desktop]" value="true" ' . checked( $menu_item_meta['hide_on_desktop'], 'true', false ) . ' />';
|
683 |
$return .= ' </td>';
|
684 |
$return .= ' </tr>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
$return .= ' <tr class="mega-menu-item-align">';
|
686 |
$return .= ' <td class="mega-name">';
|
687 |
-
$return .= __( 'Menu
|
688 |
$return .= ' </td>';
|
689 |
$return .= ' <td class="mega-value">';
|
690 |
|
@@ -714,7 +723,7 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
714 |
$return .= ' </tr>';
|
715 |
$return .= ' <tr class="mega-menu-icon-position">';
|
716 |
$return .= ' <td class="mega-name">';
|
717 |
-
$return .= __( 'Icon
|
718 |
$return .= ' </td>';
|
719 |
$return .= ' <td class="mega-value">';
|
720 |
$return .= ' <select name="settings[icon_position]">';
|
@@ -735,7 +744,7 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
735 |
$return .= ' <table>';
|
736 |
$return .= ' <tr class="mega-sub-menu-align">';
|
737 |
$return .= ' <td class="mega-name">';
|
738 |
-
$return .= __( 'Sub
|
739 |
$return .= ' </td>';
|
740 |
$return .= ' <td class="mega-value">';
|
741 |
|
@@ -755,7 +764,7 @@ if ( ! class_exists( 'Mega_Menu_Menu_Item_Manager' ) ) :
|
|
755 |
$return .= ' </tr>';
|
756 |
$return .= ' <tr>';
|
757 |
$return .= ' <td class="mega-name">';
|
758 |
-
$return .= __( 'Hide
|
759 |
$return .= ' </td>';
|
760 |
$return .= ' <td class="mega-value">';
|
761 |
$return .= ' <input type="checkbox" name="settings[hide_sub_menu_on_mobile]" value="true" ' . checked( $menu_item_meta['hide_sub_menu_on_mobile'], 'true', false ) . ' />';
|
114 |
// only check the checkbox values if the general settings form was submitted
|
115 |
if ( isset( $_POST['tab'] ) && $_POST['tab'] == 'general_settings' ) {
|
116 |
|
117 |
+
$checkboxes = array( 'hide_text', 'disable_link', 'hide_arrow', 'hide_on_mobile', 'hide_on_desktop', 'close_after_click', 'hide_sub_menu_on_mobile', 'collapse_children' );
|
118 |
|
119 |
foreach ( $checkboxes as $checkbox ) {
|
120 |
if ( ! isset( $submitted_settings[ $checkbox ] ) ) {
|
644 |
$return .= ' <table>';
|
645 |
$return .= ' <tr>';
|
646 |
$return .= ' <td class="mega-name">';
|
647 |
+
$return .= __( 'Hide text', 'megamenu' );
|
648 |
$return .= ' </td>';
|
649 |
$return .= ' <td class="mega-value">';
|
650 |
$return .= ' <input type="checkbox" name="settings[hide_text]" value="true" ' . checked( $menu_item_meta['hide_text'], 'true', false ) . ' />';
|
652 |
$return .= ' </tr>';
|
653 |
$return .= ' <tr>';
|
654 |
$return .= ' <td class="mega-name">';
|
655 |
+
$return .= __( 'Hide arrow', 'megamenu' );
|
656 |
$return .= ' </td>';
|
657 |
$return .= ' <td class="mega-value">';
|
658 |
$return .= ' <input type="checkbox" name="settings[hide_arrow]" value="true" ' . checked( $menu_item_meta['hide_arrow'], 'true', false ) . ' />';
|
660 |
$return .= ' </tr>';
|
661 |
$return .= ' <tr>';
|
662 |
$return .= ' <td class="mega-name">';
|
663 |
+
$return .= __( 'Disable link', 'megamenu' );
|
664 |
$return .= ' </td>';
|
665 |
$return .= ' <td class="mega-value">';
|
666 |
$return .= ' <input type="checkbox" name="settings[disable_link]" value="true" ' . checked( $menu_item_meta['disable_link'], 'true', false ) . ' />';
|
668 |
$return .= ' </tr>';
|
669 |
$return .= ' <tr>';
|
670 |
$return .= ' <td class="mega-name">';
|
671 |
+
$return .= __( 'Hide item on mobile', 'megamenu' );
|
672 |
$return .= ' </td>';
|
673 |
$return .= ' <td class="mega-value">';
|
674 |
$return .= ' <input type="checkbox" name="settings[hide_on_mobile]" value="true" ' . checked( $menu_item_meta['hide_on_mobile'], 'true', false ) . ' />';
|
676 |
$return .= ' </tr>';
|
677 |
$return .= ' <tr>';
|
678 |
$return .= ' <td class="mega-name">';
|
679 |
+
$return .= __( 'Hide item on desktop', 'megamenu' );
|
680 |
$return .= ' </td>';
|
681 |
$return .= ' <td class="mega-value">';
|
682 |
$return .= ' <input type="checkbox" name="settings[hide_on_desktop]" value="true" ' . checked( $menu_item_meta['hide_on_desktop'], 'true', false ) . ' />';
|
683 |
$return .= ' </td>';
|
684 |
$return .= ' </tr>';
|
685 |
+
$return .= ' <td class="mega-name">';
|
686 |
+
$return .= __( 'Close sub menu when clicked', 'megamenu' );
|
687 |
+
$return .= ' </td>';
|
688 |
+
$return .= ' <td class="mega-value">';
|
689 |
+
$return .= ' <input type="checkbox" name="settings[close_after_click]" value="true" ' . checked( $menu_item_meta['close_after_click'], 'true', false ) . ' />';
|
690 |
+
$return .= ' <div class="mega-description">';
|
691 |
+
$return .= __( 'Intended for use on anchor links (e.g. #about)', 'megamenu' );
|
692 |
+
$return .= ' </div>'; $return .= ' </td>';
|
693 |
+
$return .= ' </tr>';
|
694 |
$return .= ' <tr class="mega-menu-item-align">';
|
695 |
$return .= ' <td class="mega-name">';
|
696 |
+
$return .= __( 'Menu item align', 'megamenu' );
|
697 |
$return .= ' </td>';
|
698 |
$return .= ' <td class="mega-value">';
|
699 |
|
723 |
$return .= ' </tr>';
|
724 |
$return .= ' <tr class="mega-menu-icon-position">';
|
725 |
$return .= ' <td class="mega-name">';
|
726 |
+
$return .= __( 'Icon position', 'megamenu' );
|
727 |
$return .= ' </td>';
|
728 |
$return .= ' <td class="mega-value">';
|
729 |
$return .= ' <select name="settings[icon_position]">';
|
744 |
$return .= ' <table>';
|
745 |
$return .= ' <tr class="mega-sub-menu-align">';
|
746 |
$return .= ' <td class="mega-name">';
|
747 |
+
$return .= __( 'Sub menu align', 'megamenu' );
|
748 |
$return .= ' </td>';
|
749 |
$return .= ' <td class="mega-value">';
|
750 |
|
764 |
$return .= ' </tr>';
|
765 |
$return .= ' <tr>';
|
766 |
$return .= ' <td class="mega-name">';
|
767 |
+
$return .= __( 'Hide sub menu on mobile', 'megamenu' );
|
768 |
$return .= ' </td>';
|
769 |
$return .= ' <td class="mega-value">';
|
770 |
$return .= ' <input type="checkbox" name="settings[hide_sub_menu_on_mobile]" value="true" ' . checked( $menu_item_meta['hide_sub_menu_on_mobile'], 'true', false ) . ' />';
|
classes/nav-menus.class.php
CHANGED
@@ -25,6 +25,7 @@ if ( ! class_exists( 'Mega_Menu_Nav_Menus' ) ) :
|
|
25 |
'disable_link' => 'false',
|
26 |
'hide_on_mobile' => 'false',
|
27 |
'hide_on_desktop' => 'false',
|
|
|
28 |
'hide_sub_menu_on_mobile' => 'false',
|
29 |
'hide_arrow' => 'false',
|
30 |
'item_align' => 'left',
|
25 |
'disable_link' => 'false',
|
26 |
'hide_on_mobile' => 'false',
|
27 |
'hide_on_desktop' => 'false',
|
28 |
+
'close_after_click' => 'false',
|
29 |
'hide_sub_menu_on_mobile' => 'false',
|
30 |
'hide_arrow' => 'false',
|
31 |
'item_align' => 'left',
|
classes/pages/general.php
CHANGED
@@ -18,7 +18,6 @@ if ( ! class_exists( 'Mega_Menu_General' ) ) :
|
|
18 |
*/
|
19 |
public function __construct() {
|
20 |
add_action( 'admin_post_megamenu_save_settings', array( $this, 'save_settings' ) );
|
21 |
-
add_action( 'admin_post_megamenu_delete_data', array( $this, 'delete_data' ) );
|
22 |
|
23 |
add_filter( 'megamenu_menu_tabs', array( $this, 'add_general_tab' ), 4 );
|
24 |
add_action( 'megamenu_page_general_settings', array( $this, 'general_settings_page' ) );
|
18 |
*/
|
19 |
public function __construct() {
|
20 |
add_action( 'admin_post_megamenu_save_settings', array( $this, 'save_settings' ) );
|
|
|
21 |
|
22 |
add_filter( 'megamenu_menu_tabs', array( $this, 'add_general_tab' ), 4 );
|
23 |
add_action( 'megamenu_page_general_settings', array( $this, 'general_settings_page' ) );
|
classes/pages/locations.php
CHANGED
@@ -1241,8 +1241,9 @@ if ( ! class_exists( 'Mega_Menu_Locations' ) ) :
|
|
1241 |
|
1242 |
?>
|
1243 |
<select name='megamenu_meta[<?php echo esc_attr( $location ); ?>][second_click]'>
|
1244 |
-
<option value='close' <?php echo selected( $second_click == 'close' ); ?>><?php _e( 'First click will open
|
1245 |
-
<option value='go' <?php echo selected( $second_click == 'go' ); ?>><?php _e( 'First click will open
|
|
|
1246 |
<select>
|
1247 |
<?php
|
1248 |
}
|
@@ -1699,7 +1700,11 @@ if ( ! class_exists( 'Mega_Menu_Locations' ) ) :
|
|
1699 |
* @return bool
|
1700 |
*/
|
1701 |
private function compare_elems( $elem1, $elem2 ) {
|
1702 |
-
|
|
|
|
|
|
|
|
|
1703 |
}
|
1704 |
}
|
1705 |
|
1241 |
|
1242 |
?>
|
1243 |
<select name='megamenu_meta[<?php echo esc_attr( $location ); ?>][second_click]'>
|
1244 |
+
<option value='close' <?php echo selected( $second_click == 'close' ); ?>><?php _e( 'First click will open the sub menu, second click will close the sub menu.', 'megamenu' ); ?></option>
|
1245 |
+
<option value='go' <?php echo selected( $second_click == 'go' ); ?>><?php _e( 'First click will open the sub menu, second click will follow the link.', 'megamenu' ); ?></option>
|
1246 |
+
<option value='disabled' <?php echo selected( $second_click == 'disabled' ); ?>><?php _e( 'First click will follow the link (the arrow must be used to toggle sub menu visiblity).', 'megamenu' ); ?></option>
|
1247 |
<select>
|
1248 |
<?php
|
1249 |
}
|
1700 |
* @return bool
|
1701 |
*/
|
1702 |
private function compare_elems( $elem1, $elem2 ) {
|
1703 |
+
if ( $elem1['priority'] > $elem2['priority'] ) {
|
1704 |
+
return 1;
|
1705 |
+
}
|
1706 |
+
|
1707 |
+
return 0;
|
1708 |
}
|
1709 |
}
|
1710 |
|
classes/pages/themes.php
CHANGED
@@ -2912,9 +2912,11 @@ if ( ! class_exists( 'Mega_Menu_Themes' ) ) :
|
|
2912 |
* @since 2.1
|
2913 |
*/
|
2914 |
private function compare_elems( $elem1, $elem2 ) {
|
|
|
|
|
|
|
2915 |
|
2916 |
-
return
|
2917 |
-
|
2918 |
}
|
2919 |
|
2920 |
|
2912 |
* @since 2.1
|
2913 |
*/
|
2914 |
private function compare_elems( $elem1, $elem2 ) {
|
2915 |
+
if ( $elem1['priority'] > $elem2['priority'] ) {
|
2916 |
+
return 1;
|
2917 |
+
}
|
2918 |
|
2919 |
+
return 0;
|
|
|
2920 |
}
|
2921 |
|
2922 |
|
classes/walker.class.php
CHANGED
@@ -98,9 +98,13 @@ if ( ! class_exists( 'Mega_Menu_Walker' ) ) :
|
|
98 |
$output .= "<li class='{$class}' id='{$id}'>";
|
99 |
|
100 |
// output the widgets
|
101 |
-
if ( $item->type == 'widget'
|
102 |
|
103 |
-
|
|
|
|
|
|
|
|
|
104 |
|
105 |
//} else if ( 'block' === $item->type ) {
|
106 |
// /** This filter is documented in wp-includes/post-template.php */
|
98 |
$output .= "<li class='{$class}' id='{$id}'>";
|
99 |
|
100 |
// output the widgets
|
101 |
+
if ( $item->type == 'widget' ) {
|
102 |
|
103 |
+
if ( $item->content ) {
|
104 |
+
$item_output = $item->content;
|
105 |
+
} else {
|
106 |
+
$item_output = "<!-- widget is empty -->";
|
107 |
+
}
|
108 |
|
109 |
//} else if ( 'block' === $item->type ) {
|
110 |
// /** This filter is documented in wp-includes/post-template.php */
|
classes/widget-manager.class.php
CHANGED
@@ -472,12 +472,11 @@ if ( ! class_exists( 'Mega_Menu_Widget_Manager' ) ) :
|
|
472 |
* @param array $b
|
473 |
*/
|
474 |
function sort_by_order( $a, $b ) {
|
475 |
-
|
476 |
if ( $a['order'] == $b['order'] ) {
|
477 |
return 1;
|
478 |
}
|
479 |
-
return ( $a['order'] < $b['order'] ) ? -1 : 1;
|
480 |
|
|
|
481 |
}
|
482 |
|
483 |
|
472 |
* @param array $b
|
473 |
*/
|
474 |
function sort_by_order( $a, $b ) {
|
|
|
475 |
if ( $a['order'] == $b['order'] ) {
|
476 |
return 1;
|
477 |
}
|
|
|
478 |
|
479 |
+
return ( $a['order'] < $b['order'] ) ? -1 : 1;
|
480 |
}
|
481 |
|
482 |
|
css/admin/admin.css
CHANGED
@@ -1164,15 +1164,16 @@ body.toplevel_page_maxmegamenu .mega-tooltip[data-tooltip-disabled],
|
|
1164 |
color: #999;
|
1165 |
line-height: 1.5em;
|
1166 |
text-indent: 2px;
|
1167 |
-
margin-top: 5px;
|
|
|
|
|
1168 |
.nav-menus-php #cboxContent table td.mega-value .mega-description p {
|
1169 |
font-size: 0.9em; }
|
1170 |
.nav-menus-php #cboxContent table .mega-menu-item-align td.mega-value select {
|
1171 |
float: left; }
|
1172 |
.nav-menus-php #cboxContent table .mega-menu-item-align td.mega-value .mega-description {
|
1173 |
float: left;
|
1174 |
-
margin-left: 10px;
|
1175 |
-
font-style: italic; }
|
1176 |
.nav-menus-php #cboxContent table .mega-sub-menu-align td.mega-value select {
|
1177 |
float: left;
|
1178 |
margin-right: 10px; }
|
@@ -1614,8 +1615,7 @@ body.toplevel_page_maxmegamenu .megamenu_wrap .warning {
|
|
1614 |
body[class*='_page_maxmegamenu_'] .mm-picker-container,
|
1615 |
body.toplevel_page_maxmegamenu .mm-picker-container {
|
1616 |
border-radius: 3px;
|
1617 |
-
|
1618 |
-
border: 1px solid #7e8993;
|
1619 |
font-size: 0.9em;
|
1620 |
float: left; }
|
1621 |
body[class*='_page_maxmegamenu_'] .mm-picker-container .sp-replacer,
|
@@ -1634,6 +1634,7 @@ body.toplevel_page_maxmegamenu .mm-picker-container {
|
|
1634 |
body[class*='_page_maxmegamenu_'] .mm-picker-container .sp-replacer .sp-preview,
|
1635 |
body.toplevel_page_maxmegamenu .mm-picker-container .sp-replacer .sp-preview {
|
1636 |
border: 0;
|
|
|
1637 |
height: 26px;
|
1638 |
width: 26px;
|
1639 |
margin: 0; }
|
@@ -1927,6 +1928,9 @@ body.toplevel_page_maxmegamenu .megamenu_right {
|
|
1927 |
body.toplevel_page_maxmegamenu .megamenu_right .menu_settings table select {
|
1928 |
font-size: 11px;
|
1929 |
min-height: 28px; }
|
|
|
|
|
|
|
1930 |
body[class*='_page_maxmegamenu_'] .megamenu_right .menu_settings table textarea,
|
1931 |
body.toplevel_page_maxmegamenu .megamenu_right .menu_settings table textarea {
|
1932 |
width: 100%;
|
@@ -2432,3 +2436,5 @@ body.toplevel_page_maxmegamenu .mega-delete {
|
|
2432 |
@keyframes busy-animation {
|
2433 |
0% {
|
2434 |
background-position: 200px 0; } }
|
|
|
|
1164 |
color: #999;
|
1165 |
line-height: 1.5em;
|
1166 |
text-indent: 2px;
|
1167 |
+
margin-top: 5px;
|
1168 |
+
display: inline;
|
1169 |
+
font-style: italic; }
|
1170 |
.nav-menus-php #cboxContent table td.mega-value .mega-description p {
|
1171 |
font-size: 0.9em; }
|
1172 |
.nav-menus-php #cboxContent table .mega-menu-item-align td.mega-value select {
|
1173 |
float: left; }
|
1174 |
.nav-menus-php #cboxContent table .mega-menu-item-align td.mega-value .mega-description {
|
1175 |
float: left;
|
1176 |
+
margin-left: 10px; }
|
|
|
1177 |
.nav-menus-php #cboxContent table .mega-sub-menu-align td.mega-value select {
|
1178 |
float: left;
|
1179 |
margin-right: 10px; }
|
1615 |
body[class*='_page_maxmegamenu_'] .mm-picker-container,
|
1616 |
body.toplevel_page_maxmegamenu .mm-picker-container {
|
1617 |
border-radius: 3px;
|
1618 |
+
border: 1px solid #8c8f94;
|
|
|
1619 |
font-size: 0.9em;
|
1620 |
float: left; }
|
1621 |
body[class*='_page_maxmegamenu_'] .mm-picker-container .sp-replacer,
|
1634 |
body[class*='_page_maxmegamenu_'] .mm-picker-container .sp-replacer .sp-preview,
|
1635 |
body.toplevel_page_maxmegamenu .mm-picker-container .sp-replacer .sp-preview {
|
1636 |
border: 0;
|
1637 |
+
border-right: 1px solid #8c8f94;
|
1638 |
height: 26px;
|
1639 |
width: 26px;
|
1640 |
margin: 0; }
|
1928 |
body.toplevel_page_maxmegamenu .megamenu_right .menu_settings table select {
|
1929 |
font-size: 11px;
|
1930 |
min-height: 28px; }
|
1931 |
+
body[class*='_page_maxmegamenu_'] .megamenu_right .menu_settings table select,
|
1932 |
+
body.toplevel_page_maxmegamenu .megamenu_right .menu_settings table select {
|
1933 |
+
max-width: 200px; }
|
1934 |
body[class*='_page_maxmegamenu_'] .megamenu_right .menu_settings table textarea,
|
1935 |
body.toplevel_page_maxmegamenu .megamenu_right .menu_settings table textarea {
|
1936 |
width: 100%;
|
2436 |
@keyframes busy-animation {
|
2437 |
0% {
|
2438 |
background-position: 200px 0; } }
|
2439 |
+
|
2440 |
+
/*# sourceMappingURL=admin.css.map */
|
css/admin/admin.scss
CHANGED
@@ -1242,6 +1242,8 @@ body.toplevel_page_maxmegamenu,
|
|
1242 |
line-height: 1.5em;
|
1243 |
text-indent: 2px;
|
1244 |
margin-top: 5px;
|
|
|
|
|
1245 |
|
1246 |
p {
|
1247 |
font-size: 0.9em;
|
@@ -1257,7 +1259,6 @@ body.toplevel_page_maxmegamenu,
|
|
1257 |
.mega-description {
|
1258 |
float: left;
|
1259 |
margin-left: 10px;
|
1260 |
-
font-style: italic;
|
1261 |
}
|
1262 |
}
|
1263 |
}
|
@@ -1880,8 +1881,7 @@ body.toplevel_page_maxmegamenu {
|
|
1880 |
|
1881 |
.mm-picker-container {
|
1882 |
border-radius: 3px;
|
1883 |
-
|
1884 |
-
border: 1px solid #7e8993;
|
1885 |
font-size: 0.9em;
|
1886 |
float: left;
|
1887 |
|
@@ -1902,6 +1902,7 @@ body.toplevel_page_maxmegamenu {
|
|
1902 |
|
1903 |
.sp-replacer .sp-preview {
|
1904 |
border: 0;
|
|
|
1905 |
height: 26px;
|
1906 |
width: 26px;
|
1907 |
margin: 0;
|
@@ -2271,6 +2272,10 @@ body.toplevel_page_maxmegamenu {
|
|
2271 |
min-height: 28px;
|
2272 |
}
|
2273 |
|
|
|
|
|
|
|
|
|
2274 |
textarea {
|
2275 |
width: 100%;
|
2276 |
height: 150px;
|
1242 |
line-height: 1.5em;
|
1243 |
text-indent: 2px;
|
1244 |
margin-top: 5px;
|
1245 |
+
display: inline;
|
1246 |
+
font-style: italic;
|
1247 |
|
1248 |
p {
|
1249 |
font-size: 0.9em;
|
1259 |
.mega-description {
|
1260 |
float: left;
|
1261 |
margin-left: 10px;
|
|
|
1262 |
}
|
1263 |
}
|
1264 |
}
|
1881 |
|
1882 |
.mm-picker-container {
|
1883 |
border-radius: 3px;
|
1884 |
+
border: 1px solid #8c8f94;
|
|
|
1885 |
font-size: 0.9em;
|
1886 |
float: left;
|
1887 |
|
1902 |
|
1903 |
.sp-replacer .sp-preview {
|
1904 |
border: 0;
|
1905 |
+
border-right: 1px solid #8c8f94;
|
1906 |
height: 26px;
|
1907 |
width: 26px;
|
1908 |
margin: 0;
|
2272 |
min-height: 28px;
|
2273 |
}
|
2274 |
|
2275 |
+
select {
|
2276 |
+
max-width: 200px;
|
2277 |
+
}
|
2278 |
+
|
2279 |
textarea {
|
2280 |
width: 100%;
|
2281 |
height: 150px;
|
css/megamenu.scss
CHANGED
@@ -509,7 +509,6 @@
|
|
509 |
@if unit($panel_inner_width) == 'px' {
|
510 |
max-width: $panel_inner_width; /** Panel Width (Inner) **/
|
511 |
margin: 0 auto;
|
512 |
-
display: flex;
|
513 |
} @else {
|
514 |
width: 100%;
|
515 |
float: left;
|
509 |
@if unit($panel_inner_width) == 'px' {
|
510 |
max-width: $panel_inner_width; /** Panel Width (Inner) **/
|
511 |
margin: 0 auto;
|
|
|
512 |
} @else {
|
513 |
width: 100%;
|
514 |
float: left;
|
js/maxmegamenu.js
CHANGED
@@ -268,7 +268,16 @@
|
|
268 |
});
|
269 |
|
270 |
collapse_children_parents.each(function() {
|
271 |
-
$(this).attr(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
});
|
273 |
};
|
274 |
|
@@ -496,7 +505,7 @@
|
|
496 |
};
|
497 |
|
498 |
plugin.reverseRightAlignedItems = function() {
|
499 |
-
if ( ! $("body").hasClass("rtl") ) {
|
500 |
$menu.append($menu.children("li.mega-item-align-right").get().reverse());
|
501 |
}
|
502 |
};
|
@@ -612,6 +621,8 @@
|
|
612 |
|
613 |
$("body").addClass($menu.attr("id") + "-mobile-open");
|
614 |
|
|
|
|
|
615 |
if ( plugin.settings.effect_mobile === "slide_left" || plugin.settings.effect_mobile === "slide_right" ) {
|
616 |
$("html").addClass($menu.attr("id") + "-off-canvas-open");
|
617 |
}
|
268 |
});
|
269 |
|
270 |
collapse_children_parents.each(function() {
|
271 |
+
$(this).attr("data-has-click-event", "true");
|
272 |
+
});
|
273 |
+
|
274 |
+
if ( plugin.settings.second_click === "disabled" ) {
|
275 |
+
clickable_parents.off("click.megamenu");
|
276 |
+
}
|
277 |
+
|
278 |
+
$(".mega-close-after-click:not(.mega-menu-item-has-children) > a.mega-menu-link", menu).on("click", function() {
|
279 |
+
plugin.hideAllPanels();
|
280 |
+
plugin.hideMobileMenu();
|
281 |
});
|
282 |
};
|
283 |
|
505 |
};
|
506 |
|
507 |
plugin.reverseRightAlignedItems = function() {
|
508 |
+
if ( ! $("body").hasClass("rtl") && $menu.hasClass("mega-menu-horizontal") ) {
|
509 |
$menu.append($menu.children("li.mega-item-align-right").get().reverse());
|
510 |
}
|
511 |
};
|
621 |
|
622 |
$("body").addClass($menu.attr("id") + "-mobile-open");
|
623 |
|
624 |
+
plugin.expandMobileSubMenus();
|
625 |
+
|
626 |
if ( plugin.settings.effect_mobile === "slide_left" || plugin.settings.effect_mobile === "slide_right" ) {
|
627 |
$("html").addClass($menu.attr("id") + "-off-canvas-open");
|
628 |
}
|
megamenu.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Max Mega Menu
|
4 |
* Plugin URI: https://www.megamenu.com
|
5 |
* Description: An easy to use mega menu plugin. Written the WordPress way.
|
6 |
-
* Version: 2.9.
|
7 |
* Author: megamenu.com
|
8 |
* Author URI: https://www.megamenu.com
|
9 |
* License: GPL-2.0+
|
@@ -35,7 +35,7 @@ if ( ! class_exists( 'Mega_Menu' ) ) :
|
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
-
public $version = '2.9.
|
39 |
|
40 |
|
41 |
/**
|
@@ -715,7 +715,7 @@ if ( ! class_exists( 'Mega_Menu' ) ) :
|
|
715 |
$menu_item = array(
|
716 |
'type' => 'widget',
|
717 |
'parent_submenu_type' => '',
|
718 |
-
'title' => '',
|
719 |
'content' => $widget_manager->show_widget( $block['id'] ),
|
720 |
'menu_item_parent' => $rolling_dummy_id,
|
721 |
'db_id' => 0,
|
@@ -999,6 +999,10 @@ if ( ! class_exists( 'Mega_Menu' ) ) :
|
|
999 |
$item->classes[] = 'hide-on-mobile';
|
1000 |
}
|
1001 |
|
|
|
|
|
|
|
|
|
1002 |
if ( 'true' === $item->megamenu_settings['hide_sub_menu_on_mobile'] ) {
|
1003 |
$item->classes[] = 'hide-sub-menu-on-mobile';
|
1004 |
}
|
3 |
* Plugin Name: Max Mega Menu
|
4 |
* Plugin URI: https://www.megamenu.com
|
5 |
* Description: An easy to use mega menu plugin. Written the WordPress way.
|
6 |
+
* Version: 2.9.4
|
7 |
* Author: megamenu.com
|
8 |
* Author URI: https://www.megamenu.com
|
9 |
* License: GPL-2.0+
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
+
public $version = '2.9.4';
|
39 |
|
40 |
|
41 |
/**
|
715 |
$menu_item = array(
|
716 |
'type' => 'widget',
|
717 |
'parent_submenu_type' => '',
|
718 |
+
'title' => $block['id'],
|
719 |
'content' => $widget_manager->show_widget( $block['id'] ),
|
720 |
'menu_item_parent' => $rolling_dummy_id,
|
721 |
'db_id' => 0,
|
999 |
$item->classes[] = 'hide-on-mobile';
|
1000 |
}
|
1001 |
|
1002 |
+
if ( 'true' === $item->megamenu_settings['close_after_click'] ) {
|
1003 |
+
$item->classes[] = 'close-after-click';
|
1004 |
+
}
|
1005 |
+
|
1006 |
if ( 'true' === $item->megamenu_settings['hide_sub_menu_on_mobile'] ) {
|
1007 |
$item->classes[] = 'hide-sub-menu-on-mobile';
|
1008 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: megamenu
|
3 |
Tags: menu, megamenu, mega menu, navigation, mobile
|
4 |
Requires at least: 4.9
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 2.9.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -134,6 +134,16 @@ See https://www.megamenu.com for more screenshots
|
|
134 |
|
135 |
== Changelog ==
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
= 2.9.3 =
|
138 |
|
139 |
* Fix: Update spectrum.js to 1.8.1 (fixes broken colour palette)
|
2 |
Contributors: megamenu
|
3 |
Tags: menu, megamenu, mega menu, navigation, mobile
|
4 |
Requires at least: 4.9
|
5 |
+
Tested up to: 5.8
|
6 |
+
Stable tag: 2.9.3
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
134 |
|
135 |
== Changelog ==
|
136 |
|
137 |
+
= 2.9.4 =
|
138 |
+
|
139 |
+
* Improvement: Styling improvements to color picker
|
140 |
+
* New feature: Add "Close sub menu after click" option to menu item options
|
141 |
+
* New feature: Add "First click will follow the link (the arrow must be used to toggle sub menu visiblity)" to second click options
|
142 |
+
* Fix: PHP 8.0 compatibility
|
143 |
+
* Fix: Expanded mobile sub menus collapse if page background is clicked, even when "Mobile state" is set to "Expand all"
|
144 |
+
* Fix: Only reverse right aligned items on mobile when the menu orientation is Horizontal
|
145 |
+
* Fix: Widgets without any content will no longer be output (instead of displaying the widget ID)
|
146 |
+
|
147 |
= 2.9.3 =
|
148 |
|
149 |
* Fix: Update spectrum.js to 1.8.1 (fixes broken colour palette)
|