Advanced Sidebar Menu - Version 8.6.4

Version Description

  • Introduced advanced-sidebar-menu/debug/print-instance filter.
  • Improved FAQ information.
  • Remove dangling reference to old built in styles from FAQ.
Download this release

Release Info

Developer Mat Lipe
Plugin Icon 128x128 Advanced Sidebar Menu
Version 8.6.4
Comparing to
See all releases

Code changes from version 8.6.3 to 8.6.4

Files changed (4) hide show
  1. advanced-sidebar-menu.php +2 -2
  2. readme.txt +15 -16
  3. src/Debug.php +14 -11
  4. src/Widget/Page.php +4 -4
advanced-sidebar-menu.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://onpointplugins.com/advanced-sidebar-menu/
5
  * Description: Creates dynamic menus based on parent/child relationship of your pages or categories.
6
  * Author: OnPoint Plugins
7
- * Version: 8.6.3
8
  * Author URI: https://onpointplugins.com
9
  * Text Domain: advanced-sidebar-menu
10
  * Domain Path: /languages/
@@ -19,7 +19,7 @@ if ( defined( 'ADVANCED_SIDEBAR_BASIC_VERSION' ) ) {
19
  return;
20
  }
21
 
22
- define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '8.6.3' );
23
  define( 'ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION', '8.3.1' );
24
  define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
25
  define( 'ADVANCED_SIDEBAR_MENU_URL', plugin_dir_url( __FILE__ ) );
4
  * Plugin URI: https://onpointplugins.com/advanced-sidebar-menu/
5
  * Description: Creates dynamic menus based on parent/child relationship of your pages or categories.
6
  * Author: OnPoint Plugins
7
+ * Version: 8.6.4
8
  * Author URI: https://onpointplugins.com
9
  * Text Domain: advanced-sidebar-menu
10
  * Domain Path: /languages/
19
  return;
20
  }
21
 
22
+ define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '8.6.4' );
23
  define( 'ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION', '8.3.1' );
24
  define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
25
  define( 'ADVANCED_SIDEBAR_MENU_URL', plugin_dir_url( __FILE__ ) );
readme.txt CHANGED
@@ -4,9 +4,9 @@ Contributors: Mat Lipe, onpointplugins
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40onpointplugins%2ecom&lc=US&item_name=Advanced%20Sidebar%20Menu&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
5
  Tags: menus, sidebar menu, hierarchy, category menu, pages menu, dynamic
6
  Requires at least: 5.2.0
7
- Tested up to: 5.8.1
8
  Requires PHP: 5.6.0
9
- Stable tag: 8.6.3
10
 
11
  == Description ==
12
 
@@ -49,7 +49,7 @@ Keeps the menu clean and usable. Only related items display so you don't have to
49
  * Levels of Categories to display when always display child categories is checked
50
 
51
  <h3>PRO Features</h3>
52
- * Ability to customize each page or navigation menu item links text.
53
  * Click-and-drag styling for page, category, and navigation menu widgets.
54
  * Styling options for links including color, background color, size, hover, and font weight.
55
  * Styling options for different levels of links.
@@ -125,7 +125,7 @@ The most common causes for this confusion come from one of these reasons:
125
 
126
  = How do I change the styling of the current page? =
127
 
128
- You may add CSS to your themes style.css to change the way the menu looks.
129
 
130
  For example the following CSS would:
131
  1. Remove the dot to the left of the menu item.
@@ -153,26 +153,25 @@ To style your menu without using any code <a href="https://onpointplugins.com/pr
153
 
154
  = How do you get the categories to display on single post pages? =
155
 
156
- There is a checkbox in the widget options that will display the same structure for the categories the post is in.
157
-
158
- = How do you edit the output or built in css? =
159
-
160
- Create a folder in your child theme named "advanced-sidebar-menu" copy any of the files from the "views" folder into
161
- the folder you just created. You may edit the files to change the output or css. You must have the option checked to use the built in CSS (in the widget) to be able to edit the css file in this way.
162
-
163
 
164
  = Does the menu change for each page you are on? =
165
 
166
- Yes. Based on whatever page, post, or category you are on, the menu will change automatically to display the current parents and children.
167
 
168
 
169
  == Changelog ==
 
 
 
 
 
170
  = 8.6.3 =
171
- * Fix issue with CSS classnames on current page's children.
172
 
173
  = 8.6.2 =
174
  * Assured consistency for levels of page menu's CSS classes.
175
- * Converted category get highest parent logic to `get_ancestors`.
176
  * Gracefully handle invalid taxonomies in Category widgets.
177
  * Gracefully handle widgets without ids.
178
  * Fixed color pickers in Elementor.
@@ -180,7 +179,7 @@ Yes. Based on whatever page, post, or category you are on, the menu will change
180
 
181
  = 8.6.1 =
182
  * Improved widget interaction handling.
183
- * Synced styles between block, classic, and customizer widgets.
184
  * Fixed customizer widget buttons.
185
 
186
  = 8.6.0 =
@@ -280,7 +279,7 @@ Major version update. See <a href="https://onpointplugins.com/advanced-sidebar-m
280
  * Greatly improved widget styles and UI when using Elementor.
281
  * Overall third party page builder improvements.
282
  * Move scripts and styles into new Scripts class.
283
- * Introduced a new Singleton trait.
284
 
285
  = 7.6.0 =
286
  * Elementor support for multiple widgets of the same type on the same page.
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40onpointplugins%2ecom&lc=US&item_name=Advanced%20Sidebar%20Menu&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
5
  Tags: menus, sidebar menu, hierarchy, category menu, pages menu, dynamic
6
  Requires at least: 5.2.0
7
+ Tested up to: 5.8.2
8
  Requires PHP: 5.6.0
9
+ Stable tag: 8.6.4
10
 
11
  == Description ==
12
 
49
  * Levels of Categories to display when always display child categories is checked
50
 
51
  <h3>PRO Features</h3>
52
+ * Ability to customize each page or navigation menu item link's text.
53
  * Click-and-drag styling for page, category, and navigation menu widgets.
54
  * Styling options for links including color, background color, size, hover, and font weight.
55
  * Styling options for different levels of links.
125
 
126
  = How do I change the styling of the current page? =
127
 
128
+ You may add CSS to your theme's style.css to change the way the menu looks.
129
 
130
  For example the following CSS would:
131
  1. Remove the dot to the left of the menu item.
153
 
154
  = How do you get the categories to display on single post pages? =
155
 
156
+ The Categories Menu widget contains a "Display categories on single posts" checkbox, which will display the category menus based on the categories the current post is assigned to.
 
 
 
 
 
 
157
 
158
  = Does the menu change for each page you are on? =
159
 
160
+ Yes. Based on whatever page, post or category you are on, the menu will change automatically to display the current parents and children.
161
 
162
 
163
  == Changelog ==
164
+ = 8.6.4 =
165
+ * Introduced `advanced-sidebar-menu/debug/print-instance` filter.
166
+ * Improved FAQ information.
167
+ * Remove dangling reference to old built in styles from FAQ.
168
+
169
  = 8.6.3 =
170
+ * Fix issue with CSS classnames on the current page's children.
171
 
172
  = 8.6.2 =
173
  * Assured consistency for levels of page menu's CSS classes.
174
+ * Converted category get the highest parent logic to `get_ancestors`.
175
  * Gracefully handle invalid taxonomies in Category widgets.
176
  * Gracefully handle widgets without ids.
177
  * Fixed color pickers in Elementor.
179
 
180
  = 8.6.1 =
181
  * Improved widget interaction handling.
182
+ * Synced styles between block, classic and customizer widgets.
183
  * Fixed customizer widget buttons.
184
 
185
  = 8.6.0 =
279
  * Greatly improved widget styles and UI when using Elementor.
280
  * Overall third party page builder improvements.
281
  * Move scripts and styles into new Scripts class.
282
+ * Introduced a Singleton trait.
283
 
284
  = 7.6.0 =
285
  * Elementor support for multiple widgets of the same type on the same page.
src/Debug.php CHANGED
@@ -4,14 +4,16 @@ namespace Advanced_Sidebar_Menu;
4
 
5
  use Advanced_Sidebar_Menu\Menus\Menu_Abstract;
6
  use Advanced_Sidebar_Menu\Traits\Singleton;
 
7
  use Advanced_Sidebar_Menu\Widget\Page;
8
 
9
  /**
10
- * Advanced_Sidebar_Menu\Advanced_Sidebar_Menu_Debug
 
 
 
11
  *
12
  * @author OnPoint Plugins
13
- * @since 6.3.1
14
- * @since 7.4.8 - Use URL arguments to test different configurations.
15
  */
16
  class Debug {
17
  use Singleton;
@@ -36,7 +38,7 @@ class Debug {
36
 
37
 
38
  /**
39
- * Adjust widget settings using the URL.
40
  *
41
  * @param array $instance - Widget settings.
42
  *
@@ -50,26 +52,27 @@ class Debug {
50
 
51
 
52
  /**
53
- * Print the widget settings as a js variable.
54
  *
55
- * @param Menu_Abstract $asm - Menu class.
56
- * @param Page $widget - Widget class.
57
  *
58
  * @return void
59
  */
60
- public function print_instance( $asm, $widget ) {
61
  $data = [
62
- 'version' => ADVANCED_SIDEBAR_BASIC_VERSION,
63
  ];
64
  if ( defined( 'ADVANCED_SIDEBAR_MENU_PRO_VERSION' ) ) {
65
  $data['pro_version'] = ADVANCED_SIDEBAR_MENU_PRO_VERSION;
66
  }
 
67
  ?>
68
  <script class="<?php echo esc_attr( self::DEBUG_PARAM ); ?>">
69
- if ( 'undefined' === typeof( <?php echo esc_attr( self::DEBUG_PARAM ); ?> ) ){
70
  var <?php echo esc_attr( self::DEBUG_PARAM ); ?> = <?php echo wp_json_encode( $data ); ?>;
71
  }
72
- <?php echo esc_attr( self::DEBUG_PARAM ); ?>[ '<?php echo esc_js( $widget->id ); ?>' ] = <?php echo wp_json_encode( $asm->instance ); ?>;
73
  </script>
74
  <?php
75
  }
4
 
5
  use Advanced_Sidebar_Menu\Menus\Menu_Abstract;
6
  use Advanced_Sidebar_Menu\Traits\Singleton;
7
+ use Advanced_Sidebar_Menu\Widget\Category;
8
  use Advanced_Sidebar_Menu\Widget\Page;
9
 
10
  /**
11
+ * Widget Debugging
12
+ *
13
+ * Passed an `asm_debug` URL parameter to print a JS
14
+ * variable including information about a page's widgets.
15
  *
16
  * @author OnPoint Plugins
 
 
17
  */
18
  class Debug {
19
  use Singleton;
38
 
39
 
40
  /**
41
+ * Adjust widget settings using the URL parameters.
42
  *
43
  * @param array $instance - Widget settings.
44
  *
52
 
53
 
54
  /**
55
+ * Print the widget settings as a JS variable.
56
  *
57
+ * @param Menu_Abstract $menu - Menu class.
58
+ * @param Page|Category $widget - Widget class.
59
  *
60
  * @return void
61
  */
62
+ public function print_instance( $menu, $widget ) {
63
  $data = [
64
+ 'version' => ADVANCED_SIDEBAR_BASIC_VERSION,
65
  ];
66
  if ( defined( 'ADVANCED_SIDEBAR_MENU_PRO_VERSION' ) ) {
67
  $data['pro_version'] = ADVANCED_SIDEBAR_MENU_PRO_VERSION;
68
  }
69
+ $data = apply_filters( 'advanced-sidebar-menu/debug/print-instance', $data, $menu, $widget );
70
  ?>
71
  <script class="<?php echo esc_attr( self::DEBUG_PARAM ); ?>">
72
+ if ( 'undefined' === typeof ( <?php echo esc_attr( self::DEBUG_PARAM ); ?> ) ) {
73
  var <?php echo esc_attr( self::DEBUG_PARAM ); ?> = <?php echo wp_json_encode( $data ); ?>;
74
  }
75
+ <?php echo esc_attr( self::DEBUG_PARAM ); ?>[ '<?php echo esc_js( $widget->id ); ?>' ] = <?php echo wp_json_encode( $menu->instance ); ?>;
76
  </script>
77
  <?php
78
  }
src/Widget/Page.php CHANGED
@@ -328,12 +328,12 @@ class Page extends Widget_Abstract {
328
  */
329
  public function widget( $args, $instance ) {
330
  $instance = (array) wp_parse_args( $instance, self::$defaults );
331
- $asm = \Advanced_Sidebar_Menu\Menus\Page::factory( $instance, $args );
332
 
333
- do_action( 'advanced-sidebar-menu/widget/before-render', $asm, $this );
334
 
335
- $asm->render();
336
 
337
- do_action( 'advanced-sidebar-menu/widget/after-render', $asm, $this );
338
  }
339
  }
328
  */
329
  public function widget( $args, $instance ) {
330
  $instance = (array) wp_parse_args( $instance, self::$defaults );
331
+ $menu = \Advanced_Sidebar_Menu\Menus\Page::factory( $instance, $args );
332
 
333
+ do_action( 'advanced-sidebar-menu/widget/before-render', $menu, $this );
334
 
335
+ $menu->render();
336
 
337
+ do_action( 'advanced-sidebar-menu/widget/after-render', $menu, $this );
338
  }
339
  }