PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.2
4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 All 200 releases
← All changes | views/widgets/archive-list.php +11 -0 4.5.04.9.2 View file →
@@ -1,5 +1,10 @@
1 1 <?php
2 +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical.
3 +
4 +if ( ! defined( 'ABSPATH' ) ) {
5 + exit;
6 +}
2 7 use WPDeveloper\BetterDocs\Utils\Helper;
3 8
4 9 $_defined_vars = get_defined_vars();
5 10 $_params = isset( $_defined_vars['params'] ) ? $_defined_vars['params'] : [];
@@ -16,8 +21,12 @@
16 21 'post_query' => $post_query,
17 22 'docs_list_title_tag' => isset( $_params['docs_list_title_tag'] ) ? $_params['docs_list_title_tag'] : 'h2'
18 23 ]
19 24 );
25 + // Nested subcategories — emitted here (not inside the shared leaf template,
26 + // which the block and Customizer archive layouts also use) so it stays
27 + // scoped to this widget. Sibling after the grid, so it is not a grid cell.
28 + $view_object->get( 'template-parts/archive-nested-categories', $_params );
20 29 } elseif ( isset( $_params['query_args'] ) ) {
21 30 $post_query = new WP_Query( $_params['query_args'] );
22 31 $view_object->get(
23 32 'template-parts/archive-doc-list',
@@ -25,8 +34,10 @@
25 34 'post_query' => $post_query,
26 35 'docs_list_title_tag' => isset( $_params['docs_list_title_tag'] ) ? $_params['docs_list_title_tag'] : 'h2'
27 36 ]
28 37 );
38 + // Nested subcategories for Layout 2 (scoped to this widget — see above).
39 + $view_object->get( 'template-parts/archive-nested-categories', $_params );
29 40 }
30 41
31 42 if ( isset( $pagination ) && $pagination ) {
32 43 $current_term = isset( $edit_mode ) && $edit_mode && isset( $widget_type ) && $widget_type == 'elementor' ? Helper::get_highest_docs_term() : ( isset( $_params['term'] ) ? $_params['term'] : '' );