Advanced Sidebar Menu - Version 7.5.0

Version Description

  • Convert "Always display child pages" to use our List_Pages structure and support all widget options.
  • Bump required PHP version to 5.4.4.
Download this release

Release Info

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

Code changes from version 7.4.8 to 7.5.0

advanced-sidebar-menu.php CHANGED
@@ -4,7 +4,7 @@
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.4.8
8
* Author URI: https://matlipe.com
9
* Text Domain: advanced-sidebar-menu
10
*
@@ -15,7 +15,7 @@ if ( defined( 'ADVANCED_SIDEBAR_BASIC_VERSION' ) ) {
15
return;
16
}
17
18
- define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '7.4.8' );
19
define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
20
21
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.5.0
8
* Author URI: https://matlipe.com
9
* Text Domain: advanced-sidebar-menu
10
*
15
return;
16
}
17
18
+ define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '7.5.0' );
19
define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
20
21
if ( ! function_exists( 'advanced_sidebar_menu_load' ) ) {
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: 2018-05-03 12:37-0400\n"
5
- "PO-Revision-Date: 2018-05-03 12:41-0400\n"
6
"Last-Translator: Mat Lipe <mat@matlipe.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.0.7\n"
14
"X-Poedit-Basepath: ..\n"
15
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
@@ -21,12 +21,12 @@ msgstr ""
21
"X-Poedit-SearchPath-0: .\n"
22
"X-Poedit-SearchPathExcluded-0: *.js\n"
23
24
- #: advanced-sidebar-menu.php:108
25
msgid "Checkout Advanced Sidebar Menu Pro!"
26
msgstr "Kasse Advanced Sidebar Menu Pro!"
27
28
#. translators: {<a>}{</a>} links to https://matlipe.com/product/advanced-sidebar-menu-pro/
29
- #: advanced-sidebar-menu.php:113
30
#, php-format
31
msgctxt "{<a>}{</a>}"
32
msgid ""
@@ -36,17 +36,17 @@ msgstr ""
36
"Upgrade auf %1$sAdvanced Sidebar Menu Pro%2$s für diese Funktionen und "
37
"vieles mehr!"
38
39
- #: advanced-sidebar-menu.php:116
40
msgid "Priority support, including access to Members Only Support Area."
41
msgstr ""
42
"Prioritätsunterstützung, einschließlich Zugang zum Supportbereich für "
43
"Mitglieder."
44
45
- #: advanced-sidebar-menu.php:117
46
msgid "Accordion menu support."
47
msgstr "Akkordeon-Menü-Unterstützung."
48
49
- #: advanced-sidebar-menu.php:118
50
msgid ""
51
"Click and drag menu styling including bullets, colors, sizes, block styles, "
52
"borders, and border colors."
@@ -54,17 +54,17 @@ msgstr ""
54
"Klicken und ziehen Sie das Menü-Styling, einschließlich Aufzählungszeichen, "
55
"Farben, Größen, Blockstile, Rahmen und Rahmenfarben."
56
57
- #: advanced-sidebar-menu.php:123
58
msgid "Ability to customize each page's link text."
59
msgstr "Möglichkeit, den Linktext jeder Seite anzupassen."
60
61
- #: advanced-sidebar-menu.php:124
62
msgid "Ability to exclude a page from all menus using a simple checkbox."
63
msgstr ""
64
"Möglichkeit, eine Seite mit einem einfachen Kontrollkästchen aus allen Menüs "
65
"auszuschließen."
66
67
- #: advanced-sidebar-menu.php:125
68
msgid ""
69
"Number of levels of pages to show when always displayed child pages is not "
70
"checked."
@@ -72,30 +72,42 @@ msgstr ""
72
"Anzahl der Seitenebenen, die angezeigt werden sollen, wenn immer "
73
"untergeordnete Seiten angezeigt werden, ist nicht aktiviert."
74
75
- #: advanced-sidebar-menu.php:126
76
msgid "Ability to select and display custom post types."
77
msgstr ""
78
"Möglichkeit, benutzerdefinierte Beitragstypen auszuwählen und anzuzeigen."
79
80
- #: advanced-sidebar-menu.php:127
81
msgid ""
82
- "Option to display the current page’s parents and grandparents only, as well "
83
- "as siblings options."
84
msgstr ""
85
- "Option, um nur die Eltern und Großeltern der aktuellen Seite sowie "
86
- "Geschwisteroptionen anzuzeigen."
87
88
- #: advanced-sidebar-menu.php:132
89
msgid "Link ordering for the category widget."
90
msgstr "Verknüpfungsreihenfolge für das Kategorie-Widget."
91
92
- #: advanced-sidebar-menu.php:133
93
msgid "Ability to select and display custom taxonomies."
94
msgstr "Möglichkeit, benutzerdefinierte Taxonomien auszuwählen und anzuzeigen."
95
96
- #: advanced-sidebar-menu.php:137
97
- msgid "Ability to display the widgets everywhere the sidebar display."
98
- msgstr "Möglichkeit, die Widgets überall in der Seitenleiste anzuzeigen."
99
100
#: src/Widget/Category.php:44
101
msgid ""
@@ -108,77 +120,85 @@ msgstr ""
108
msgid "Advanced Sidebar Categories Menu"
109
msgstr "Advanced Sidebar Kategorien-Menü"
110
111
- #: src/Widget/Category.php:72
112
msgid "Display highest level parent category"
113
msgstr "Anzeige der übergeordneten Kategorie der höchsten Ebene"
114
115
- #: src/Widget/Category.php:78
116
msgid "Display menu when there is only the parent category"
117
msgstr "Menü \"Anzeige\" wird nur die übergeordnete Kategorie"
118
119
- #: src/Widget/Category.php:84
120
msgid "Always display child categories"
121
msgstr "Immer untergeordnete Kategorien anzeigen"
122
123
- #: src/Widget/Category.php:90 src/Widget/Page.php:95
124
- msgid "Levels to display"
125
- msgstr "Anzuzeigenden Ebenen"
126
127
- #: src/Widget/Category.php:121 src/Widget/Page.php:126
128
msgid "Use this plugin's default styling"
129
msgstr "Verwenden Sie das Standardstyling dieses Plugins"
130
131
- #: src/Widget/Category.php:138
132
msgid "Display categories on single posts"
133
msgstr "Kategorien auf einzelne Beiträge anzeigen"
134
135
- #: src/Widget/Category.php:144
136
msgid "Display each single post's category"
137
msgstr "Zeigen Sie die einzelnen Kategorien der einzelnen Posts an"
138
139
- #: src/Widget/Category.php:150
140
msgid "In a new widget"
141
msgstr "In einem neuen Widget"
142
143
- #: src/Widget/Category.php:153
144
msgid "In another list in the same widget"
145
msgstr "In einer anderen Liste im selben Widget"
146
147
- #: src/Widget/Category.php:171
148
msgid "Categories to exclude (ids), comma separated"
149
msgstr "Kategorien ausschließen (Ids), durch Kommata getrennt"
150
151
- #: src/Widget/Category.php:204 src/Widget/Page.php:203
152
msgid "Title"
153
msgstr "Titel"
154
155
- #: src/Widget/Page.php:40
156
msgid "Creates a menu of all the pages using the child/parent relationship"
157
msgstr ""
158
"Erstellt ein Menü mit allen Seiten, die die Child / Parent-Beziehung "
159
"verwenden"
160
161
- #: src/Widget/Page.php:46
162
msgid "Advanced Sidebar Pages Menu"
163
msgstr "Advanced Sidebar Seitenmenü"
164
165
- #: src/Widget/Page.php:71
166
msgid "Display highest level parent page"
167
msgstr "Zeigt die oberste Seite der obersten Ebene an"
168
169
- #: src/Widget/Page.php:79
170
msgid "Display menu when there is only the parent page"
171
msgstr "Menü \"Anzeige\" wird nur die übergeordnete Seite"
172
173
- #: src/Widget/Page.php:86
174
msgid "Always display child pages"
175
msgstr "Immer untergeordnete Seiten anzeigen"
176
177
- #: src/Widget/Page.php:141
178
msgid "Order by"
179
msgstr "Sortieren nach"
180
181
- #: src/Widget/Page.php:171
182
msgid "Pages to exclude (ids), comma separated"
183
msgstr "Auszuschließende Seiten (IDs), durch Kommas getrennt"
184
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Advanced Sidebar Menu\n"
4
+ "POT-Creation-Date: 2019-03-05 12:29-0500\n"
5
+ "PO-Revision-Date: 2019-03-05 12:30-0500\n"
6
"Last-Translator: Mat Lipe <mat@matlipe.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.2.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"
21
"X-Poedit-SearchPath-0: .\n"
22
"X-Poedit-SearchPathExcluded-0: *.js\n"
23
24
+ #: advanced-sidebar-menu.php:156
25
msgid "Checkout Advanced Sidebar Menu Pro!"
26
msgstr "Kasse Advanced Sidebar Menu Pro!"
27
28
#. translators: {<a>}{</a>} links to https://matlipe.com/product/advanced-sidebar-menu-pro/
29
+ #: advanced-sidebar-menu.php:161
30
#, php-format
31
msgctxt "{<a>}{</a>}"
32
msgid ""
36
"Upgrade auf %1$sAdvanced Sidebar Menu Pro%2$s für diese Funktionen und "
37
"vieles mehr!"
38
39
+ #: advanced-sidebar-menu.php:165
40
msgid "Priority support, including access to Members Only Support Area."
41
msgstr ""
42
"Prioritätsunterstützung, einschließlich Zugang zum Supportbereich für "
43
"Mitglieder."
44
45
+ #: advanced-sidebar-menu.php:166
46
msgid "Accordion menu support."
47
msgstr "Akkordeon-Menü-Unterstützung."
48
49
+ #: advanced-sidebar-menu.php:167
50
msgid ""
51
"Click and drag menu styling including bullets, colors, sizes, block styles, "
52
"borders, and border colors."
54
"Klicken und ziehen Sie das Menü-Styling, einschließlich Aufzählungszeichen, "
55
"Farben, Größen, Blockstile, Rahmen und Rahmenfarben."
56
57
+ #: advanced-sidebar-menu.php:172
58
msgid "Ability to customize each page's link text."
59
msgstr "Möglichkeit, den Linktext jeder Seite anzupassen."
60
61
+ #: advanced-sidebar-menu.php:173
62
msgid "Ability to exclude a page from all menus using a simple checkbox."
63
msgstr ""
64
"Möglichkeit, eine Seite mit einem einfachen Kontrollkästchen aus allen Menüs "
65
"auszuschließen."
66
67
+ #: advanced-sidebar-menu.php:174
68
msgid ""
69
"Number of levels of pages to show when always displayed child pages is not "
70
"checked."
72
"Anzahl der Seitenebenen, die angezeigt werden sollen, wenn immer "
73
"untergeordnete Seiten angezeigt werden, ist nicht aktiviert."
74
75
+ #: advanced-sidebar-menu.php:175
76
msgid "Ability to select and display custom post types."
77
msgstr ""
78
"Möglichkeit, benutzerdefinierte Beitragstypen auszuwählen und anzuzeigen."
79
80
+ #: advanced-sidebar-menu.php:176
81
msgid ""
82
+ "Option to display the current page’s parents, grandparents, and children "
83
+ "only, as well as siblings options."
84
msgstr ""
85
+ "Option, um die Eltern, Großeltern und Kinder der aktuellen Seite anzuzeigen, "
86
+ "sowie Geschwisteroptionen."
87
88
+ #: advanced-sidebar-menu.php:181
89
msgid "Link ordering for the category widget."
90
msgstr "Verknüpfungsreihenfolge für das Kategorie-Widget."
91
92
+ #: advanced-sidebar-menu.php:182
93
msgid "Ability to select and display custom taxonomies."
94
msgstr "Möglichkeit, benutzerdefinierte Taxonomien auszuwählen und anzuzeigen."
95
96
+ #: advanced-sidebar-menu.php:183
97
+ msgid ""
98
+ "Ability to display assigned posts or custom post types under categories."
99
+ msgstr ""
100
+ "Fähigkeit, zugewiesene Beiträge oder benutzerdefinierte Posttypen unter "
101
+ "Kategorien anzuzeigen."
102
+
103
+ #: advanced-sidebar-menu.php:187
104
+ msgid "Ability to display the widgets everywhere the sidebar displays."
105
+ msgstr "Die Fähigkeit, die Widgets überall in der Sidebar-Anzeige anzuzeigen."
106
+
107
+ #: advanced-sidebar-menu.php:188
108
+ msgid "Support for custom navigation menus from Appearance -> Menus."
109
+ msgstr ""
110
+ "Unterstützung für kundenspezifische Navigationsmenüs von Appearance-> Menü."
111
112
#: src/Widget/Category.php:44
113
msgid ""
120
msgid "Advanced Sidebar Categories Menu"
121
msgstr "Advanced Sidebar Kategorien-Menü"
122
123
+ #: src/Widget/Category.php:83
124
msgid "Display highest level parent category"
125
msgstr "Anzeige der übergeordneten Kategorie der höchsten Ebene"
126
127
+ #: src/Widget/Category.php:89
128
msgid "Display menu when there is only the parent category"
129
msgstr "Menü \"Anzeige\" wird nur die übergeordnete Kategorie"
130
131
+ #: src/Widget/Category.php:95
132
msgid "Always display child categories"
133
msgstr "Immer untergeordnete Kategorien anzeigen"
134
135
+ #: src/Widget/Category.php:101
136
+ msgid "Levels of child categories to display"
137
+ msgstr "Niveau der Kinderkategorien zu zeigen"
138
139
+ #: src/Widget/Category.php:138 src/Widget/Page.php:150
140
msgid "Use this plugin's default styling"
141
msgstr "Verwenden Sie das Standardstyling dieses Plugins"
142
143
+ #: src/Widget/Category.php:161
144
msgid "Display categories on single posts"
145
msgstr "Kategorien auf einzelne Beiträge anzeigen"
146
147
+ #: src/Widget/Category.php:167
148
msgid "Display each single post's category"
149
msgstr "Zeigen Sie die einzelnen Kategorien der einzelnen Posts an"
150
151
+ #: src/Widget/Category.php:173
152
msgid "In a new widget"
153
msgstr "In einem neuen Widget"
154
155
+ #: src/Widget/Category.php:176
156
msgid "In another list in the same widget"
157
msgstr "In einer anderen Liste im selben Widget"
158
159
+ #: src/Widget/Category.php:200
160
msgid "Categories to exclude (ids), comma separated"
161
msgstr "Kategorien ausschließen (Ids), durch Kommata getrennt"
162
163
+ #: src/Widget/Category.php:233 src/Widget/Page.php:242
164
msgid "Title"
165
msgstr "Titel"
166
167
+ #: src/Widget/Page.php:39
168
msgid "Creates a menu of all the pages using the child/parent relationship"
169
msgstr ""
170
"Erstellt ein Menü mit allen Seiten, die die Child / Parent-Beziehung "
171
"verwenden"
172
173
+ #: src/Widget/Page.php:45
174
msgid "Advanced Sidebar Pages Menu"
175
msgstr "Advanced Sidebar Seitenmenü"
176
177
+ #: src/Widget/Page.php:82
178
msgid "Display highest level parent page"
179
msgstr "Zeigt die oberste Seite der obersten Ebene an"
180
181
+ #: src/Widget/Page.php:90
182
msgid "Display menu when there is only the parent page"
183
msgstr "Menü \"Anzeige\" wird nur die übergeordnete Seite"
184
185
+ #: src/Widget/Page.php:97
186
msgid "Always display child pages"
187
msgstr "Immer untergeordnete Seiten anzeigen"
188
189
+ #: src/Widget/Page.php:110
190
+ msgid "Maximum level of child pages to display"
191
+ msgstr "Maximale Höhe der zu zeigestellenden Kinderseiten"
192
+
193
+ #: src/Widget/Page.php:114
194
+ msgid " - All - "
195
+ msgstr " Alle "
196
+
197
+ #: src/Widget/Page.php:171
198
msgid "Order by"
199
msgstr "Sortieren nach"
200
201
+ #: src/Widget/Page.php:210
202
msgid "Pages to exclude (ids), comma separated"
203
msgstr "Auszuschließende Seiten (IDs), durch Kommas getrennt"
204
languages/advanced-sidebar-menu.pot CHANGED
@@ -3,85 +3,94 @@ msgid ""
3
msgstr ""
4
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
"Project-Id-Version: Advanced Sidebar Menu\n"
6
- "POT-Creation-Date: 2018-05-03 12:37-0400\n"
7
- "PO-Revision-Date: 2018-01-09 07:14-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.0.7\n"
14
"X-Poedit-Basepath: ..\n"
15
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16
"X-Poedit-WPHeader: advanced-sidebar-menu.php\n"
17
"X-Poedit-SourceCharset: UTF-8\n"
18
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
- "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
20
- "_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
"X-Poedit-SearchPath-0: .\n"
22
"X-Poedit-SearchPathExcluded-0: *.js\n"
23
24
- #: advanced-sidebar-menu.php:108
25
msgid "Checkout Advanced Sidebar Menu Pro!"
26
msgstr ""
27
28
#. translators: {<a>}{</a>} links to https://matlipe.com/product/advanced-sidebar-menu-pro/
29
- #: advanced-sidebar-menu.php:113
30
#, php-format
31
msgctxt "{<a>}{</a>}"
32
msgid ""
33
- "Upgrade to %1$sAdvanced Sidebar Menu Pro%2$s for these features and so "
34
- "much more!"
35
msgstr ""
36
37
- #: advanced-sidebar-menu.php:116
38
msgid "Priority support, including access to Members Only Support Area."
39
msgstr ""
40
41
- #: advanced-sidebar-menu.php:117
42
msgid "Accordion menu support."
43
msgstr ""
44
45
- #: advanced-sidebar-menu.php:118
46
msgid ""
47
- "Click and drag menu styling including bullets, colors, sizes, block "
48
- "styles, borders, and border colors."
49
msgstr ""
50
51
- #: advanced-sidebar-menu.php:123
52
msgid "Ability to customize each page's link text."
53
msgstr ""
54
55
- #: advanced-sidebar-menu.php:124
56
msgid "Ability to exclude a page from all menus using a simple checkbox."
57
msgstr ""
58
59
- #: advanced-sidebar-menu.php:125
60
msgid ""
61
"Number of levels of pages to show when always displayed child pages is not "
62
"checked."
63
msgstr ""
64
65
- #: advanced-sidebar-menu.php:126
66
msgid "Ability to select and display custom post types."
67
msgstr ""
68
69
- #: advanced-sidebar-menu.php:127
70
msgid ""
71
- "Option to display the current page’s parents and grandparents only, as "
72
- "well as siblings options."
73
msgstr ""
74
75
- #: advanced-sidebar-menu.php:132
76
msgid "Link ordering for the category widget."
77
msgstr ""
78
79
- #: advanced-sidebar-menu.php:133
80
msgid "Ability to select and display custom taxonomies."
81
msgstr ""
82
83
- #: advanced-sidebar-menu.php:137
84
- msgid "Ability to display the widgets everywhere the sidebar display."
85
msgstr ""
86
87
#: src/Widget/Category.php:44
@@ -93,75 +102,83 @@ msgstr ""
93
msgid "Advanced Sidebar Categories Menu"
94
msgstr ""
95
96
- #: src/Widget/Category.php:72
97
msgid "Display highest level parent category"
98
msgstr ""
99
100
- #: src/Widget/Category.php:78
101
msgid "Display menu when there is only the parent category"
102
msgstr ""
103
104
- #: src/Widget/Category.php:84
105
msgid "Always display child categories"
106
msgstr ""
107
108
- #: src/Widget/Category.php:90 src/Widget/Page.php:95
109
- msgid "Levels to display"
110
msgstr ""
111
112
- #: src/Widget/Category.php:121 src/Widget/Page.php:126
113
msgid "Use this plugin's default styling"
114
msgstr ""
115
116
- #: src/Widget/Category.php:138
117
msgid "Display categories on single posts"
118
msgstr ""
119
120
- #: src/Widget/Category.php:144
121
msgid "Display each single post's category"
122
msgstr ""
123
124
- #: src/Widget/Category.php:150
125
msgid "In a new widget"
126
msgstr ""
127
128
- #: src/Widget/Category.php:153
129
msgid "In another list in the same widget"
130
msgstr ""
131
132
- #: src/Widget/Category.php:171
133
msgid "Categories to exclude (ids), comma separated"
134
msgstr ""
135
136
- #: src/Widget/Category.php:204 src/Widget/Page.php:203
137
msgid "Title"
138
msgstr ""
139
140
- #: src/Widget/Page.php:40
141
msgid "Creates a menu of all the pages using the child/parent relationship"
142
msgstr ""
143
144
- #: src/Widget/Page.php:46
145
msgid "Advanced Sidebar Pages Menu"
146
msgstr ""
147
148
- #: src/Widget/Page.php:71
149
msgid "Display highest level parent page"
150
msgstr ""
151
152
- #: src/Widget/Page.php:79
153
msgid "Display menu when there is only the parent page"
154
msgstr ""
155
156
- #: src/Widget/Page.php:86
157
msgid "Always display child pages"
158
msgstr ""
159
160
- #: src/Widget/Page.php:141
161
- msgid "Order by"
162
msgstr ""
163
164
#: src/Widget/Page.php:171
165
msgid "Pages to exclude (ids), comma separated"
166
msgstr ""
167
3
msgstr ""
4
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
"Project-Id-Version: Advanced Sidebar Menu\n"
6
+ "POT-Creation-Date: 2019-03-05 12:29-0500\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.2.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"
17
"X-Poedit-SourceCharset: UTF-8\n"
18
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
20
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21
"X-Poedit-SearchPath-0: .\n"
22
"X-Poedit-SearchPathExcluded-0: *.js\n"
23
24
+ #: advanced-sidebar-menu.php:156
25
msgid "Checkout Advanced Sidebar Menu Pro!"
26
msgstr ""
27
28
#. translators: {<a>}{</a>} links to https://matlipe.com/product/advanced-sidebar-menu-pro/
29
+ #: advanced-sidebar-menu.php:161
30
#, php-format
31
msgctxt "{<a>}{</a>}"
32
msgid ""
33
+ "Upgrade to %1$sAdvanced Sidebar Menu Pro%2$s for these features and so much "
34
+ "more!"
35
msgstr ""
36
37
+ #: advanced-sidebar-menu.php:165
38
msgid "Priority support, including access to Members Only Support Area."
39
msgstr ""
40
41
+ #: advanced-sidebar-menu.php:166
42
msgid "Accordion menu support."
43
msgstr ""
44
45
+ #: advanced-sidebar-menu.php:167
46
msgid ""
47
+ "Click and drag menu styling including bullets, colors, sizes, block styles, "
48
+ "borders, and border colors."
49
msgstr ""
50
51
+ #: advanced-sidebar-menu.php:172
52
msgid "Ability to customize each page's link text."
53
msgstr ""
54
55
+ #: advanced-sidebar-menu.php:173
56
msgid "Ability to exclude a page from all menus using a simple checkbox."
57
msgstr ""
58
59
+ #: advanced-sidebar-menu.php:174
60
msgid ""
61
"Number of levels of pages to show when always displayed child pages is not "
62
"checked."
63
msgstr ""
64
65
+ #: advanced-sidebar-menu.php:175
66
msgid "Ability to select and display custom post types."
67
msgstr ""
68
69
+ #: advanced-sidebar-menu.php:176
70
msgid ""
71
+ "Option to display the current page’s parents, grandparents, and children "
72
+ "only, as well as siblings options."
73
msgstr ""
74
75
+ #: advanced-sidebar-menu.php:181
76
msgid "Link ordering for the category widget."
77
msgstr ""
78
79
+ #: advanced-sidebar-menu.php:182
80
msgid "Ability to select and display custom taxonomies."
81
msgstr ""
82
83
+ #: advanced-sidebar-menu.php:183
84
+ msgid ""
85
+ "Ability to display assigned posts or custom post types under categories."
86
+ msgstr ""
87
+
88
+ #: advanced-sidebar-menu.php:187
89
+ msgid "Ability to display the widgets everywhere the sidebar displays."
90
+ msgstr ""
91
+
92
+ #: advanced-sidebar-menu.php:188
93
+ msgid "Support for custom navigation menus from Appearance -> Menus."
94
msgstr ""
95
96
#: src/Widget/Category.php:44
102
msgid "Advanced Sidebar Categories Menu"
103
msgstr ""
104
105
+ #: src/Widget/Category.php:83
106
msgid "Display highest level parent category"
107
msgstr ""
108
109
+ #: src/Widget/Category.php:89
110
msgid "Display menu when there is only the parent category"
111
msgstr ""
112
113
+ #: src/Widget/Category.php:95
114
msgid "Always display child categories"
115
msgstr ""
116
117
+ #: src/Widget/Category.php:101
118
+ msgid "Levels of child categories to display"
119
msgstr ""
120
121
+ #: src/Widget/Category.php:138 src/Widget/Page.php:150
122
msgid "Use this plugin's default styling"
123
msgstr ""
124
125
+ #: src/Widget/Category.php:161
126
msgid "Display categories on single posts"
127
msgstr ""
128
129
+ #: src/Widget/Category.php:167
130
msgid "Display each single post's category"
131
msgstr ""
132
133
+ #: src/Widget/Category.php:173
134
msgid "In a new widget"
135
msgstr ""
136
137
+ #: src/Widget/Category.php:176
138
msgid "In another list in the same widget"
139
msgstr ""
140
141
+ #: src/Widget/Category.php:200
142
msgid "Categories to exclude (ids), comma separated"
143
msgstr ""
144
145
+ #: src/Widget/Category.php:233 src/Widget/Page.php:242
146
msgid "Title"
147
msgstr ""
148
149
+ #: src/Widget/Page.php:39
150
msgid "Creates a menu of all the pages using the child/parent relationship"
151
msgstr ""
152
153
+ #: src/Widget/Page.php:45
154
msgid "Advanced Sidebar Pages Menu"
155
msgstr ""
156
157
+ #: src/Widget/Page.php:82
158
msgid "Display highest level parent page"
159
msgstr ""
160
161
+ #: src/Widget/Page.php:90
162
msgid "Display menu when there is only the parent page"
163
msgstr ""
164
165
+ #: src/Widget/Page.php:97
166
msgid "Always display child pages"
167
msgstr ""
168
169
+ #: src/Widget/Page.php:110
170
+ msgid "Maximum level of child pages to display"
171
+ msgstr ""
172
+
173
+ #: src/Widget/Page.php:114
174
+ msgid " - All - "
175
msgstr ""
176
177
#: src/Widget/Page.php:171
178
+ msgid "Order by"
179
+ msgstr ""
180
+
181
+ #: src/Widget/Page.php:210
182
msgid "Pages to exclude (ids), comma separated"
183
msgstr ""
184
readme.txt CHANGED
@@ -5,8 +5,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypa
5
Tags: menus, sidebar menu, hierarchy, category menu, pages menu
6
Requires at least: 4.7.0
7
Tested up to: 5.1.0
8
- Requires PHP: 5.2.4
9
- Stable tag: 7.4.8
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://matlipe.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://matlipe.com/product/advanced-sidebar-menu-pro/" target="_blank">Pro version 3.5.0</a> is now available with support for displaying posts under categories on any level!</blockquote>
20
21
<h4>Features</h4>
22
* Page and Category widgets.
@@ -150,6 +150,10 @@ Yes. Based on whatever page, post, or category you are on, the menu will change
150
151
152
== Changelog ==
153
= 7.4.0 =
154
* Added support for Beaver Builder
155
@@ -229,6 +233,9 @@ Yes. Based on whatever page, post, or category you are on, the menu will change
229
230
231
== Upgrade Notice ==
232
= 7.4.7 =
233
Update to support PRO version 3.5.0
234
5
Tags: menus, sidebar menu, hierarchy, category menu, pages menu
6
Requires at least: 4.7.0
7
Tested up to: 5.1.0
8
+ Requires PHP: 5.4.4
9
+ Stable tag: 7.5.0
10
11
== Description ==
12
16
17
<strong>Check out <a href="https://matlipe.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://matlipe.com/product/advanced-sidebar-menu-pro/" target="_blank">Pro version 3.6.0</a> is now available with support for displaying the current page's parents only when "Always display child pages" is checked!</blockquote>
20
21
<h4>Features</h4>
22
* Page and Category widgets.
150
151
152
== Changelog ==
153
+ = 7.5.0 =
154
+ * Convert "Always display child pages" to use our List_Pages structure and support all widget options.
155
+ * Bump required PHP version to 5.4.4.
156
+
157
= 7.4.0 =
158
* Added support for Beaver Builder
159
233
234
235
== Upgrade Notice ==
236
+ = 7.5.0 =
237
+ Update to support PRO version 3.6.0
238
+
239
= 7.4.7 =
240
Update to support PRO version 3.5.0
241
src/List_Pages.php CHANGED
@@ -20,8 +20,6 @@
20
class Advanced_Sidebar_Menu_List_Pages {
21
22
/**
23
- * output
24
- *
25
* The page list
26
*
27
* @var string
@@ -29,8 +27,6 @@ class Advanced_Sidebar_Menu_List_Pages {
29
public $output = '';
30
31
/**
32
- * current_page
33
- *
34
* Used when walking the list
35
*
36
* @var WP_Post
@@ -38,8 +34,6 @@ class Advanced_Sidebar_Menu_List_Pages {
38
protected $current_page;
39
40
/**
41
- * top_parent_id
42
- *
43
* The top level parent id according to the menu class
44
*
45
* @var int
@@ -47,23 +41,12 @@ class Advanced_Sidebar_Menu_List_Pages {
47
protected $top_parent_id;
48
49
/**
50
- * args
51
- *
52
* Passed during construct given to walker and used for queries
53
*
54
* @var array
55
*/
56
protected $args = array();
57
58
- /**
59
- * level
60
- *
61
- * Level of grandchild pages we are on
62
- *
63
- * @var int
64
- */
65
- protected $level = 0;
66
-
67
/**
68
* Used exclusively for caching
69
* Holds the value of the latest parent we
@@ -75,8 +58,6 @@ class Advanced_Sidebar_Menu_List_Pages {
75
protected $current_children_parent = 0;
76
77
/**
78
- * menu
79
- *
80
* Menu class
81
*
82
* @var \Advanced_Sidebar_Menu_Menus_Page
@@ -87,7 +68,7 @@ class Advanced_Sidebar_Menu_List_Pages {
87
/**
88
* Constructor
89
*
90
- * @param \Advanced_Sidebar_Menu_Menus_Page $menu
91
*/
92
protected function __construct( Advanced_Sidebar_Menu_Menus_Page $menu ) {
93
$this->menu = $menu;
@@ -99,7 +80,7 @@ class Advanced_Sidebar_Menu_List_Pages {
99
'orderby' => $menu->get_order_by(),
100
'order' => $menu->get_order(),
101
'exclude' => $menu->get_excluded_ids(),
102
- 'levels' => $menu->get_menu_depth(),
103
);
104
105
$this->args = $this->parse_args( $args );
@@ -122,8 +103,8 @@ class Advanced_Sidebar_Menu_List_Pages {
122
/**
123
* Add the custom classes to the list items
124
*
125
- * @param array $classes
126
- * @param \WP_Post $post
127
*
128
* @return array
129
*/
@@ -137,10 +118,10 @@ class Advanced_Sidebar_Menu_List_Pages {
137
$classes[] = 'has_children';
138
}
139
140
- // page posts are handled by wp core. This is for custom post types
141
if ( 'page' !== $post->post_type ) {
142
$ancestors = get_post_ancestors( $post );
143
- if ( ! empty( $ancestors ) && in_array( $this->current_page->ID, $ancestors, false ) ) {
144
$classes[] = 'current_page_ancestor';
145
} elseif ( $this->current_page->ID === $post->post_parent ) {
146
$classes[] = 'current_page_parent';
@@ -155,7 +136,7 @@ class Advanced_Sidebar_Menu_List_Pages {
155
* Return the list of args that have been populated by this class
156
* For use with wp_list_pages()
157
*
158
- * @param string $level - level of menu so we have full control of updates
159
*
160
* @return array
161
*/
@@ -202,10 +183,9 @@ class Advanced_Sidebar_Menu_List_Pages {
202
203
204
/**
205
- *
206
* Do any adjustments to class args here
207
*
208
- * @param array $args
209
*
210
* @return array
211
*/
@@ -230,7 +210,7 @@ class Advanced_Sidebar_Menu_List_Pages {
230
if ( is_string( $args['exclude'] ) ) {
231
$args['exclude'] = explode( ',', $args['exclude'] );
232
}
233
- // sanitize, mostly to keep spaces out
234
$args['exclude'] = preg_replace( '/[^0-9,]/', '', implode( ',', apply_filters( 'wp_list_pages_excludes', $args['exclude'] ) ) );
235
236
return apply_filters( 'advanced_sidebar_menu_list_pages_args', $args, $this );
@@ -239,9 +219,7 @@ class Advanced_Sidebar_Menu_List_Pages {
239
240
241
/**
242
- * list_pages
243
- *
244
- * List the pages very similar to wp_list_pages
245
*
246
* @return string
247
*/
@@ -249,7 +227,7 @@ class Advanced_Sidebar_Menu_List_Pages {
249
$pages = $this->get_child_pages( $this->top_parent_id, true );
250
foreach ( $pages as $page ) {
251
$this->output .= walk_page_tree( array( $page ), 1, $this->current_page->ID, $this->args );
252
- $this->output .= $this->list_grandchild_pages( $page->ID );
253
$this->output .= '</li>' . "\n";
254
}
255
@@ -257,26 +235,26 @@ class Advanced_Sidebar_Menu_List_Pages {
257
if ( ! $this->args['echo'] ) {
258
return $this->output;
259
}
260
- // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
261
echo $this->output;
262
- // phpcs:enable
263
}
264
265
266
/**
267
- * list_grandchild_pages
268
- *
269
- * List as many levels as exist within the grandchild-sidebar-menu ul
270
*
271
- * @param int $parent_page_id
272
*
273
* @return string
274
*/
275
- protected function list_grandchild_pages( $parent_page_id ) {
276
- if ( $this->level >= (int) $this->args['levels'] ) {
277
return '';
278
}
279
- if ( ! $this->is_current_page_ancestor( $parent_page_id ) ) {
280
return '';
281
}
282
$pages = $this->get_child_pages( $parent_page_id );
@@ -284,13 +262,12 @@ class Advanced_Sidebar_Menu_List_Pages {
284
return '';
285
}
286
287
- $this->level ++;
288
- $content = sprintf( '<ul class="grandchild-sidebar-menu level-%s children">', $this->level );
289
290
$inside = '';
291
foreach ( $pages as $page ) {
292
$inside .= walk_page_tree( array( $page ), 1, $this->current_page->ID, $this->args );
293
- $inside .= $this->list_grandchild_pages( $page->ID );
294
$inside .= "</li>\n";
295
}
296
@@ -305,13 +282,13 @@ class Advanced_Sidebar_Menu_List_Pages {
305
/**
306
* Retrieve the child pages of specific page_id
307
*
308
- * @param int $parent_page_id
309
- * @param bool $is_first_level
310
*
311
* @return WP_Post[]
312
*/
313
public function get_child_pages( $parent_page_id, $is_first_level = false ) {
314
- // holds a unique key so Cache can distinguish calls
315
$this->current_children_parent = $parent_page_id;
316
317
$cache = Advanced_Sidebar_Menu_Cache::instance();
@@ -330,19 +307,6 @@ class Advanced_Sidebar_Menu_List_Pages {
330
331
// We only filter the first level with this filter for backward pro compatibility.
332
if ( $is_first_level ) {
333
- $child_pages = apply_filters_deprecated(
334
- 'advanced_sidebar_menu_child_pages',
335
- array(
336
- $child_pages,
337
- $this->current_page,
338
- $this->menu->instance,
339
- $this->menu->args,
340
- $this->menu,
341
- ),
342
- '7.1.0',
343
- 'advanced-sidebar-menu/list-pages/first-level-child-pages'
344
- );
345
-
346
$child_pages = apply_filters( 'advanced-sidebar-menu/list-pages/first-level-child-pages', $child_pages, $this, $this->menu );
347
}
348
@@ -352,11 +316,9 @@ class Advanced_Sidebar_Menu_List_Pages {
352
353
354
/**
355
- * is_current_page_ancestor
356
- *
357
- * Is the current page and ancestor of the specified page?
358
*
359
- * @param $page_id
360
*
361
* @return bool
362
*/
@@ -380,8 +342,9 @@ class Advanced_Sidebar_Menu_List_Pages {
380
381
382
/**
383
*
384
- * @param \Advanced_Sidebar_Menu_Menus_Page $menu
385
*
386
* @static
387
*
20
class Advanced_Sidebar_Menu_List_Pages {
21
22
/**
23
* The page list
24
*
25
* @var string
27
public $output = '';
28
29
/**
30
* Used when walking the list
31
*
32
* @var WP_Post
34
protected $current_page;
35
36
/**
37
* The top level parent id according to the menu class
38
*
39
* @var int
41
protected $top_parent_id;
42
43
/**
44
* Passed during construct given to walker and used for queries
45
*
46
* @var array
47
*/
48
protected $args = array();
49
50
/**
51
* Used exclusively for caching
52
* Holds the value of the latest parent we
58
protected $current_children_parent = 0;
59
60
/**
61
* Menu class
62
*
63
* @var \Advanced_Sidebar_Menu_Menus_Page
68
/**
69
* Constructor
70
*
71
+ * @param \Advanced_Sidebar_Menu_Menus_Page $menu - The menu class.
72
*/
73
protected function __construct( Advanced_Sidebar_Menu_Menus_Page $menu ) {
74
$this->menu = $menu;
80
'orderby' => $menu->get_order_by(),
81
'order' => $menu->get_order(),
82
'exclude' => $menu->get_excluded_ids(),
83
+ 'levels' => $menu->get_levels_to_display(),
84
);
85
86
$this->args = $this->parse_args( $args );
103
/**
104
* Add the custom classes to the list items
105
*
106
+ * @param array $classes - Provided classes for item.
107
+ * @param \WP_Post $post - The item.
108
*
109
* @return array
110
*/
118
$classes[] = 'has_children';
119
}
120
121
+ // page posts are handled by wp core. This is for custom post types.
122
if ( 'page' !== $post->post_type ) {
123
$ancestors = get_post_ancestors( $post );
124
+ if ( ! empty( $ancestors ) && in_array( $this->current_page->ID, $ancestors, false ) ) { //phpcs:ignore
125
$classes[] = 'current_page_ancestor';
126
} elseif ( $this->current_page->ID === $post->post_parent ) {
127
$classes[] = 'current_page_parent';
136
* Return the list of args that have been populated by this class
137
* For use with wp_list_pages()
138
*
139
+ * @param string $level - level of menu so we have full control of updates.
140
*
141
* @return array
142
*/
183
184
185
/**
186
* Do any adjustments to class args here
187
*
188
+ * @param array $args - Arguments for walk_page_tree.
189
*
190
* @return array
191
*/
210
if ( is_string( $args['exclude'] ) ) {
211
$args['exclude'] = explode( ',', $args['exclude'] );
212
}
213
+ // sanitize, mostly to keep spaces out.
214
$args['exclude'] = preg_replace( '/[^0-9,]/', '', implode( ',', apply_filters( 'wp_list_pages_excludes', $args['exclude'] ) ) );
215
216
return apply_filters( 'advanced_sidebar_menu_list_pages_args', $args, $this );
219
220
221
/**
222
+ * List the pages very similar to wp_list_pages.
223
*
224
* @return string
225
*/
227
$pages = $this->get_child_pages( $this->top_parent_id, true );
228
foreach ( $pages as $page ) {
229
$this->output .= walk_page_tree( array( $page ), 1, $this->current_page->ID, $this->args );
230
+ $this->output .= $this->list_grandchild_pages( $page->ID, 0 );
231
$this->output .= '</li>' . "\n";
232
}
233
235
if ( ! $this->args['echo'] ) {
236
return $this->output;
237
}
238
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
239
echo $this->output;
240
+ return '';
241
}
242
243
244
/**
245
+ * List all levels of grandchild pages up to the limit set in the widget.
246
+ * All grandchild pages will be rendered inside `grandchild-sidebar-menu` uls.
247
*
248
+ * @param int $parent_page_id - Id of the page we are getting the grandchildren of.
249
+ * @param int $level - Level of grandchild pages we are displaying.
250
*
251
* @return string
252
*/
253
+ protected function list_grandchild_pages( $parent_page_id, $level ) {
254
+ if ( $level >= (int) $this->args['levels'] ) {
255
return '';
256
}
257
+ if ( ! $this->menu->display_all() && ! $this->is_current_page_ancestor( $parent_page_id ) ) {
258
return '';
259
}
260
$pages = $this->get_child_pages( $parent_page_id );
262
return '';
263
}
264
265
+ $content = sprintf( '<ul class="grandchild-sidebar-menu level-%s children">', $level );
266
267
$inside = '';
268
foreach ( $pages as $page ) {
269
$inside .= walk_page_tree( array( $page ), 1, $this->current_page->ID, $this->args );
270
+ $inside .= $this->list_grandchild_pages( $page->ID, $level + 1 );
271
$inside .= "</li>\n";
272
}
273
282
/**
283
* Retrieve the child pages of specific page_id
284
*
285
+ * @param int $parent_page_id - Page id we are getting children of.
286
+ * @param bool $is_first_level - Is this the first level of child pages?.
287
*
288
* @return WP_Post[]
289
*/
290
public function get_child_pages( $parent_page_id, $is_first_level = false ) {
291
+ // holds a unique key so Cache can distinguish calls.
292
$this->current_children_parent = $parent_page_id;
293
294
$cache = Advanced_Sidebar_Menu_Cache::instance();
307
308
// We only filter the first level with this filter for backward pro compatibility.
309
if ( $is_first_level ) {
310
$child_pages = apply_filters( 'advanced-sidebar-menu/list-pages/first-level-child-pages', $child_pages, $this, $this->menu );
311
}
312
316
317
318
/**
319
+ * Is the specified page an ancestor of the current page?
320
*
321
+ * @param int $page_id - Post id to check against.
322
*
323
* @return bool
324
*/
342
343
344
/**
345
+ * List Pages Factory
346
*
347
+ * @param \Advanced_Sidebar_Menu_Menus_Page $menu - The menu class.
348
*
349
* @static
350
*
src/Menus/Abstract.php CHANGED
@@ -44,13 +44,6 @@ abstract class Advanced_Sidebar_Menu_Menus_Abstract {
44
*/
45
public $instance;
46
47
- /**
48
- * @deprecated
49
- *
50
- * @var int
51
- */
52
- public $levels = 100;
53
-
54
/**
55
* @deprecated 7.0.0
56
*
@@ -99,9 +92,6 @@ abstract class Advanced_Sidebar_Menu_Menus_Abstract {
99
abstract public function get_levels_to_display();
100
101
102
- abstract public function get_menu_depth();
103
-
104
-
105
/**
106
* Return the type of widget we are working with
107
* Used for comparisons like so
44
*/
45
public $instance;
46
47
/**
48
* @deprecated 7.0.0
49
*
92
abstract public function get_levels_to_display();
93
94
95
/**
96
* Return the type of widget we are working with
97
* Used for comparisons like so
src/Menus/Category.php CHANGED
@@ -89,7 +89,7 @@ class Advanced_Sidebar_Menu_Menus_Category extends Advanced_Sidebar_Menu_Menus_A
89
break;
90
case self::LEVEL_GRANDCHILD:
91
$args['child_of'] = $term->term_id;
92
- $args['depth'] = $this->get_menu_depth();
93
break;
94
}
95
@@ -129,17 +129,21 @@ class Advanced_Sidebar_Menu_Menus_Category extends Advanced_Sidebar_Menu_Menus_A
129
* @return int
130
*/
131
public function get_levels_to_display() {
132
- return apply_filters( 'advanced-sidebar-menu/menus/category/levels', $this->instance[ self::LEVELS ], $this->args, $this->instance, $this );
133
}
134
135
136
/**
137
- * Gets the number of levels to display when not doing 'Always display'
138
- *
139
- * @return int
140
*/
141
public function get_menu_depth() {
142
- return apply_filters( 'advanced-sidebar-menu/menus/category/depth', 3, $this->args, $this->instance, $this );
143
}
144
145
89
break;
90
case self::LEVEL_GRANDCHILD:
91
$args['child_of'] = $term->term_id;
92
+ $args['depth'] = $this->get_levels_to_display();
93
break;
94
}
95
129
* @return int
130
*/
131
public function get_levels_to_display() {
132
+ $depth = 3;
133
+ if ( $this->display_all() ) {
134
+ $depth = $this->instance[ self::LEVELS ];
135
+ }
136
+
137
+ return apply_filters( 'advanced-sidebar-menu/menus/category/levels', $depth, $this->args, $this->instance, $this );
138
}
139
140
141
/**
142
+ * @deprecated
143
*/
144
public function get_menu_depth() {
145
+ _deprecated_function( 'get_menu_depth', '7.5.0', 'get_levels_to_display' );
146
+ return apply_filters( 'advanced-sidebar-menu/menus/category/depth', $this->get_levels_to_display(), $this->args, $this->instance, $this );
147
}
148
149
src/Menus/Page.php CHANGED
@@ -129,19 +129,21 @@ class Advanced_Sidebar_Menu_Menus_Page extends Advanced_Sidebar_Menu_Menus_Abstr
129
* @return int
130
*/
131
public function get_levels_to_display() {
132
- return apply_filters( 'advanced-sidebar-menu/menus/page/levels', $this->instance[ self::LEVELS ], $this->args, $this->instance, $this );
133
}
134
135
136
/**
137
- * Gets the number of levels to display when not doing 'Always display'
138
- *
139
- * @todo convert pro over to this filter
140
- *
141
- * @return int
142
*/
143
public function get_menu_depth() {
144
- return apply_filters( 'advanced-sidebar-menu/menus/page/depth', $this->levels, $this->args, $this->instance, $this );
145
}
146
147
129
* @return int
130
*/
131
public function get_levels_to_display() {
132
+ $levels = 100;
133
+ if ( $this->display_all() ) {
134
+ // Subtract 1 level to account for the first level children.
135
+ $levels = $this->instance[ self::LEVELS ] - 1;
136
+ }
137
+ return apply_filters( 'advanced-sidebar-menu/menus/page/levels', $levels, $this->args, $this->instance, $this );
138
}
139
140
141
/**
142
+ * @deprecated
143
*/
144
public function get_menu_depth() {
145
+ _deprecated_function( 'get_menu_depth', '7.5.0', 'get_levels_to_display' );
146
+ return apply_filters( 'advanced-sidebar-menu/menus/page/depth', $this->get_levels_to_display(), $this->args, $this->instance, $this );
147
}
148
149
src/Widget/Category.php CHANGED
@@ -98,7 +98,7 @@ class Advanced_Sidebar_Menu_Widget_Category extends Advanced_Sidebar_Menu__Widge
98
<div <?php $widget->hide_element( self::DISPLAY_ALL, self::LEVELS ); ?>>
99
<p>
100
<label>
101
- <?php esc_html_e( 'Levels to display', 'advanced-sidebar-menu' ); ?>:</label>
102
<select
103
name="<?php echo esc_attr( $widget->get_field_name( self::LEVELS ) ); ?>">
104
<?php
98
<div <?php $widget->hide_element( self::DISPLAY_ALL, self::LEVELS ); ?>>
99
<p>
100
<label>
101
+ <?php esc_html_e( 'Levels of child categories to display', 'advanced-sidebar-menu' ); ?>:</label>
102
<select
103
name="<?php echo esc_attr( $widget->get_field_name( self::LEVELS ) ); ?>">
104
<?php
src/Widget/Page.php CHANGED
@@ -98,14 +98,23 @@ class Advanced_Sidebar_Menu_Widget_Page extends Advanced_Sidebar_Menu__Widget__W
98
</label>
99
</p>
100
101
- <div <?php $widget->hide_element( self::DISPLAY_ALL, self::LEVELS ); ?>>
102
<p>
103
<label>
104
- <?php esc_html_e( 'Levels to display', 'advanced-sidebar-menu' ); ?>:</label>
105
<select
106
name="<?php echo esc_attr( $widget->get_field_name( self::LEVELS ) ); ?>">
107
<?php
108
- for ( $i = 1; $i < 6; $i ++ ) {
109
?>
110
<option
111
value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, (int) $instance[ self::LEVELS ] ); ?>>
98
</label>
99
</p>
100
101
+ <div
102
+ <?php
103
+ if ( apply_filters( 'advanced-sidebar-menu/widget/page/hide-levels-field', true ) ) {
104
+ $widget->hide_element( self::DISPLAY_ALL, self::LEVELS );
105
+ }
106
+ ?>
107
+ >
108
<p>
109
<label>
110
+ <?php esc_html_e( 'Maximum level of child pages to display', 'advanced-sidebar-menu' ); ?>:</label>
111
<select
112
name="<?php echo esc_attr( $widget->get_field_name( self::LEVELS ) ); ?>">
113
+ <option value="100">
114
+ <?php esc_html_e( ' - All - ', 'advanced-sidebar-menu' ); ?>
115
+ </option>
116
<?php
117
+ for ( $i = 1; $i < 10; $i ++ ) {
118
?>
119
<option
120
value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, (int) $instance[ self::LEVELS ] ); ?>>
views/page_list.php CHANGED
@@ -4,7 +4,7 @@
4
*
5
* @author Mat Lipe
6
*
7
- * @since 7.4.7
8
* @package advanced-sidebar-menu
9
*
10
* @example to edit, create a file named page_list.php and
@@ -30,17 +30,8 @@ if ( $current_menu->include_parent() ) {
30
31
if ( ! empty( $child_pages ) ) {
32
$content .= '<ul class="child-sidebar-menu">';
33
-
34
- // Always display child pages.
35
- if ( $current_menu->display_all() ) {
36
- $list_args = $list_pages->get_args( Advanced_Sidebar_Menu_Menus_Page::LEVEL_DISPLAY_ALL );
37
- $content .= wp_list_pages( $list_args );
38
-
39
- } else {
40
// Child and grandchild pages.
41
$content .= $list_pages->list_pages();
42
- }
43
-
44
$content .= '</ul><!-- End .child-sidebar-menu -->';
45
46
}
4
*
5
* @author Mat Lipe
6
*
7
+ * @since 7.5.0
8
* @package advanced-sidebar-menu
9
*
10
* @example to edit, create a file named page_list.php and
30
31
if ( ! empty( $child_pages ) ) {
32
$content .= '<ul class="child-sidebar-menu">';
33
// Child and grandchild pages.
34
$content .= $list_pages->list_pages();
35
$content .= '</ul><!-- End .child-sidebar-menu -->';
36
37
}