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 | includes/Shortcodes/CategoryBox.php +7 -2 4.5.44.9.2 View file →
@@ -1,8 +1,13 @@
1 1 <?php
2 +// phpcs:disable WordPress.DB.SlowDBQuery.slow_db_query_meta_key -- ordering by user-assigned meta is required UX.
3 +namespace WPDeveloper\BetterDocs\Shortcodes;
2 4
3 -namespace WPDeveloper\BetterDocs\Shortcodes;
5 +if ( ! defined( 'ABSPATH' ) ) {
6 + exit;
7 +}
4 8
9 +
5 10 use WPDeveloper\BetterDocs\Core\Shortcode;
6 11
7 12 class CategoryBox extends Shortcode {
8 13 protected $layout_class = 'layout-1';
@@ -74,9 +79,9 @@
74 79 $_query_args = [
75 80 'terms' => $this->attributes['terms'],
76 81 'order' => $this->attributes['terms_order'],
77 82 'orderby' => $this->attributes['terms_orderby'],
78 - 'multiple_kb' => $this->attributes['multiple_knowledge_base'],
83 + 'multiple_kb' => ( $this->attributes['multiple_knowledge_base'] && ! empty( $this->attributes['kb_slug'] ) ) ? true : false,
79 84 'kb_slug' => $this->attributes['kb_slug'],
80 85 'nested_subcategory' => (bool) $this->attributes['nested_subcategory']
81 86 ];
82 87