PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.5.3
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.5.3
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 3.5.2 All 199 releases
← All changes | includes/Shortcodes/SearchForm.php +6 -2 3.4.13.5.3 View file →
@@ -27,9 +27,9 @@
27 27 public function get_search_results() {
28 28 global $wpdb;
29 29 $search_input = isset( $_POST['search_input'] ) ? sanitize_text_field( $_POST['search_input'] ) : '';
30 30 $search_cat = isset( $_POST['search_cat'] ) ? wp_strip_all_tags( $_POST['search_cat'] ) : '';
31 - $lang = isset( $_POST['lang'] ) ? wp_strip_all_tags( $_POST['lang'] ) : '';
31 + $lang = isset( $_POST['lang'] ) ? wp_strip_all_tags( $_POST['lang'] ) : '';
32 32 $search_input = preg_replace( '/[^A-Za-z0-9_\- ][]]/', '', strtolower( $search_input ) );
33 33
34 34 $tax_query = [];
35 35 if ( $search_cat ) {
@@ -58,9 +58,9 @@
58 58 ];
59 59
60 60 if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
61 61 $args['suppress_filters'] = false;
62 - $args['lang'] = ICL_LANGUAGE_CODE;
62 + $args['lang'] = ICL_LANGUAGE_CODE;
63 63 }
64 64
65 65 $search_results = $this->query->get_posts( $args );
66 66
@@ -205,7 +205,11 @@
205 205 ] );
206 206 }
207 207
208 208 public function render( $atts, $content = null ) {
209 + betterdocs()->assets->localize( 'betterdocs-search', 'betterdocsSearchConfigTwo', [
210 + 'is_post_type_archive' => is_post_type_archive( 'docs' ),
211 + ] );
212 +
209 213 $this->views( 'shortcodes/search' );
210 214 }
211 215 }