PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.3
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.3
4.9.3 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 All 201 releases
← All changes | views/shortcode-parts/search-results.php +6 -1 4.5.2 → 4.9.3 View file →
@@ -1,8 +1,12 @@
1 1 <div class="betterdocs-search-result-wrap">
2 2 <ul class="docs-search-result">
3 3 <?php
4 - if ( $search_results->have_posts() ) {
4 +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical.
5 +if ( ! defined( 'ABSPATH' ) ) {
6 + exit;
7 +}
8 +if ( $search_results->have_posts() ) {
5 9 $input_not_found = '';
6 10 while ( $search_results->have_posts() ) :
7 11 $search_results->the_post();
8 12 preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', get_the_content(), $matches );
@@ -37,8 +41,9 @@
37 41 $permalink = get_permalink( $post_id );
38 42
39 43 // Handle WPML permalinks
40 44 if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
45 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WPML public integration filter.
41 46 $post_language = apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $post_id, 'element_type' => 'post_docs' ) );
42 47
43 48 if ( $post_language ) {
44 49 global $sitepress;