Version Description
Update to support PRO version 3.2.0
Download this release
Release Info
Developer | Mat Lipe |
Plugin | Advanced Sidebar Menu |
Version | 7.2.2 |
Comparing to | |
See all releases |
Code changes from version 7.2.1 to 7.2.2
- advanced-sidebar-menu.php +2 -2
- readme.txt +3 -3
- resources/js/advanced-sidebar-menu.js +0 -1
- src/Widget/Category.php +2 -5
- src/Widget/Page.php +3 -3
- src/Widget/Widget.php +12 -4
advanced-sidebar-menu.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Advanced Sidebar Menu
|
|
4 |
Plugin URI: https://matlipe.com/advanced-sidebar-menu/
|
5 |
Description: Creates dynamic menus based on parent/child relationship of your pages or categories.
|
6 |
Author: Mat Lipe
|
7 |
-
Version: 7.2.
|
8 |
Author URI: https://matlipe.com
|
9 |
Text Domain: advanced-sidebar-menu
|
10 |
*/
|
@@ -14,7 +14,7 @@ if ( defined( 'ADVANCED_SIDEBAR_BASIC_VERSION' ) ) {
|
|
14 |
return;
|
15 |
}
|
16 |
|
17 |
-
define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '7.2.
|
18 |
define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
|
19 |
|
20 |
if ( ! function_exists( 'advanced_sidebar_menu_load' ) ) {
|
4 |
Plugin URI: https://matlipe.com/advanced-sidebar-menu/
|
5 |
Description: Creates dynamic menus based on parent/child relationship of your pages or categories.
|
6 |
Author: Mat Lipe
|
7 |
+
Version: 7.2.2
|
8 |
Author URI: https://matlipe.com
|
9 |
Text Domain: advanced-sidebar-menu
|
10 |
*/
|
14 |
return;
|
15 |
}
|
16 |
|
17 |
+
define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '7.2.2' );
|
18 |
define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
|
19 |
|
20 |
if ( ! function_exists( 'advanced_sidebar_menu_load' ) ) {
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: menus, sidebar menu, hierarchy, category menu, pages menu
|
|
6 |
Requires at least: 4.6.0
|
7 |
Tested up to: 4.9.6
|
8 |
Requires PHP: 5.2.4
|
9 |
-
Stable tag: 7.2.
|
10 |
|
11 |
== Description ==
|
12 |
|
@@ -220,8 +220,8 @@ Yes. Based on whatever page, post, or category you are on, the menu will change
|
|
220 |
|
221 |
|
222 |
== Upgrade Notice ==
|
223 |
-
= 7.2.
|
224 |
-
Update to
|
225 |
|
226 |
= 7.1.2 =
|
227 |
Update to support PRO version 3.1.0
|
6 |
Requires at least: 4.6.0
|
7 |
Tested up to: 4.9.6
|
8 |
Requires PHP: 5.2.4
|
9 |
+
Stable tag: 7.2.2
|
10 |
|
11 |
== Description ==
|
12 |
|
220 |
|
221 |
|
222 |
== Upgrade Notice ==
|
223 |
+
= 7.2.2 =
|
224 |
+
Update to support PRO version 3.2.0
|
225 |
|
226 |
= 7.1.2 =
|
227 |
Update to support PRO version 3.1.0
|
resources/js/advanced-sidebar-menu.js
CHANGED
@@ -8,7 +8,6 @@ function asm_reveal_element(this_element_id) {
|
|
8 |
//old used ids. New use data-js so multiple may be used specifically
|
9 |
//@todo remove this select of id once PRO has been converted over
|
10 |
var el = jQuery( '[id="' + this_element_id + '"]:first');
|
11 |
-
console.info( el.length );
|
12 |
if( ! el.length ){
|
13 |
el = jQuery( '[data-js="' + this_element_id + '"]' );
|
14 |
}
|
8 |
//old used ids. New use data-js so multiple may be used specifically
|
9 |
//@todo remove this select of id once PRO has been converted over
|
10 |
var el = jQuery( '[id="' + this_element_id + '"]:first');
|
|
|
11 |
if( ! el.length ){
|
12 |
el = jQuery( '[data-js="' + this_element_id + '"]' );
|
13 |
}
|
src/Widget/Category.php
CHANGED
@@ -84,9 +84,7 @@ class Advanced_Sidebar_Menu_Widget_Category extends Advanced_Sidebar_Menu__Widge
|
|
84 |
<?php esc_html_e( 'Always display child categories', 'advanced-sidebar-menu' ); ?>
|
85 |
</label>
|
86 |
</p>
|
87 |
-
<div
|
88 |
-
data-js="<?php echo esc_attr( $this->get_field_id( self::LEVELS ) ); ?>"
|
89 |
-
<?php $this->hide_element( self::DISPLAY_ALL ); ?>>
|
90 |
<p>
|
91 |
<label>
|
92 |
<?php esc_html_e( 'Levels to display', 'advanced-sidebar-menu' ); ?>:</label>
|
@@ -141,8 +139,7 @@ class Advanced_Sidebar_Menu_Widget_Category extends Advanced_Sidebar_Menu__Widge
|
|
141 |
</label>
|
142 |
</p>
|
143 |
|
144 |
-
<div
|
145 |
-
data-js="<?php echo esc_attr( $this->get_field_id( self::EACH_CATEGORY_DISPLAY ) ); ?>" <?php $this->hide_element( self::DISPLAY_ON_SINGLE, $instance ); ?>>
|
146 |
<p>
|
147 |
<label><?php esc_html_e( "Display each single post's category", 'advanced-sidebar-menu' ); ?>
|
148 |
:</label>
|
84 |
<?php esc_html_e( 'Always display child categories', 'advanced-sidebar-menu' ); ?>
|
85 |
</label>
|
86 |
</p>
|
87 |
+
<div <?php $this->hide_element( self::DISPLAY_ALL, self::LEVELS ); ?>>
|
|
|
|
|
88 |
<p>
|
89 |
<label>
|
90 |
<?php esc_html_e( 'Levels to display', 'advanced-sidebar-menu' ); ?>:</label>
|
139 |
</label>
|
140 |
</p>
|
141 |
|
142 |
+
<div <?php $this->hide_element( self::DISPLAY_ON_SINGLE, self::EACH_CATEGORY_DISPLAY ); ?>>
|
|
|
143 |
<p>
|
144 |
<label><?php esc_html_e( "Display each single post's category", 'advanced-sidebar-menu' ); ?>
|
145 |
:</label>
|
src/Widget/Page.php
CHANGED
@@ -83,13 +83,13 @@ class Advanced_Sidebar_Menu_Widget_Page extends Advanced_Sidebar_Menu__Widget__W
|
|
83 |
<p>
|
84 |
<?php $this->checkbox( self::DISPLAY_ALL, self::LEVELS ); ?>
|
85 |
<label>
|
86 |
-
<?php esc_html_e( 'Always display child pages', 'advanced-sidebar-menu' );
|
87 |
</label>
|
88 |
</p>
|
89 |
|
90 |
<div
|
91 |
data-js="<?php echo esc_attr( $this->get_field_id( self::LEVELS ) ); ?>"
|
92 |
-
<?php $this->hide_element( self::DISPLAY_ALL ); ?>>
|
93 |
<p>
|
94 |
<label>
|
95 |
<?php esc_html_e( 'Levels to display', 'advanced-sidebar-menu' ); ?>:</label>
|
@@ -123,7 +123,7 @@ class Advanced_Sidebar_Menu_Widget_Page extends Advanced_Sidebar_Menu__Widget__W
|
|
123 |
<p>
|
124 |
<?php $this->checkbox( self::USE_PLUGIN_STYLES ); ?>
|
125 |
<label>
|
126 |
-
<?php esc_html_e( "Use this plugin's default styling", 'advanced-sidebar-menu' );
|
127 |
</label>
|
128 |
</p>
|
129 |
<?php do_action( 'advanced-sidebar-menu/widget/page/styles-box', $instance, $this ); ?>
|
83 |
<p>
|
84 |
<?php $this->checkbox( self::DISPLAY_ALL, self::LEVELS ); ?>
|
85 |
<label>
|
86 |
+
<?php esc_html_e( 'Always display child pages', 'advanced-sidebar-menu' ); ?>
|
87 |
</label>
|
88 |
</p>
|
89 |
|
90 |
<div
|
91 |
data-js="<?php echo esc_attr( $this->get_field_id( self::LEVELS ) ); ?>"
|
92 |
+
<?php $this->hide_element( self::DISPLAY_ALL, self::LEVELS ); ?>>
|
93 |
<p>
|
94 |
<label>
|
95 |
<?php esc_html_e( 'Levels to display', 'advanced-sidebar-menu' ); ?>:</label>
|
123 |
<p>
|
124 |
<?php $this->checkbox( self::USE_PLUGIN_STYLES ); ?>
|
125 |
<label>
|
126 |
+
<?php esc_html_e( "Use this plugin's default styling", 'advanced-sidebar-menu' ); ?>
|
127 |
</label>
|
128 |
</p>
|
129 |
<?php do_action( 'advanced-sidebar-menu/widget/page/styles-box', $instance, $this ); ?>
|
src/Widget/Widget.php
CHANGED
@@ -52,16 +52,21 @@ abstract class Advanced_Sidebar_Menu__Widget__Widget extends WP_Widget {
|
|
52 |
|
53 |
|
54 |
/**
|
55 |
-
* Hide an
|
56 |
*
|
57 |
-
* @param string $checkbox
|
58 |
-
* @param
|
|
|
|
|
|
|
|
|
59 |
*
|
60 |
* @since 7.2.0
|
|
|
61 |
*
|
62 |
* @return void
|
63 |
*/
|
64 |
-
public function hide_element( $checkbox, $reverse = false ) {
|
65 |
if ( $reverse ) {
|
66 |
if ( $this->checked( $checkbox ) ) {
|
67 |
?>style="display:none"<?php
|
@@ -71,6 +76,9 @@ abstract class Advanced_Sidebar_Menu__Widget__Widget extends WP_Widget {
|
|
71 |
?>style="display:none"<?php
|
72 |
}
|
73 |
}
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
|
52 |
|
53 |
|
54 |
/**
|
55 |
+
* Hide an reveal_element if a checkbox is checked.
|
56 |
*
|
57 |
+
* @param string $checkbox - name of checkbox reveal_element which controls this one
|
58 |
+
* @param string $reveal_element - match the reveal element passed to checkbox which reveals this
|
59 |
+
* @param bool $reverse - hide on check instead of show on check
|
60 |
+
*
|
61 |
+
*
|
62 |
+
* @todo Convert all uses of this method to supply the $reveal_element
|
63 |
*
|
64 |
* @since 7.2.0
|
65 |
+
* @since 7.2.2 Added the `reveal_element` argument.
|
66 |
*
|
67 |
* @return void
|
68 |
*/
|
69 |
+
public function hide_element( $checkbox, $reveal_element = null, $reverse = false ) {
|
70 |
if ( $reverse ) {
|
71 |
if ( $this->checked( $checkbox ) ) {
|
72 |
?>style="display:none"<?php
|
76 |
?>style="display:none"<?php
|
77 |
}
|
78 |
}
|
79 |
+
if ( null !== $reveal_element ) {
|
80 |
+
?> data-js="<?php echo esc_attr( $this->get_field_id( $reveal_element ) ); ?>"<?php
|
81 |
+
}
|
82 |
}
|
83 |
|
84 |
|