Advanced Sidebar Menu - Version 8.2.0

Version Description

  • Improve widget labels, descriptions and styles.
  • Support blocked styling borders on all levels.
  • Improve Beaver Builder and Elementor styles.
  • Improve info panel.
Download this release

Release Info

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

Code changes from version 8.1.1 to 8.2.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.1.1
8
  * Author URI: https://onpointplugins.com
9
  * Text Domain: advanced-sidebar-menu
10
  *
@@ -15,8 +15,8 @@ if ( defined( 'ADVANCED_SIDEBAR_BASIC_VERSION' ) ) {
15
  return;
16
  }
17
 
18
- define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '8.1.1' );
19
- define( 'ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION', '8.1.4' );
20
  define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
21
  define( 'ADVANCED_SIDEBAR_MENU_URL', plugin_dir_url( __FILE__ ) );
22
 
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.2.0
8
  * Author URI: https://onpointplugins.com
9
  * Text Domain: advanced-sidebar-menu
10
  *
15
  return;
16
  }
17
 
18
+ define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '8.2.0' );
19
+ define( 'ADVANCED_SIDEBAR_MENU_REQUIRED_PRO_VERSION', '8.2.0' );
20
  define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
21
  define( 'ADVANCED_SIDEBAR_MENU_URL', plugin_dir_url( __FILE__ ) );
22
 
languages/advanced-sidebar-menu-de_DE.mo CHANGED
Binary file
languages/advanced-sidebar-menu-de_DE.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Advanced Sidebar Menu\n"
4
- "POT-Creation-Date: 2020-10-26 10:17-0600\n"
5
- "PO-Revision-Date: 2020-10-26 10:18-0600\n"
6
  "Last-Translator: Mat Lipe <support@onpointplugins.com>\n"
7
  "Language-Team: \n"
8
  "Language: de\n"
@@ -10,7 +10,7 @@ msgstr ""
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
13
- "X-Generator: Poedit 2.4.1\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
  "X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
@@ -79,7 +79,7 @@ msgstr "So viel mehr..."
79
  msgid "Upgrade"
80
  msgstr "Aktualisierung"
81
 
82
- #: src/Notice.php:131 src/Notice.php:137
83
  msgid "Preview"
84
  msgstr "Vorschau"
85
 
@@ -94,43 +94,64 @@ msgstr ""
94
  msgid "Advanced Sidebar Categories Menu"
95
  msgstr "Advanced Sidebar Kategorien-Menü"
96
 
97
- #: src/Widget/Category.php:99
98
- msgid "Display the highest level parent category"
99
- msgstr "Anzeige der übergeordneten Kategorie der höchsten Ebene"
 
 
 
 
 
 
 
 
 
100
 
101
- #: src/Widget/Category.php:105
102
- msgid "Display menu when there is only the parent category"
103
- msgstr "Menü \"Anzeige\" wird nur die übergeordnete Kategorie"
 
 
 
104
 
105
- #: src/Widget/Category.php:111
106
- msgid "Always display child categories"
107
- msgstr "Immer untergeordnete Kategorien anzeigen"
108
 
109
- #: src/Widget/Category.php:117
110
- msgid "Levels of child categories to display"
111
- msgstr "Niveau der Kinderkategorien zu zeigen"
 
 
112
 
113
- #: src/Widget/Category.php:159
114
- msgid "Display categories on single posts"
115
- msgstr "Kategorien auf einzelne Beiträge anzeigen"
 
 
116
 
117
- #: src/Widget/Category.php:166
118
- msgid "Display each single post's category"
119
- msgstr "Zeigen Sie die einzelnen Kategorien der einzelnen Posts an"
 
 
120
 
121
- #: src/Widget/Category.php:173
122
  msgid "In a new widget"
123
  msgstr "In einem neuen Widget"
124
 
125
- #: src/Widget/Category.php:176
126
  msgid "In another list in the same widget"
127
  msgstr "In einer anderen Liste im selben Widget"
128
 
129
- #: src/Widget/Category.php:202
130
- msgid "Categories to exclude (ids), comma separated"
131
- msgstr "Kategorien ausschließen (Ids), durch Kommata getrennt"
 
 
 
132
 
133
- #: src/Widget/Category.php:235 src/Widget/Page.php:240
134
  msgid "Title"
135
  msgstr "Titel"
136
 
@@ -144,34 +165,16 @@ msgstr ""
144
  msgid "Advanced Sidebar Pages Menu"
145
  msgstr "Advanced Sidebar Seitenmenü"
146
 
147
- #: src/Widget/Page.php:95
148
- msgid "Display highest level parent page"
149
- msgstr "Zeigt die oberste Seite der obersten Ebene an"
150
-
151
- #: src/Widget/Page.php:103
152
- msgid "Display menu when there is only the parent page"
153
- msgstr "Menü \"Anzeige\" wird nur die übergeordnete Seite"
154
-
155
- #: src/Widget/Page.php:110
156
- msgid "Always display child pages"
157
- msgstr "Immer untergeordnete Seiten anzeigen"
158
-
159
- #: src/Widget/Page.php:123
160
- msgid "Maximum level of child pages to display"
161
- msgstr "Maximale Höhe der zu zeigestellenden Kinderseiten"
162
-
163
- #: src/Widget/Page.php:129
164
- msgid " - All - "
165
- msgstr " Alle "
166
 
167
- #: src/Widget/Page.php:167
168
  msgid "Order by"
169
  msgstr "Sortieren nach"
170
 
171
- #: src/Widget/Page.php:208
172
- msgid "Pages to exclude (ids), comma separated"
173
- msgstr "Auszuschließende Seiten (IDs), durch Kommas getrennt"
174
-
175
  #. Plugin Name of the plugin/theme
176
  msgid "Advanced Sidebar Menu"
177
  msgstr "Advanced Sidebar Menu"
@@ -196,6 +199,32 @@ msgstr "OnPoint Plugins"
196
  msgid "https://onpointplugins.com"
197
  msgstr "https://onpointplugins.com"
198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  #, php-format
200
  #~ msgctxt "{<a>}{</a>}"
201
  #~ msgid ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Advanced Sidebar Menu\n"
4
+ "POT-Creation-Date: 2020-12-07 10:17-0700\n"
5
+ "PO-Revision-Date: 2020-12-07 10:20-0700\n"
6
  "Last-Translator: Mat Lipe <support@onpointplugins.com>\n"
7
  "Language-Team: \n"
8
  "Language: de\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
13
+ "X-Generator: Poedit 2.4.2\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
  "X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
79
  msgid "Upgrade"
80
  msgstr "Aktualisierung"
81
 
82
+ #: src/Notice.php:137
83
  msgid "Preview"
84
  msgstr "Vorschau"
85
 
94
  msgid "Advanced Sidebar Categories Menu"
95
  msgstr "Advanced Sidebar Kategorien-Menü"
96
 
97
+ #. translators: Selected taxonomy single label
98
+ #: src/Widget/Category.php:123
99
+ #, php-format
100
+ msgid "Display the highest level parent %s"
101
+ msgstr "Anzeige der übergeordneten %s der höchsten Ebene"
102
+
103
+ #. translators: Selected taxonomy single label
104
+ #. translators: Selected post type single label
105
+ #: src/Widget/Category.php:132 src/Widget/Page.php:130
106
+ #, php-format
107
+ msgid "Display menu when there is only the parent %s"
108
+ msgstr "Menü \"Anzeige\" wird nur die übergeordnete %s"
109
 
110
+ #. translators: Selected taxonomy plural label
111
+ #. translators: Selected post type plural label
112
+ #: src/Widget/Category.php:141 src/Widget/Page.php:140
113
+ #, php-format
114
+ msgid "Always display child %s"
115
+ msgstr "Immer untergeordnete %s anzeigen"
116
 
117
+ #: src/Widget/Category.php:155 src/Widget/Page.php:161
118
+ msgid "- All -"
119
+ msgstr "- Alle -"
120
 
121
+ #. translators: {select html input}, {Selected post type plural label}
122
+ #: src/Widget/Category.php:170 src/Widget/Page.php:175
123
+ #, php-format
124
+ msgid "Display %1$s levels of child %2$s"
125
+ msgstr "Anzeigen %1$s Ebenen der %2$s"
126
 
127
+ #. translators: Selected taxonomy plural label
128
+ #: src/Widget/Category.php:200
129
+ #, php-format
130
+ msgid "Display %s on single posts"
131
+ msgstr "%s auf einzelne Beiträge anzeigen"
132
 
133
+ #. translators: Selected taxonomy single label
134
+ #: src/Widget/Category.php:210
135
+ #, php-format
136
+ msgid "Display each single post's %s"
137
+ msgstr "Anzeigen der %s jedes einzelnen Beitrags"
138
 
139
+ #: src/Widget/Category.php:220
140
  msgid "In a new widget"
141
  msgstr "In einem neuen Widget"
142
 
143
+ #: src/Widget/Category.php:223
144
  msgid "In another list in the same widget"
145
  msgstr "In einer anderen Liste im selben Widget"
146
 
147
+ #. translators: Selected taxonomy plural label
148
+ #. translators: Selected post type plural label
149
+ #: src/Widget/Category.php:251 src/Widget/Page.php:245
150
+ #, php-format
151
+ msgid "%s to exclude (ids, comma separated)"
152
+ msgstr "Auszuschließende %s (IDs), durch Kommas getrennt"
153
 
154
+ #: src/Widget/Category.php:285 src/Widget/Page.php:278
155
  msgid "Title"
156
  msgstr "Titel"
157
 
165
  msgid "Advanced Sidebar Pages Menu"
166
  msgstr "Advanced Sidebar Seitenmenü"
167
 
168
+ #. translators: Selected post type single label
169
+ #: src/Widget/Page.php:119
170
+ #, php-format
171
+ msgid "Display highest level parent %s"
172
+ msgstr "Anzeige der übergeordneten %s der höchsten Ebene"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
+ #: src/Widget/Page.php:202
175
  msgid "Order by"
176
  msgstr "Sortieren nach"
177
 
 
 
 
 
178
  #. Plugin Name of the plugin/theme
179
  msgid "Advanced Sidebar Menu"
180
  msgstr "Advanced Sidebar Menu"
199
  msgid "https://onpointplugins.com"
200
  msgstr "https://onpointplugins.com"
201
 
202
+ #, php-format
203
+ #~ msgid "Levels of child %s to display"
204
+ #~ msgstr "Niveau der Kinder %s zu zeigen"
205
+
206
+ #, php-format
207
+ #~ msgid "Maximum level of child %s to display"
208
+ #~ msgstr "Maximale Höhe der zu zeigestellenden %s Kinder"
209
+
210
+ #~ msgid "Display highest level parent page"
211
+ #~ msgstr "Zeigt die oberste Seite der obersten Ebene an"
212
+
213
+ #~ msgid "Display menu when there is only the parent page"
214
+ #~ msgstr "Menü \"Anzeige\" wird nur die übergeordnete Seite"
215
+
216
+ #~ msgid "Always display child pages"
217
+ #~ msgstr "Immer untergeordnete Seiten anzeigen"
218
+
219
+ #~ msgid "Display menu when there is only the parent category"
220
+ #~ msgstr "Menü \"Anzeige\" wird nur die übergeordnete Kategorie"
221
+
222
+ #~ msgid "Always display child categories"
223
+ #~ msgstr "Immer untergeordnete Kategorien anzeigen"
224
+
225
+ #~ msgid "Categories to exclude (ids), comma separated"
226
+ #~ msgstr "Kategorien ausschließen (Ids), durch Kommata getrennt"
227
+
228
  #, php-format
229
  #~ msgctxt "{<a>}{</a>}"
230
  #~ msgid ""
languages/advanced-sidebar-menu.pot CHANGED
@@ -3,14 +3,14 @@ msgid ""
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Advanced Sidebar Menu\n"
6
- "POT-Creation-Date: 2020-10-26 10:17-0600\n"
7
  "PO-Revision-Date: 2019-03-05 12:29-0500\n"
8
  "Last-Translator: \n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 2.4.1\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
  "X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
@@ -72,7 +72,7 @@ msgstr ""
72
  msgid "Upgrade"
73
  msgstr ""
74
 
75
- #: src/Notice.php:131 src/Notice.php:137
76
  msgid "Preview"
77
  msgstr ""
78
 
@@ -85,43 +85,64 @@ msgstr ""
85
  msgid "Advanced Sidebar Categories Menu"
86
  msgstr ""
87
 
88
- #: src/Widget/Category.php:99
89
- msgid "Display the highest level parent category"
 
 
90
  msgstr ""
91
 
92
- #: src/Widget/Category.php:105
93
- msgid "Display menu when there is only the parent category"
 
 
 
 
 
 
 
 
 
 
94
  msgstr ""
95
 
96
- #: src/Widget/Category.php:111
97
- msgid "Always display child categories"
98
  msgstr ""
99
 
100
- #: src/Widget/Category.php:117
101
- msgid "Levels of child categories to display"
 
 
102
  msgstr ""
103
 
104
- #: src/Widget/Category.php:159
105
- msgid "Display categories on single posts"
 
 
106
  msgstr ""
107
 
108
- #: src/Widget/Category.php:166
109
- msgid "Display each single post's category"
 
 
110
  msgstr ""
111
 
112
- #: src/Widget/Category.php:173
113
  msgid "In a new widget"
114
  msgstr ""
115
 
116
- #: src/Widget/Category.php:176
117
  msgid "In another list in the same widget"
118
  msgstr ""
119
 
120
- #: src/Widget/Category.php:202
121
- msgid "Categories to exclude (ids), comma separated"
 
 
 
122
  msgstr ""
123
 
124
- #: src/Widget/Category.php:235 src/Widget/Page.php:240
125
  msgid "Title"
126
  msgstr ""
127
 
@@ -133,34 +154,16 @@ msgstr ""
133
  msgid "Advanced Sidebar Pages Menu"
134
  msgstr ""
135
 
136
- #: src/Widget/Page.php:95
137
- msgid "Display highest level parent page"
138
- msgstr ""
139
-
140
- #: src/Widget/Page.php:103
141
- msgid "Display menu when there is only the parent page"
142
- msgstr ""
143
-
144
- #: src/Widget/Page.php:110
145
- msgid "Always display child pages"
146
- msgstr ""
147
-
148
- #: src/Widget/Page.php:123
149
- msgid "Maximum level of child pages to display"
150
- msgstr ""
151
-
152
- #: src/Widget/Page.php:129
153
- msgid " - All - "
154
  msgstr ""
155
 
156
- #: src/Widget/Page.php:167
157
  msgid "Order by"
158
  msgstr ""
159
 
160
- #: src/Widget/Page.php:208
161
- msgid "Pages to exclude (ids), comma separated"
162
- msgstr ""
163
-
164
  #. Plugin Name of the plugin/theme
165
  msgid "Advanced Sidebar Menu"
166
  msgstr ""
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Advanced Sidebar Menu\n"
6
+ "POT-Creation-Date: 2020-12-07 10:16-0700\n"
7
  "PO-Revision-Date: 2019-03-05 12:29-0500\n"
8
  "Last-Translator: \n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.4.2\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
  "X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
72
  msgid "Upgrade"
73
  msgstr ""
74
 
75
+ #: src/Notice.php:137
76
  msgid "Preview"
77
  msgstr ""
78
 
85
  msgid "Advanced Sidebar Categories Menu"
86
  msgstr ""
87
 
88
+ #. translators: Selected taxonomy single label
89
+ #: src/Widget/Category.php:123
90
+ #, php-format
91
+ msgid "Display the highest level parent %s"
92
  msgstr ""
93
 
94
+ #. translators: Selected taxonomy single label
95
+ #. translators: Selected post type single label
96
+ #: src/Widget/Category.php:132 src/Widget/Page.php:130
97
+ #, php-format
98
+ msgid "Display menu when there is only the parent %s"
99
+ msgstr ""
100
+
101
+ #. translators: Selected taxonomy plural label
102
+ #. translators: Selected post type plural label
103
+ #: src/Widget/Category.php:141 src/Widget/Page.php:140
104
+ #, php-format
105
+ msgid "Always display child %s"
106
  msgstr ""
107
 
108
+ #: src/Widget/Category.php:155 src/Widget/Page.php:161
109
+ msgid "- All -"
110
  msgstr ""
111
 
112
+ #. translators: {select html input}, {Selected post type plural label}
113
+ #: src/Widget/Category.php:170 src/Widget/Page.php:175
114
+ #, php-format
115
+ msgid "Display %1$s levels of child %2$s"
116
  msgstr ""
117
 
118
+ #. translators: Selected taxonomy plural label
119
+ #: src/Widget/Category.php:200
120
+ #, php-format
121
+ msgid "Display %s on single posts"
122
  msgstr ""
123
 
124
+ #. translators: Selected taxonomy single label
125
+ #: src/Widget/Category.php:210
126
+ #, php-format
127
+ msgid "Display each single post's %s"
128
  msgstr ""
129
 
130
+ #: src/Widget/Category.php:220
131
  msgid "In a new widget"
132
  msgstr ""
133
 
134
+ #: src/Widget/Category.php:223
135
  msgid "In another list in the same widget"
136
  msgstr ""
137
 
138
+ #. translators: Selected taxonomy plural label
139
+ #. translators: Selected post type plural label
140
+ #: src/Widget/Category.php:251 src/Widget/Page.php:245
141
+ #, php-format
142
+ msgid "%s to exclude (ids, comma separated)"
143
  msgstr ""
144
 
145
+ #: src/Widget/Category.php:285 src/Widget/Page.php:278
146
  msgid "Title"
147
  msgstr ""
148
 
154
  msgid "Advanced Sidebar Pages Menu"
155
  msgstr ""
156
 
157
+ #. translators: Selected post type single label
158
+ #: src/Widget/Page.php:119
159
+ #, php-format
160
+ msgid "Display highest level parent %s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  msgstr ""
162
 
163
+ #: src/Widget/Page.php:202
164
  msgid "Order by"
165
  msgstr ""
166
 
 
 
 
 
167
  #. Plugin Name of the plugin/theme
168
  msgid "Advanced Sidebar Menu"
169
  msgstr ""
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: menus, sidebar menu, hierarchy, category menu, pages menu
6
  Requires at least: 5.0.0
7
  Tested up to: 5.6.0
8
  Requires PHP: 5.6.0
9
- Stable tag: 8.1.1
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 priority support, the ability to customize the look and feel, custom link text, excluding of pages, category ordering, accordions, custom post types, custom taxonomies, and so much more!</strong>
18
 
19
- <blockquote><a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/" target="_blank">PRO version 8.1.0</a> is now available with support to exclude and change titles of navigation menu items using each page's settings!</blockquote>
20
 
21
  <h3>Features</h3>
22
  * Page and Category widgets.
@@ -49,35 +49,34 @@ 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
- * Priority support.
53
- * Ability to customize each page's link text.
54
- * Click and drag styling for page, category, and navigation menu widgets.
55
- * Styling options for links including color, background color, size, and font weight.
56
  * Styling options for different levels of links.
57
  * Styling options for the current page or category.
58
  * Styling options for the parent of the current page or category.
59
- * Block styling options including borders and border colors.
60
- * Bullet style selection from 7 styles or select none to have no bullets.
61
- * Accordion menu support for pages, categories, and navigation menus.
62
  * Accordion icon style and color selection.
63
  * Accordion option to keep all sections closed until clicked.
64
- * Accordion option to include the highest level parent in accordion.
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 displayed child pages is not checked.
68
- * Ability to select and display custom post types.
69
  * Ability to select and display custom taxonomies.
70
- * Optionally display the current page's parents, grandparents, and children only.
71
- * Optionally display child page siblings when on a child page. With our without grandchildren available. .
72
- * Ability to display the widgets everywhere the sidebar displays.
73
- * Ability to select the parent page/category when using the display widget everywhere option.
74
- * Ability to display assigned posts or custom post types under categories.
75
- * Ability to select which levels of categories assigned posts should display under. **NEW**
76
- * Ability to limit the number of posts or custom post types to display under categories.
77
- * Support for custom navigation menus from Appearance -> Menus.
78
- * Ability to display the current Navigation Menu's items parents, siblings and children only.
79
- * Optionally display the top-level Navigation Menu's items when there are no child items or not viewing a menu item.
80
- * Access to members only support area.
81
 
82
  <h3>Currently ships with the following languages</h3>
83
  * English (US)
@@ -153,6 +152,12 @@ Yes. Based on whatever page, post, or category you are on, the menu will change
153
 
154
 
155
  == Changelog ==
 
 
 
 
 
 
156
  = 8.1.1 =
157
  * Improve readme.
158
  * Tested to WordPress 5.6.0.
@@ -240,6 +245,9 @@ Major version update. See <a href="https://onpointplugins.com/advanced-sidebar-m
240
 
241
 
242
  == Upgrade Notice ==
 
 
 
243
  = 8.0.0 =
244
  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.
245
 
6
  Requires at least: 5.0.0
7
  Tested up to: 5.6.0
8
  Requires PHP: 5.6.0
9
+ Stable tag: 8.2.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 priority support, the ability to customize the look and feel, custom link text, excluding of pages, category ordering, accordions, custom post types, custom taxonomies, and so much more!</strong>
18
 
19
+ <blockquote><a href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/" target="_blank">PRO version 8.2.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.
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.
56
  * Styling options for the current page or category.
57
  * Styling options for the parent of the current page or category.
58
+ * Blocked styling options including borders, border width, and border colors.
59
+ * Option to choose from 7 bullet styles or no bullets.
60
+ * Accordion menu support for pages, categories, and navigation menus.
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.
67
+ * Ability to select and display custom post types.
68
  * Ability to select and display custom taxonomies.
69
+ * Option to display only the current page's parents, grandparents, and children.
70
+ * Option to display child page siblings when on a child page (with or without grandchildren available).
71
+ * Ability to display the widgets everywhere the widget area is used (including homepage if applicable).
72
+ * Ability to select the highest level parent page/category.
73
+ * Ability to select which levels of categories assigned posts will display under.
74
+ * Ability to display assigned posts or custom post types under categories or taxonomies.
75
+ * Ability to limit the number of posts or custom post types to display under categories.
76
+ * Support for custom navigation menus from Appearance -> Menus.
77
+ * Ability to display the current navigation menu item's parents and children only.
78
+ * Option to display the top-level navigation menu items when there are no child items or not viewing a menu item.
79
+ * Priority support with access to members only support area.
80
 
81
  <h3>Currently ships with the following languages</h3>
82
  * English (US)
152
 
153
 
154
  == Changelog ==
155
+ = 8.2.0 =
156
+ * Improve widget labels, descriptions and styles.
157
+ * Support blocked styling borders on all levels.
158
+ * Improve Beaver Builder and Elementor styles.
159
+ * Improve info panel.
160
+
161
  = 8.1.1 =
162
  * Improve readme.
163
  * Tested to WordPress 5.6.0.
245
 
246
 
247
  == Upgrade Notice ==
248
+ = 8.2.0 =
249
+ Update to support PRO version 8.2.0
250
+
251
  = 8.0.0 =
252
  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.
253
 
resources/css/advanced-sidebar-menu.css CHANGED
@@ -19,6 +19,62 @@
19
  clear: both;
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  .advanced-sidebar-menu-close-icon {
23
  transition: all 300ms linear;
24
  position: absolute;
@@ -52,17 +108,23 @@
52
  display: none;
53
  }
54
 
55
- @media all and ( max-width: 620px ) {
56
  .advanced-sidebar-menu-column {
57
  width: 100%;
58
  }
59
 
 
 
 
 
60
  .advanced-sidebar-menu-column-right {
61
  margin-left: 0;
62
  }
63
- }
64
 
65
- @media all and ( max-width: 1024px ) {
 
 
 
66
  .advanced-sidebar-desktop-only {
67
  display: none !important;
68
  }
@@ -70,38 +132,100 @@
70
  .advanced-sidebar-menu-open .advanced-sidebar-menu-column-box {
71
  display: inherit;
72
  }
 
 
 
 
 
73
  }
74
 
75
  /** Elementor specific styles **/
76
  .elementor-control-content .advanced-sidebar-menu-column {
77
  width: 100%;
78
  }
 
79
  .elementor-control-content .advanced-sidebar-menu-column-right {
80
  margin-left: 0;
81
  }
 
 
 
 
82
  .elementor-control-content .advanced-sidebar-menu-column-box .widefat {
83
  width: 100%;
 
 
84
  }
85
- .elementor-control-content .advanced-sidebar-menu-column-box .wp-picker-container input[type="text"].wp-color-picker {
 
86
  min-height: auto;
87
- padding: 6px 3px;
88
  font-weight: 600;
89
  }
 
90
  .elementor-control-content .advanced-sidebar-menu-column-box .advanced-sidebar-menu-border-color .wp-color-result {
91
  position: relative;
92
  top: 7px;
93
  }
94
- .elementor-control-content .advanced-sidebar-menu-column-box .wp-picker-container{
 
95
  float: none;
96
  }
 
97
  .elementor-control-content .advanced-sidebar-menu-column-box .wp-picker-container.wp-picker-active {
98
  top: auto;
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  /** Beaver Builder specific styles **/
102
  .fl-field-control-wrapper .advanced-sidebar-menu-column {
103
- width: calc( 100% + 30px ) !important;
104
- margin-left: -30px !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  }
106
 
107
  .fl-field-control-wrapper .advanced-sidebar-menu-column-right {
@@ -109,16 +233,16 @@
109
  }
110
 
111
  .fl-field-control-wrapper .advanced-sidebar-menu-column-box .widefat {
112
- width: 100%;
 
113
  }
114
 
115
- .fl-field-control-wrapper .advanced-sidebar-menu-column-box .wp-picker-container input[type="text"].wp-color-picker {
116
  min-height: auto;
117
  padding: 6px 3px;
118
  font-weight: 600;
119
  }
120
 
121
-
122
  .fl-field-control-wrapper .advanced-sidebar-menu-column-box .wp-picker-container {
123
  float: none;
124
  }
@@ -128,8 +252,40 @@
128
  top: 7px;
129
  }
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
  .fl-field-control-wrapper .advanced-sidebar-menu-column-box .wp-color-result-text {
133
  color: #555;
134
  line-height: 2.545;
135
  }
 
 
 
 
 
 
 
 
 
 
 
19
  clear: both;
20
  }
21
 
22
+ .advanced-sidebar-menu-styles-box {
23
+ padding: 0 10px 10px;
24
+ }
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 {
33
+ width: 200%;
34
+ display: block;
35
+ margin: 25px 0 10px calc(-100% - 5px);
36
+ }
37
+
38
+ .advanced-sidebar-menu-styles-box .wp-picker-clear {
39
+ width: auto !important;
40
+ }
41
+
42
+ .advanced-sidebar-menu-column .description {
43
+ padding: 0 !important;
44
+ margin: 4px 0 0 0 !important;
45
+ font-size: 12px;
46
+ line-height: 14px !important;
47
+ display: block;
48
+ }
49
+
50
+ .advanced-sidebar-menu-column .wp-color-result-text {
51
+ background: #fff;
52
+ }
53
+
54
+ .advanced-sidebar-menu-icon-preview {
55
+ display: inline-block;
56
+ margin: 0 0 0 5px;
57
+ }
58
+
59
+ .wp-customizer .advanced-sidebar-menu-icon-preview {
60
+ margin: 5px 0 0 5px;
61
+ }
62
+
63
+ .advanced-sidebar-menu-icon-preview .dashicons {
64
+ font-size: 25px;
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 {
75
+ text-align: center;
76
+ }
77
+
78
  .advanced-sidebar-menu-close-icon {
79
  transition: all 300ms linear;
80
  position: absolute;
108
  display: none;
109
  }
110
 
111
+ @media all and ( max-width: 1024px ) {
112
  .advanced-sidebar-menu-column {
113
  width: 100%;
114
  }
115
 
116
+ .advanced-sidebar-menu-column .advanced-sidebar-menu-column {
117
+ width: 49%;
118
+ }
119
+
120
  .advanced-sidebar-menu-column-right {
121
  margin-left: 0;
122
  }
 
123
 
124
+ .advanced-sidebar-menu-column .advanced-sidebar-menu-column-right {
125
+ margin-left: 2%;
126
+ }
127
+
128
  .advanced-sidebar-desktop-only {
129
  display: none !important;
130
  }
132
  .advanced-sidebar-menu-open .advanced-sidebar-menu-column-box {
133
  display: inherit;
134
  }
135
+
136
+ .advanced-sidebar-menu-styles-box .wp-picker-active {
137
+ width: 100%;
138
+ margin: 5px 0 10px 0;
139
+ }
140
  }
141
 
142
  /** Elementor specific styles **/
143
  .elementor-control-content .advanced-sidebar-menu-column {
144
  width: 100%;
145
  }
146
+
147
  .elementor-control-content .advanced-sidebar-menu-column-right {
148
  margin-left: 0;
149
  }
150
+
151
+ .elementor-control-content .advanced-sidebar-menu-column-box select,
152
+ .elementor-control-content .advanced-sidebar-menu-column-box input[type='text'],
153
+ .elementor-control-content .advanced-sidebar-menu-column-box input[type='number'],
154
  .elementor-control-content .advanced-sidebar-menu-column-box .widefat {
155
  width: 100%;
156
+ background: #fff;
157
+ color: #000;
158
  }
159
+
160
+ .elementor-control-content .advanced-sidebar-menu-column-box .wp-picker-container input[type='text'].wp-color-picker {
161
  min-height: auto;
 
162
  font-weight: 600;
163
  }
164
+
165
  .elementor-control-content .advanced-sidebar-menu-column-box .advanced-sidebar-menu-border-color .wp-color-result {
166
  position: relative;
167
  top: 7px;
168
  }
169
+
170
+ .elementor-control-content .advanced-sidebar-menu-column-box .wp-picker-container {
171
  float: none;
172
  }
173
+
174
  .elementor-control-content .advanced-sidebar-menu-column-box .wp-picker-container.wp-picker-active {
175
  top: auto;
176
  }
177
 
178
+ .elementor-control-content .advanced-sidebar-menu-styles-box .wp-picker-active {
179
+ width: 100%;
180
+ margin: 5px 0 10px 0;
181
+ }
182
+
183
+ .elementor-control-content .advanced-sidebar-menu-column-box .wp-picker-container input[type='text'].wp-color-picker {
184
+ padding: 0 5px;
185
+ }
186
+
187
+ .elementor-control-content .advanced-sidebar-menu-column-box .wp-picker-clear {
188
+ width: auto !important;
189
+ }
190
+
191
+ .elementor-control-content .advanced-sidebar-menu-icon-preview {
192
+ margin: 5px 0 0 !important;
193
+ }
194
+
195
+ .elementor-control-content .advanced-sidebar-menu-column-box h3 {
196
+ font-size: 17px;
197
+ margin: 10px 0;
198
+ }
199
+
200
+ @media (prefers-color-scheme: dark) {
201
+ .elementor-control-content .advanced-sidebar-menu-column-box {
202
+ background-color: #404349 !important;
203
+ color: #e0e1e3 !important;
204
+ }
205
+ }
206
+
207
  /** Beaver Builder specific styles **/
208
  .fl-field-control-wrapper .advanced-sidebar-menu-column {
209
+ width: calc(100% + 20px) !important;
210
+ margin-left: -20px !important;
211
+ }
212
+
213
+ .fl-field-control-wrapper .advanced-sidebar-menu-column .advanced-sidebar-menu-column {
214
+ margin-left: 0 !important;
215
+ }
216
+
217
+ .fl-field-control-wrapper .advanced-sidebar-menu-styles-button {
218
+ margin: 0 auto 15px auto !important;
219
+ width: 75%
220
+ }
221
+
222
+ .fl-field-control-wrapper .advanced-sidebar-menu-styles-button > div {
223
+ width: 100%;
224
+ text-align: center;
225
+ }
226
+
227
+ .fl-field-control-wrapper .advanced-sidebar-menu-column select {
228
+ width: 90% !important;
229
  }
230
 
231
  .fl-field-control-wrapper .advanced-sidebar-menu-column-right {
233
  }
234
 
235
  .fl-field-control-wrapper .advanced-sidebar-menu-column-box .widefat {
236
+ width: 90%;
237
+ text-align: center;
238
  }
239
 
240
+ .fl-field-control-wrapper .advanced-sidebar-menu-column-box .wp-picker-container input[type='text'].wp-color-picker {
241
  min-height: auto;
242
  padding: 6px 3px;
243
  font-weight: 600;
244
  }
245
 
 
246
  .fl-field-control-wrapper .advanced-sidebar-menu-column-box .wp-picker-container {
247
  float: none;
248
  }
252
  top: 7px;
253
  }
254
 
255
+ .fl-field-control-wrapper .advanced-sidebar-menu-icon-preview {
256
+ margin: 15px 0 -15px !important;
257
+ }
258
+
259
+ .fl-field-control-wrapper .advanced-sidebar-menu-column-box h3 {
260
+ font-size: 17px;
261
+ margin: 10px 0;
262
+ }
263
+
264
+ .fl-field-control-wrapper .advanced-sidebar-menu-column-box input {
265
+ margin: 0 !important;
266
+ }
267
+
268
+ .fl-field-control-wrapper .advanced-sidebar-menu-column-box label {
269
+ display: inline !important;
270
+ vertical-align: middle !important;
271
+ }
272
+
273
+ .fl-field-control-wrapper .advanced-sidebar-menu-column-box input[type=checkbox] {
274
+ vertical-align: middle !important;
275
+ }
276
 
277
  .fl-field-control-wrapper .advanced-sidebar-menu-column-box .wp-color-result-text {
278
  color: #555;
279
  line-height: 2.545;
280
  }
281
+
282
+ .fl-field-control-wrapper .advanced-sidebar-menu-styles-box .wp-picker-active {
283
+ width: 100%;
284
+ margin: 5px 0 10px 0;
285
+ }
286
+
287
+ .fl-field-control-wrapper .advanced-sidebar-menu-column-box .wp-picker-container input[type='text'].wp-color-picker {
288
+ height: 30px !important;
289
+ display: inline-block !important;
290
+ margin: -2px 6px 0 0 !important;
291
+ }
resources/img/category-widget-min-1x.png DELETED
Binary file
resources/img/category-widget-min.png DELETED
Binary file
resources/img/category-widget.png DELETED
Binary file
resources/img/navigation-widget-min.png DELETED
Binary file
resources/img/navigation-widget.png DELETED
Binary file
resources/img/pages-widget-min-1x.png DELETED
Binary file
resources/img/pages-widget-min.png DELETED
Binary file
resources/img/pages-widget.png DELETED
Binary file
resources/img/widget-color-selections-min.png DELETED
Binary file
resources/img/widget-color-selections.png DELETED
Binary file
resources/js/advanced-sidebar-menu.js CHANGED
@@ -76,11 +76,22 @@ var advanced_sidebar_menu = {
76
  * button is clicked.
77
  *
78
  * Adds a class to the wrap which allows hiding the existing options
79
- * to prevent inconistant margin requirements.
80
  *
81
  * @since 8.1.0
82
  */
83
  handlePreviews: function () {
 
 
 
 
 
 
 
 
 
 
 
84
  jQuery( '[data-js="advanced-sidebar-menu/pro/preview/trigger"]' ).on( 'click', function( ev ) {
85
  ev.preventDefault();
86
  var el = jQuery( '[data-js="' + jQuery( this ).data( 'target' ) + '"]' );
76
  * button is clicked.
77
  *
78
  * Adds a class to the wrap which allows hiding the existing options
79
+ * to prevent inconsistent margin requirements.
80
  *
81
  * @since 8.1.0
82
  */
83
  handlePreviews: function () {
84
+ /**
85
+ * Failsafe in case the image cannot load from onpointplugins.com.
86
+ * Better to not have a preview than an broken one.
87
+ */
88
+ jQuery( '[data-js="advanced-sidebar-menu/pro/preview/image"]')
89
+ .on( 'error', function( ev ){
90
+ jQuery( ev.target ).parent().parent()
91
+ .find( '[data-js="advanced-sidebar-menu/pro/preview/trigger"]' ).remove();
92
+ jQuery( ev.target ).remove();
93
+ })
94
+
95
  jQuery( '[data-js="advanced-sidebar-menu/pro/preview/trigger"]' ).on( 'click', function( ev ) {
96
  ev.preventDefault();
97
  var el = jQuery( '[data-js="' + jQuery( this ).data( 'target' ) + '"]' );
src/Menus/Category.php CHANGED
@@ -330,7 +330,7 @@ class Category extends Menu_Abstract {
330
 
331
  do {
332
  $term = get_term( $term_id, $this->get_taxonomy() );
333
- if ( ! is_wp_error( $term ) ) {
334
  $term_id = $term->parent;
335
  $cat_ancestors[] = $term_id;
336
  } else {
330
 
331
  do {
332
  $term = get_term( $term_id, $this->get_taxonomy() );
333
+ if ( is_a( $term, \WP_Term::class ) ) {
334
  $term_id = $term->parent;
335
  $cat_ancestors[] = $term_id;
336
  } else {
src/Notice.php CHANGED
@@ -81,7 +81,7 @@ class Notice {
81
 
82
  ?>
83
  <div class="advanced-sidebar-menu-column-box">
84
- <h3 style="margin: 0 0 0 3px;">
85
  <a
86
  href="https://onpointplugins.com/product/advanced-sidebar-menu-pro/"
87
  style="text-decoration: none; color: inherit;">
@@ -126,19 +126,16 @@ class Notice {
126
  class="advanced-sidebar-desktop-only">
127
  <?php
128
  if ( Widget_Page::NAME === $widget->id_base ) {
129
- ?>
130
- <button class="button-secondary" style="width:100%; text-align: center; margin: 0 0 23px 0;">
131
- <?php esc_html_e( 'Preview', 'advanced-sidebar-menu' ); ?>
132
- </button>
133
- <?php
134
  } else {
135
- ?>
136
- <button class="button-secondary" style="width:100%; text-align: center; margin: 0 0 14px 0;">
137
- <?php esc_html_e( 'Preview', 'advanced-sidebar-menu' ); ?>
138
- </button>
139
- <?php
140
  }
141
  ?>
 
 
 
 
 
142
  </div>
143
  </div>
144
  <?php
@@ -153,9 +150,9 @@ class Notice {
153
  * @param \WP_Widget $widget - Widget class.
154
  */
155
  public function preview( array $instance, \WP_Widget $widget ) {
156
- $src = 'pages-widget-min.png';
157
  if ( Category::NAME === $widget->id_base ) {
158
- $src = 'category-widget-min.png';
159
  }
160
  ?>
161
  <div
@@ -163,9 +160,10 @@ class Notice {
163
  class="advanced-sidebar-desktop-only advanced-sidebar-menu-full-width advanced-sidebar-menu-preview-wrap">
164
  <div class="dashicons dashicons-no-alt advanced-sidebar-menu-close-icon"></div>
165
  <img
 
166
  class="advanced-sidebar-menu-preview-image"
167
- src="<?php echo esc_url( ADVANCED_SIDEBAR_MENU_URL . 'resources/img/' . $src ); ?>"
168
- srcset="<?php echo esc_url( ADVANCED_SIDEBAR_MENU_URL . 'resources/img/' . str_replace( '.png', '-1x.png', $src ) ); ?> 1x, <?php echo esc_url( ADVANCED_SIDEBAR_MENU_URL . 'resources/img/' . $src ); ?> 2x"
169
  alt="PRO version widget options" />
170
  </div>
171
  <?php
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;">
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>
140
  </div>
141
  <?php
150
  * @param \WP_Widget $widget - Widget class.
151
  */
152
  public function preview( array $instance, \WP_Widget $widget ) {
153
+ $src = 'pages-widget-min.png?version=' . ADVANCED_SIDEBAR_BASIC_VERSION;
154
  if ( Category::NAME === $widget->id_base ) {
155
+ $src = 'category-widget-min.png?version=' . ADVANCED_SIDEBAR_BASIC_VERSION;
156
  }
157
  ?>
158
  <div
160
  class="advanced-sidebar-desktop-only advanced-sidebar-menu-full-width advanced-sidebar-menu-preview-wrap">
161
  <div class="dashicons dashicons-no-alt advanced-sidebar-menu-close-icon"></div>
162
  <img
163
+ data-js="advanced-sidebar-menu/pro/preview/image"
164
  class="advanced-sidebar-menu-preview-image"
165
+ src="https://onpointplugins.com/plugins/assets/shared/<?php echo esc_attr( $src ); ?>"
166
+ srcset="https://onpointplugins.com/plugins/assets/shared/<?php echo esc_attr( str_replace( '-min.png', '-1x-min.png', $src ) ); ?> 1x, https://onpointplugins.com/plugins/assets/shared/<?php echo esc_attr( $src ); ?> 2x"
167
  alt="PRO version widget options" />
168
  </div>
169
  <?php
src/Widget/Category.php CHANGED
@@ -82,6 +82,28 @@ class Category extends Widget_Abstract {
82
  }
83
 
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  /**
86
  * Display options.
87
  *
@@ -96,41 +118,58 @@ class Category extends Widget_Abstract {
96
  <p>
97
  <?php $widget->checkbox( self::INCLUDE_PARENT ); ?>
98
  <label>
99
- <?php esc_html_e( 'Display the highest level parent category', 'advanced-sidebar-menu' ); ?>
 
 
 
100
  </label>
101
  </p>
102
  <p>
103
  <?php $widget->checkbox( self::INCLUDE_CHILDLESS_PARENT ); ?>
104
  <label>
105
- <?php esc_html_e( 'Display menu when there is only the parent category', 'advanced-sidebar-menu' ); ?>
 
 
 
106
  </label>
107
  </p>
108
  <p>
109
  <?php $widget->checkbox( self::DISPLAY_ALL, self::LEVELS ); ?>
110
  <label>
111
- <?php esc_html_e( 'Always display child categories', 'advanced-sidebar-menu' ); ?>
 
 
 
112
  </label>
113
  </p>
114
  <div <?php $widget->hide_element( self::DISPLAY_ALL, self::LEVELS ); ?>>
115
  <p>
116
  <label for="<?php echo esc_attr( $widget->get_field_id( self::LEVELS ) ); ?>">
117
- <?php esc_html_e( 'Levels of child categories to display', 'advanced-sidebar-menu' ); ?>:
118
- </label>
119
- <select
120
- id="<?php echo esc_attr( $widget->get_field_id( self::LEVELS ) ); ?>"
121
- name="<?php echo esc_attr( $widget->get_field_name( self::LEVELS ) ); ?>">
122
  <?php
123
- for ( $i = 1; $i < 6; $i ++ ) {
124
- ?>
125
- <option
126
- value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, (int) $instance[ self::LEVELS ] ); ?>>
127
- <?php echo esc_html( $i ); ?>
 
 
128
  </option>
129
-
130
  <?php
131
- }
 
 
 
 
 
 
 
 
 
 
 
 
132
  ?>
133
- </select>
134
  </p>
135
  </div>
136
 
@@ -156,18 +195,26 @@ class Category extends Widget_Abstract {
156
 
157
  <?php $widget->checkbox( self::DISPLAY_ON_SINGLE, self::EACH_CATEGORY_DISPLAY ); ?>
158
  <label>
159
- <?php esc_html_e( 'Display categories on single posts', 'advanced-sidebar-menu' ); ?>
 
 
 
160
  </label>
161
  </p>
162
 
163
  <div <?php $widget->hide_element( self::DISPLAY_ON_SINGLE, self::EACH_CATEGORY_DISPLAY ); ?>>
164
  <p>
165
  <label for="<?php echo esc_attr( $widget->get_field_id( self::EACH_CATEGORY_DISPLAY ) ); ?>">
166
- <?php esc_html_e( "Display each single post's category", 'advanced-sidebar-menu' ); ?>:
 
 
 
167
  </label>
168
  <select
169
  id="<?php echo esc_attr( $widget->get_field_id( self::EACH_CATEGORY_DISPLAY ) ); ?>"
170
- name="<?php echo esc_attr( $widget->get_field_name( self::EACH_CATEGORY_DISPLAY ) ); ?>">
 
 
171
  <option
172
  value="widget" <?php selected( 'widget', $instance[ self::EACH_CATEGORY_DISPLAY ] ); ?>>
173
  <?php esc_html_e( 'In a new widget', 'advanced-sidebar-menu' ); ?>
@@ -199,13 +246,16 @@ class Category extends Widget_Abstract {
199
  <div class="advanced-sidebar-menu-column-box">
200
  <p>
201
  <label for="<?php echo esc_attr( $widget->get_field_id( self::EXCLUDE ) ); ?>">
202
- <?php esc_html_e( 'Categories to exclude (ids), comma separated', 'advanced-sidebar-menu' ); ?>:
 
 
 
203
  </label>
204
  <input
205
  id="<?php echo esc_attr( $widget->get_field_id( self::EXCLUDE ) ); ?>"
206
  name="<?php echo esc_attr( $widget->get_field_name( self::EXCLUDE ) ); ?>"
207
  type="text"
208
- class="widefat"
209
  value="<?php echo esc_attr( $instance[ self::EXCLUDE ] ); ?>" />
210
  </p>
211
 
82
  }
83
 
84
 
85
+ /**
86
+ * Get the label for use taxonomy.
87
+ *
88
+ * For adjusting widget option labels.
89
+ *
90
+ * @param array $instance - Widget settings.
91
+ * @param bool $single - Singular label or plural.
92
+ *
93
+ * @since 8.2.0
94
+ *
95
+ * @return mixed
96
+ */
97
+ public function get_taxonomy_label( $instance, $single = true ) {
98
+ $taxonomy = get_taxonomy( apply_filters( 'advanced-sidebar-menu/widget/category/taxonomy-for-label', 'category', $this->control_options, $instance ) );
99
+ if ( empty( $taxonomy ) ) {
100
+ $taxonomy = get_taxonomy( 'category' ); // Sensible fallback.
101
+ }
102
+
103
+ return $single ? $taxonomy->labels->singular_name : $taxonomy->labels->name;
104
+ }
105
+
106
+
107
  /**
108
  * Display options.
109
  *
118
  <p>
119
  <?php $widget->checkbox( self::INCLUDE_PARENT ); ?>
120
  <label>
121
+ <?php
122
+ /* translators: Selected taxonomy single label */
123
+ printf( esc_html__( 'Display the highest level parent %s', 'advanced-sidebar-menu' ), esc_html( strtolower( $this->get_taxonomy_label( $instance ) ) ) );
124
+ ?>
125
  </label>
126
  </p>
127
  <p>
128
  <?php $widget->checkbox( self::INCLUDE_CHILDLESS_PARENT ); ?>
129
  <label>
130
+ <?php
131
+ /* translators: Selected taxonomy single label */
132
+ printf( esc_html__( 'Display menu when there is only the parent %s', 'advanced-sidebar-menu' ), esc_html( strtolower( $this->get_taxonomy_label( $instance ) ) ) );
133
+ ?>
134
  </label>
135
  </p>
136
  <p>
137
  <?php $widget->checkbox( self::DISPLAY_ALL, self::LEVELS ); ?>
138
  <label>
139
+ <?php
140
+ /* translators: Selected taxonomy plural label */
141
+ printf( esc_html__( 'Always display child %s', 'advanced-sidebar-menu' ), esc_html( strtolower( $this->get_taxonomy_label( $instance, false ) ) ) );
142
+ ?>
143
  </label>
144
  </p>
145
  <div <?php $widget->hide_element( self::DISPLAY_ALL, self::LEVELS ); ?>>
146
  <p>
147
  <label for="<?php echo esc_attr( $widget->get_field_id( self::LEVELS ) ); ?>">
 
 
 
 
 
148
  <?php
149
+ ob_start();
150
+ ?>
151
+ <select
152
+ id="<?php echo esc_attr( $widget->get_field_id( self::LEVELS ) ); ?>"
153
+ name="<?php echo esc_attr( $widget->get_field_name( self::LEVELS ) ); ?>">
154
+ <option value="100">
155
+ <?php esc_html_e( '- All -', 'advanced-sidebar-menu' ); ?>
156
  </option>
 
157
  <?php
158
+ for ( $i = 1; $i < 6; $i ++ ) {
159
+ ?>
160
+ <option
161
+ value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, (int) $instance[ self::LEVELS ] ); ?>>
162
+ <?php echo esc_html( $i ); ?>
163
+ </option>
164
+ <?php
165
+ }
166
+ ?>
167
+ </select>
168
+ <?php
169
+ /* translators: {select html input}, {Selected post type plural label} */
170
+ printf( esc_html__( 'Display %1$s levels of child %2$s', 'advanced-sidebar-menu' ), ob_get_clean(), esc_html( strtolower( $this->get_taxonomy_label( $instance, false ) ) ) ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
171
  ?>
172
+ </label>
173
  </p>
174
  </div>
175
 
195
 
196
  <?php $widget->checkbox( self::DISPLAY_ON_SINGLE, self::EACH_CATEGORY_DISPLAY ); ?>
197
  <label>
198
+ <?php
199
+ /* translators: Selected taxonomy plural label */
200
+ printf( esc_html__( 'Display %s on single posts', 'advanced-sidebar-menu' ), esc_html( strtolower( $this->get_taxonomy_label( $instance, false ) ) ) );
201
+ ?>
202
  </label>
203
  </p>
204
 
205
  <div <?php $widget->hide_element( self::DISPLAY_ON_SINGLE, self::EACH_CATEGORY_DISPLAY ); ?>>
206
  <p>
207
  <label for="<?php echo esc_attr( $widget->get_field_id( self::EACH_CATEGORY_DISPLAY ) ); ?>">
208
+ <?php
209
+ /* translators: Selected taxonomy single label */
210
+ printf( esc_html__( "Display each single post's %s", 'advanced-sidebar-menu' ), esc_html( strtolower( $this->get_taxonomy_label( $instance ) ) ) );
211
+ ?>
212
  </label>
213
  <select
214
  id="<?php echo esc_attr( $widget->get_field_id( self::EACH_CATEGORY_DISPLAY ) ); ?>"
215
+ name="<?php echo esc_attr( $widget->get_field_name( self::EACH_CATEGORY_DISPLAY ) ); ?>"
216
+ class="advanced-sidebar-menu-block-field"
217
+ >
218
  <option
219
  value="widget" <?php selected( 'widget', $instance[ self::EACH_CATEGORY_DISPLAY ] ); ?>>
220
  <?php esc_html_e( 'In a new widget', 'advanced-sidebar-menu' ); ?>
246
  <div class="advanced-sidebar-menu-column-box">
247
  <p>
248
  <label for="<?php echo esc_attr( $widget->get_field_id( self::EXCLUDE ) ); ?>">
249
+ <?php
250
+ /* translators: Selected taxonomy plural label */
251
+ printf( esc_html__( '%s to exclude (ids, comma separated)', 'advanced-sidebar-menu' ), esc_html( $this->get_taxonomy_label( $instance, false ) ) );
252
+ ?>
253
  </label>
254
  <input
255
  id="<?php echo esc_attr( $widget->get_field_id( self::EXCLUDE ) ); ?>"
256
  name="<?php echo esc_attr( $widget->get_field_name( self::EXCLUDE ) ); ?>"
257
  type="text"
258
+ class="widefat advanced-sidebar-menu-block-field"
259
  value="<?php echo esc_attr( $instance[ self::EXCLUDE ] ); ?>" />
260
  </p>
261
 
src/Widget/Page.php CHANGED
@@ -78,6 +78,28 @@ class Page extends Widget_Abstract {
78
  }
79
 
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  /**
82
  * Display options.
83
  *
@@ -92,7 +114,10 @@ class Page extends Widget_Abstract {
92
  <p>
93
  <?php $widget->checkbox( self::INCLUDE_PARENT ); ?>
94
  <label>
95
- <?php esc_html_e( 'Display highest level parent page', 'advanced-sidebar-menu' ); ?>
 
 
 
96
  </label>
97
  </p>
98
 
@@ -100,14 +125,20 @@ class Page extends Widget_Abstract {
100
  <p>
101
  <?php $widget->checkbox( self::INCLUDE_CHILDLESS_PARENT ); ?>
102
  <label>
103
- <?php esc_html_e( 'Display menu when there is only the parent page', 'advanced-sidebar-menu' ); ?>
 
 
 
104
  </label>
105
  </p>
106
 
107
  <p>
108
  <?php $widget->checkbox( self::DISPLAY_ALL, self::LEVELS ); ?>
109
  <label>
110
- <?php esc_html_e( 'Always display child pages', 'advanced-sidebar-menu' ); ?>
 
 
 
111
  </label>
112
  </p>
113
 
@@ -120,26 +151,30 @@ class Page extends Widget_Abstract {
120
  >
121
  <p>
122
  <label for="<?php echo esc_attr( $widget->get_field_id( self::LEVELS ) ); ?>">
123
- <?php esc_html_e( 'Maximum level of child pages to display', 'advanced-sidebar-menu' ); ?>:
124
- </label>
125
- <select
126
- id="<?php echo esc_attr( $widget->get_field_id( self::LEVELS ) ); ?>"
127
- name="<?php echo esc_attr( $widget->get_field_name( self::LEVELS ) ); ?>">
128
- <option value="100">
129
- <?php esc_html_e( ' - All - ', 'advanced-sidebar-menu' ); ?>
130
- </option>
131
  <?php
132
- for ( $i = 1; $i < 10; $i ++ ) {
133
- ?>
134
- <option
135
- value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, (int) $instance[ self::LEVELS ] ); ?>>
136
- <?php echo esc_html( $i ); ?>
 
 
137
  </option>
138
-
139
  <?php
140
- }
 
 
 
 
 
 
 
 
 
 
 
141
  ?>
142
- </select>
143
  </p>
144
  </div>
145
 
@@ -164,7 +199,7 @@ class Page extends Widget_Abstract {
164
 
165
  <p>
166
  <label for="<?php echo esc_attr( $widget->get_field_id( self::ORDER_BY ) ); ?>">
167
- <?php esc_html_e( 'Order by', 'advanced-sidebar-menu' ); ?>:
168
  </label>
169
  <select
170
  id="<?php echo esc_attr( $widget->get_field_id( self::ORDER_BY ) ); ?>"
@@ -205,18 +240,21 @@ class Page extends Widget_Abstract {
205
  <div class="advanced-sidebar-menu-column-box">
206
  <p>
207
  <label for="<?php echo esc_attr( $widget->get_field_id( self::EXCLUDE ) ); ?>">
208
- <?php esc_html_e( 'Pages to exclude (ids), comma separated', 'advanced-sidebar-menu' ); ?>:
 
 
 
209
  </label>
210
  <input
211
  id="<?php echo esc_attr( $widget->get_field_id( self::EXCLUDE ) ); ?>"
212
  name="<?php echo esc_attr( $widget->get_field_name( self::EXCLUDE ) ); ?>"
213
- class="widefat"
214
  type="text"
215
  value="<?php echo esc_attr( $instance[ self::EXCLUDE ] ); ?>" />
 
 
 
216
  </p>
217
- <?php
218
- do_action( 'advanced-sidebar-menu/widget/page/exclude-box', $instance, $widget );
219
- ?>
220
  </div>
221
  <?php
222
  }
78
  }
79
 
80
 
81
+ /**
82
+ * Get the label for used post type.
83
+ *
84
+ * For adjusting widget option labels.
85
+ *
86
+ * @param array $instance - Widget settings.
87
+ * @param bool $single - Singular label or plural.
88
+ *
89
+ * @since 8.2.0
90
+ *
91
+ * @return mixed
92
+ */
93
+ public function get_post_type_label( $instance, $single = true ) {
94
+ $post_type = get_post_type_object( apply_filters( 'advanced-sidebar-menu/widget/page/post-type-for-label', 'page', $this->control_options, $instance ) );
95
+ if ( null === $post_type ) {
96
+ $post_type = get_post_type_object( 'page' ); // Sensible fallback.
97
+ }
98
+
99
+ return $single ? $post_type->labels->singular_name : $post_type->labels->name;
100
+ }
101
+
102
+
103
  /**
104
  * Display options.
105
  *
114
  <p>
115
  <?php $widget->checkbox( self::INCLUDE_PARENT ); ?>
116
  <label>
117
+ <?php
118
+ /* translators: Selected post type single label */
119
+ printf( esc_html__( 'Display highest level parent %s', 'advanced-sidebar-menu' ), esc_html( strtolower( $this->get_post_type_label( $instance ) ) ) );
120
+ ?>
121
  </label>
122
  </p>
123
 
125
  <p>
126
  <?php $widget->checkbox( self::INCLUDE_CHILDLESS_PARENT ); ?>
127
  <label>
128
+ <?php
129
+ /* translators: Selected post type single label */
130
+ printf( esc_html__( 'Display menu when there is only the parent %s', 'advanced-sidebar-menu' ), esc_html( strtolower( $this->get_post_type_label( $instance ) ) ) );
131
+ ?>
132
  </label>
133
  </p>
134
 
135
  <p>
136
  <?php $widget->checkbox( self::DISPLAY_ALL, self::LEVELS ); ?>
137
  <label>
138
+ <?php
139
+ /* translators: Selected post type plural label */
140
+ printf( esc_html__( 'Always display child %s', 'advanced-sidebar-menu' ), esc_html( strtolower( $this->get_post_type_label( $instance, false ) ) ) );
141
+ ?>
142
  </label>
143
  </p>
144
 
151
  >
152
  <p>
153
  <label for="<?php echo esc_attr( $widget->get_field_id( self::LEVELS ) ); ?>">
 
 
 
 
 
 
 
 
154
  <?php
155
+ ob_start();
156
+ ?>
157
+ <select
158
+ id="<?php echo esc_attr( $widget->get_field_id( self::LEVELS ) ); ?>"
159
+ name="<?php echo esc_attr( $widget->get_field_name( self::LEVELS ) ); ?>">
160
+ <option value="100">
161
+ <?php esc_html_e( '- All -', 'advanced-sidebar-menu' ); ?>
162
  </option>
 
163
  <?php
164
+ for ( $i = 1; $i < 10; $i ++ ) {
165
+ ?>
166
+ <option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, (int) $instance[ self::LEVELS ] ); ?>>
167
+ <?php echo (int) $i; ?>
168
+ </option>
169
+ <?php
170
+ }
171
+ ?>
172
+ </select>
173
+ <?php
174
+ /* translators: {select html input}, {Selected post type plural label} */
175
+ printf( esc_html__( 'Display %1$s levels of child %2$s', 'advanced-sidebar-menu' ), ob_get_clean(), esc_html( strtolower( $this->get_post_type_label( $instance, false ) ) ) ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
176
  ?>
177
+ </label>
178
  </p>
179
  </div>
180
 
199
 
200
  <p>
201
  <label for="<?php echo esc_attr( $widget->get_field_id( self::ORDER_BY ) ); ?>">
202
+ <?php esc_html_e( 'Order by', 'advanced-sidebar-menu' ); ?>
203
  </label>
204
  <select
205
  id="<?php echo esc_attr( $widget->get_field_id( self::ORDER_BY ) ); ?>"
240
  <div class="advanced-sidebar-menu-column-box">
241
  <p>
242
  <label for="<?php echo esc_attr( $widget->get_field_id( self::EXCLUDE ) ); ?>">
243
+ <?php
244
+ /* translators: Selected post type plural label */
245
+ printf( esc_html__( '%s to exclude (ids, comma separated)', 'advanced-sidebar-menu' ), esc_html( $this->get_post_type_label( $instance, false ) ) );
246
+ ?>
247
  </label>
248
  <input
249
  id="<?php echo esc_attr( $widget->get_field_id( self::EXCLUDE ) ); ?>"
250
  name="<?php echo esc_attr( $widget->get_field_name( self::EXCLUDE ) ); ?>"
251
+ class="widefat advanced-sidebar-menu-block-field"
252
  type="text"
253
  value="<?php echo esc_attr( $instance[ self::EXCLUDE ] ); ?>" />
254
+ <?php
255
+ do_action( 'advanced-sidebar-menu/widget/page/exclude-box', $instance, $widget );
256
+ ?>
257
  </p>
 
 
 
258
  </div>
259
  <?php
260
  }