PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.8.9
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.8.9
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/Admin/CSVExporter.php +4 -13 4.4.13.8.9 View file →
@@ -1,9 +1,7 @@
1 1 <?php
2 2 namespace WPDeveloper\BetterDocs\Admin;
3 3
4 -use Error;
5 -
6 4 if ( ! defined( 'ABSPATH' ) ) {
7 5 exit; // Exit if accessed directly.
8 6 }
9 7
@@ -119,23 +117,16 @@
119 117 );
120 118 }
121 119 } elseif ( isset( $this->args['kb_terms'] ) ) {
122 120 $join = "INNER JOIN {$this->wpdb->term_relationships} ON ({$this->wpdb->posts}.ID = {$this->wpdb->term_relationships}.object_id)";
123 - $kb_terms = [];
124 -
125 121 foreach ( $this->args['kb_terms'] as $term_slug ) {
126 122 $term = get_term_by( 'slug', $term_slug, 'knowledge_base' );
127 123 if ( $term ) {
128 - $kb_terms[] = $term->term_taxonomy_id;
124 + $where .= $this->wpdb->prepare(
125 + " AND {$this->wpdb->term_relationships}.term_taxonomy_id = %d",
126 + $term->term_taxonomy_id
127 + );
129 128 }
130 - }
131 -
132 - if ( ! empty( $kb_terms ) ) {
133 - $term_placeholder = implode( ', ', array_fill( 0, count( $kb_terms ), '%d' ) );
134 - $where .= $this->wpdb->prepare(
135 - " AND {$this->wpdb->term_relationships}.term_taxonomy_id IN ($term_placeholder)",
136 - $kb_terms
137 - );
138 129 }
139 130 }
140 131
141 132 if ( $this->args['author'] ) {