Advanced Sidebar Menu - Version 8.6.0

Version Description

  • Support WordPress version 5.8.
  • Support Gutenberg widgets screen.
  • Minimum required version for PRO 8.5.
Download this release

Release Info

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

Code changes from version 8.5.0 to 8.6.0

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.5.0
8
  * Author URI: https://onpointplugins.com
9
  * Text Domain: advanced-sidebar-menu
10
  * Domain Path: /languages/
@@ -19,8 +19,8 @@ if ( defined( 'ADVANCED_SIDEBAR_BASIC_VERSION' ) ) {
19
  return;
20
  }
21
 
22
- define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '8.5.0' );
23
- define( 'ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION', '8.2.0' );
24
  define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
25
  define( 'ADVANCED_SIDEBAR_MENU_URL', plugin_dir_url( __FILE__ ) );
26
 
@@ -128,7 +128,7 @@ add_action( 'advanced-sidebar-menu/widget/category/after-form', 'advanced_sideba
128
  function advanced_sidebar_menu_widget_docs( $instance, WP_Widget $widget ) {
129
  $anchor = Widget_Category::NAME === $widget->id_base ? 'categories-menu' : 'pages-menu';
130
  ?>
131
- <p style="text-align: right">
132
  <a
133
  href="https://onpointplugins.com/advanced-sidebar-menu/#advanced-sidebar-<?php echo esc_attr( $anchor ); ?>"
134
  target="_blank"
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.0
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.0' );
23
+ define( 'ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION', '8.3.2' );
24
  define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
25
  define( 'ADVANCED_SIDEBAR_MENU_URL', plugin_dir_url( __FILE__ ) );
26
 
128
  function advanced_sidebar_menu_widget_docs( $instance, WP_Widget $widget ) {
129
  $anchor = Widget_Category::NAME === $widget->id_base ? 'categories-menu' : 'pages-menu';
130
  ?>
131
+ <p class="advanced-sidebar-widget-documentation">
132
  <a
133
  href="https://onpointplugins.com/advanced-sidebar-menu/#advanced-sidebar-<?php echo esc_attr( $anchor ); ?>"
134
  target="_blank"
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.7.2
8
  Requires PHP: 5.6.0
9
- Stable tag: 8.5.0
10
 
11
  == Description ==
12
 
@@ -16,7 +16,7 @@ Keeps the menu clean and usable. Only related items display so you don't have to
16
 
17
  <strong>Check out <a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">Advanced Sidebar Menu PRO</a> for more features including accordion menus, menu colors and styles, custom link text, excluding of pages, category ordering, custom post types, custom taxonomies, priority support, and so much more!</strong>
18
 
19
- <blockquote><a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/" target="_blank">PRO version 8.3.0</a> is now available with improved style targeting including hover styles and border widths!</blockquote>
20
 
21
  <h3>Features</h3>
22
  * Page and Category widgets.
@@ -61,6 +61,7 @@ Keeps the menu clean and usable. Only related items display so you don't have to
61
  * Accordion icon style and color selection.
62
  * Accordion option to keep all sections closed until clicked.
63
  * Accordion option to include highest level parent in accordion.
 
64
  * Ability to exclude a page from all menus using a simple checkbox.
65
  * Link ordering for the category widget.
66
  * Number of levels of pages to show when "always display child pages" is not checked.
@@ -155,6 +156,11 @@ Yes. Based on whatever page, post, or category you are on, the menu will change
155
 
156
 
157
  == Changelog ==
 
 
 
 
 
158
  = 8.5.0 =
159
  * Introduce `Utils` class for shared non specific functionality.
160
  * Introduce `is_checked` method for determining checkbox state from anywhere.
@@ -259,18 +265,9 @@ Major version update. See <a href="https://onpointplugins.com/advanced-sidebar-m
259
  * Bump required PHP version to 5.4.4.
260
 
261
  == Upgrade Notice ==
 
 
 
262
  = 8.5.0 =
263
  Update to support PRO version 8.4.0.
264
 
265
- = 8.2.0 =
266
- Update to support PRO version 8.2.0
267
-
268
- = 8.0.0 =
269
- Major version update. Not fully backward compatible with version 7 filters or code. Please see migration guide if you are extending the plugin via code.
270
-
271
- = 7.7.0 =
272
- Update to support PRO version 3.10.0
273
-
274
- = 7.6.6 =
275
- Update to support PRO version 3.9.3
276
-
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.0
8
  Requires PHP: 5.6.0
9
+ Stable tag: 8.6.0
10
 
11
  == Description ==
12
 
16
 
17
  <strong>Check out <a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">Advanced Sidebar Menu PRO</a> for more features including accordion menus, menu colors and styles, custom link text, excluding of pages, category ordering, custom post types, custom taxonomies, priority support, and so much more!</strong>
18
 
19
+ <blockquote><a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/" target="_blank">PRO version 8.4.0</a> is now available with accordion options to use links for open/close!</blockquote>
20
 
21
  <h3>Features</h3>
22
  * Page and Category widgets.
61
  * Accordion icon style and color selection.
62
  * Accordion option to keep all sections closed until clicked.
63
  * Accordion option to include highest level parent in accordion.
64
+ * Accordion option to use links for open/close. **NEW**
65
  * Ability to exclude a page from all menus using a simple checkbox.
66
  * Link ordering for the category widget.
67
  * Number of levels of pages to show when "always display child pages" is not checked.
156
 
157
 
158
  == Changelog ==
159
+ = 8.6.0 =
160
+ * Support WordPress version 5.8.
161
+ * Support Gutenberg widgets screen.
162
+ * Minimum required version for PRO 8.5.
163
+
164
  = 8.5.0 =
165
  * Introduce `Utils` class for shared non specific functionality.
166
  * Introduce `is_checked` method for determining checkbox state from anywhere.
265
  * Bump required PHP version to 5.4.4.
266
 
267
  == Upgrade Notice ==
268
+ = 8.6.0 =
269
+ Update to support WordPress version 5.8.
270
+
271
  = 8.5.0 =
272
  Update to support PRO version 8.4.0.
273
 
 
 
 
 
 
 
 
 
 
 
 
 
resources/css/advanced-sidebar-menu.css CHANGED
@@ -14,6 +14,89 @@
14
  background: #f1f1f1;
15
  }
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  .advanced-sidebar-menu-full-width {
18
  width: 100%;
19
  clear: both;
@@ -25,8 +108,8 @@
25
 
26
  .advanced-sidebar-menu-styles-box .advanced-sidebar-menu-column select,
27
  .advanced-sidebar-menu-styles-box .advanced-sidebar-menu-column input {
28
- width: 103px;
29
- margin: 0 0 6px;
30
  }
31
 
32
  .advanced-sidebar-menu-styles-box .wp-picker-active {
@@ -45,6 +128,7 @@
45
  font-size: 12px;
46
  line-height: 14px !important;
47
  display: block;
 
48
  }
49
 
50
  .advanced-sidebar-menu-column .wp-color-result-text {
@@ -65,10 +149,11 @@
65
  outline: none !important;
66
  }
67
 
68
- .advanced-sidebar-menu-block-field {
69
- display: block;
70
- width: 100%;
71
- margin: 5px 0 0 0;
 
72
  }
73
 
74
  .advanced-sidebar-menu-styles-button {
@@ -79,7 +164,7 @@
79
  transition: all 300ms linear;
80
  position: absolute;
81
  font-size: 40px;
82
- top: 130px;
83
  right: 50px;
84
  cursor: pointer;
85
  display: none;
@@ -108,6 +193,15 @@
108
  display: none;
109
  }
110
 
 
 
 
 
 
 
 
 
 
111
  @media all and ( max-width: 1024px ) {
112
  .advanced-sidebar-menu-column {
113
  width: 100%;
14
  background: #f1f1f1;
15
  }
16
 
17
+ .advanced-sidebar-menu-column-box h3 {
18
+ font-size: 17px;
19
+ font-weight: 600 !important;
20
+ margin: 17px 0 !important;
21
+ }
22
+
23
+ .advanced-sidebar-menu-column-box p {
24
+ line-height: 19.5px !important;
25
+ }
26
+
27
+ .advanced-sidebar-menu-column-box label {
28
+ display: inline !important;
29
+ line-height: 19.5px !important;
30
+ }
31
+
32
+ .advanced-sidebar-menu-column a {
33
+ color: #0073aa !important;
34
+ }
35
+
36
+ .advanced-sidebar-menu-column-box select,
37
+ .advanced-sidebar-menu-column-box input {
38
+ background: #fff !important;
39
+ }
40
+
41
+ .advanced-sidebar-menu-column-box select {
42
+ display: inline-block !important;
43
+ width: auto !important;
44
+ }
45
+
46
+ .advanced-sidebar-menu-column-box select.widefat {
47
+ width: 100% !important;
48
+ display: block !important;
49
+ margin: 4px 0 0 0 !important;
50
+ }
51
+
52
+ .advanced-sidebar-info-panel h3 a {
53
+ font-weight: 600 !important;
54
+ box-shadow: none;
55
+ }
56
+
57
+ .advanced-sidebar-info-panel h3 {
58
+ margin: 8px 0 0 3px !important;
59
+ }
60
+
61
+ .advanced-sidebar-info-panel h3 a {
62
+ font-size: 17px;
63
+ font-weight: 600 !important;
64
+ box-shadow: none;
65
+ color: #000; !important;
66
+ }
67
+
68
+ .advanced-sidebar-info-panel ol {
69
+ margin: 13px 13px 13px 26px !important;
70
+ list-style: disc !important;
71
+ }
72
+
73
+ .advanced-sidebar-info-panel li {
74
+ font-size: 13px;
75
+ line-height: 1.23076923;
76
+ margin: 0 0 6px 0 !important;
77
+ }
78
+
79
+ .advanced-sidebar-info-panel li a {
80
+ text-decoration: none;
81
+ box-shadow: none;
82
+ color: #0073aa !important;
83
+ }
84
+
85
+ .advanced-sidebar-info-panel .button-primary,
86
+ .advanced-sidebar-info-panel .button-secondary {
87
+ width: 100%;
88
+ text-align: center;
89
+ }
90
+
91
+ .advanced-sidebar-info-panel .button-primary {
92
+ color: #fff !important;
93
+ margin: 15px 0 15px 0;
94
+ }
95
+
96
+ .advanced-sidebar-info-panel .button-secondary {
97
+ margin: 0 0 11px 0;
98
+ }
99
+
100
  .advanced-sidebar-menu-full-width {
101
  width: 100%;
102
  clear: both;
108
 
109
  .advanced-sidebar-menu-styles-box .advanced-sidebar-menu-column select,
110
  .advanced-sidebar-menu-styles-box .advanced-sidebar-menu-column input {
111
+ width: 103px !important;
112
+ margin: 0 0 6px !important;
113
  }
114
 
115
  .advanced-sidebar-menu-styles-box .wp-picker-active {
128
  font-size: 12px;
129
  line-height: 14px !important;
130
  display: block;
131
+ color: #646970;
132
  }
133
 
134
  .advanced-sidebar-menu-column .wp-color-result-text {
149
  outline: none !important;
150
  }
151
 
152
+ .advanced-sidebar-menu-block-field,
153
+ select.advanced-sidebar-menu-block-field {
154
+ display: block !important;
155
+ width: 100% !important;
156
+ margin: 5px 0 0 0 !important;
157
  }
158
 
159
  .advanced-sidebar-menu-styles-button {
164
  transition: all 300ms linear;
165
  position: absolute;
166
  font-size: 40px;
167
+ /* top: 130px; */
168
  right: 50px;
169
  cursor: pointer;
170
  display: none;
193
  display: none;
194
  }
195
 
196
+ .advanced-sidebar-widget-documentation {
197
+ text-align: right;
198
+ }
199
+
200
+ .advanced-sidebar-widget-documentation a {
201
+ font-size: 13px;
202
+ color: #0073aa !important;
203
+ }
204
+
205
  @media all and ( max-width: 1024px ) {
206
  .advanced-sidebar-menu-column {
207
  width: 100%;
resources/js/advanced-sidebar-menu.js CHANGED
@@ -14,8 +14,7 @@ function asm_reveal_element(this_element_id) {
14
  }
15
 
16
  /**
17
- * Proper handling of the show/hide of elements
18
- * for widgets
19
  *
20
  * @since 7.4.5
21
  */
@@ -25,6 +24,8 @@ var advanced_sidebar_menu = {
25
  * Called by PHP so this will run no matter where the widget is loaded.
26
  * This solves issues with page builders as well as widget updating.
27
  *
 
 
28
  * @since 7.4.5
29
  */
30
  init: function () {
@@ -109,3 +110,14 @@ var advanced_sidebar_menu = {
109
  });
110
  }
111
  };
 
 
 
 
 
 
 
 
 
 
 
14
  }
15
 
16
  /**
17
+ * Misc JS for the widget's screen.
 
18
  *
19
  * @since 7.4.5
20
  */
24
  * Called by PHP so this will run no matter where the widget is loaded.
25
  * This solves issues with page builders as well as widget updating.
26
  *
27
+ * For WP 5.8+ this is called via the 'widget-added' event.
28
+ *
29
  * @since 7.4.5
30
  */
31
  init: function () {
110
  });
111
  }
112
  };
113
+
114
+ /**
115
+ * WP 5.8 no longer fires the <script> tag within the PHP because
116
+ * it loads the markup via the REST API. We must use the new
117
+ * event to init the JS.
118
+ *
119
+ * @link https://developer.wordpress.org/block-editor/how-to-guides/widgets/legacy-widget-block/
120
+ */
121
+ jQuery( document ).on( 'widget-added', function() {
122
+ advanced_sidebar_menu.init();
123
+ } );
src/Notice.php CHANGED
@@ -70,7 +70,7 @@ class Notice {
70
  public function info_panel( array $instance, \WP_Widget $widget ) {
71
  if ( $this->is_conflicting_pro_version() ) {
72
  ?>
73
- <div class="advanced-sidebar-menu-column-box" style="border-color: red">
74
  <?php static::instance()->pro_version_warning( true ); ?>
75
  </div>
76
  <?php
@@ -80,15 +80,13 @@ class Notice {
80
  }
81
 
82
  ?>
83
- <div class="advanced-sidebar-menu-column-box">
84
- <h3 style="margin: 8px 0 0 3px;">
85
- <a
86
- href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/"
87
- style="text-decoration: none; color: inherit;">
88
  <?php esc_html_e( 'Advanced Sidebar Menu PRO', 'advanced-sidebar-menu' ); ?>
89
  </a>
90
  </h3>
91
- <ol style="list-style: disc;">
92
  <li><?php esc_html_e( 'Styling options including borders, bullets, colors, backgrounds, size, and font weight.', 'advanced-sidebar-menu' ); ?></li>
93
  <li><?php esc_html_e( 'Accordion menus.', 'advanced-sidebar-menu' ); ?></li>
94
  <li><?php esc_html_e( 'Support for custom navigation menus from Appearance -> Menus.', 'advanced-sidebar-menu' ); ?></li>
@@ -115,25 +113,17 @@ class Notice {
115
  </ol>
116
  <a
117
  class="button-primary"
118
- style="width:100%; text-align: center; margin: 15px 0 15px 0;"
119
  href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/?trigger_buy_now=1"
120
- target="_blank">
 
121
  <?php esc_html_e( 'Upgrade', 'advanced-sidebar-menu' ); ?>
122
  </a>
123
  <div
124
  data-js="advanced-sidebar-menu/pro/preview/trigger"
125
  data-target="advanced-sidebar-menu/pro/preview/<?php echo esc_attr( $widget->id ); ?>"
126
- class="advanced-sidebar-desktop-only">
127
- <?php
128
- if ( Widget_Page::NAME === $widget->id_base ) {
129
- $margin = '20px';
130
- } else {
131
- $margin = '11px';
132
- }
133
- ?>
134
- <button
135
- class="button-secondary"
136
- style="width:100%; text-align: center; margin: 0 0 <?php echo esc_attr( $margin ); ?> 0;">
137
  <?php esc_html_e( 'Preview', 'advanced-sidebar-menu' ); ?>
138
  </button>
139
  </div>
70
  public function info_panel( array $instance, \WP_Widget $widget ) {
71
  if ( $this->is_conflicting_pro_version() ) {
72
  ?>
73
+ <div class="advanced-sidebar-menu-column-box" style="border-color: red; font-size: 13px !important;">
74
  <?php static::instance()->pro_version_warning( true ); ?>
75
  </div>
76
  <?php
80
  }
81
 
82
  ?>
83
+ <div class="advanced-sidebar-menu-column-box advanced-sidebar-info-panel">
84
+ <h3>
85
+ <a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/">
 
 
86
  <?php esc_html_e( 'Advanced Sidebar Menu PRO', 'advanced-sidebar-menu' ); ?>
87
  </a>
88
  </h3>
89
+ <ol>
90
  <li><?php esc_html_e( 'Styling options including borders, bullets, colors, backgrounds, size, and font weight.', 'advanced-sidebar-menu' ); ?></li>
91
  <li><?php esc_html_e( 'Accordion menus.', 'advanced-sidebar-menu' ); ?></li>
92
  <li><?php esc_html_e( 'Support for custom navigation menus from Appearance -> Menus.', 'advanced-sidebar-menu' ); ?></li>
113
  </ol>
114
  <a
115
  class="button-primary"
 
116
  href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/?trigger_buy_now=1"
117
+ target="_blank"
118
+ >
119
  <?php esc_html_e( 'Upgrade', 'advanced-sidebar-menu' ); ?>
120
  </a>
121
  <div
122
  data-js="advanced-sidebar-menu/pro/preview/trigger"
123
  data-target="advanced-sidebar-menu/pro/preview/<?php echo esc_attr( $widget->id ); ?>"
124
+ class="advanced-sidebar-desktop-only"
125
+ >
126
+ <button class="button-secondary">
 
 
 
 
 
 
 
 
127
  <?php esc_html_e( 'Preview', 'advanced-sidebar-menu' ); ?>
128
  </button>
129
  </div>
src/Scripts.php CHANGED
@@ -61,6 +61,9 @@ class Scripts {
61
  * page builders or the backend by standard WordPress or
62
  * really anywhere.
63
  *
 
 
 
64
  * @return void
65
  */
66
  public function init_widget_js() {
61
  * page builders or the backend by standard WordPress or
62
  * really anywhere.
63
  *
64
+ * @notice Does not work in Gutenberg as widget's markup is loaded via REST API
65
+ * and React.
66
+ *
67
  * @return void
68
  */
69
  public function init_widget_js() {