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 | views/layouts/faq.php +3 -12 4.9.03.8.9 View file →
@@ -1,19 +1,10 @@
1 1 <?php
2 -// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical.
2 +$faq_terms = get_terms( betterdocs()->query->faq_terms_query_args() );
3 3
4 -if ( ! defined( 'ABSPATH' ) ) {
5 - exit;
6 -}
7 -$_faq_taxonomy = isset( $shortcode_attr['faq_taxonomy'] ) ? sanitize_key( $shortcode_attr['faq_taxonomy'] ) : 'betterdocs_faq_category';
8 -$faq_terms = get_terms( betterdocs()->query->faq_terms_query_args( '', '', [], $_faq_taxonomy ) );
9 -
10 4 if ( $enable && $have_posts && ! empty( $faq_terms ) ) {
11 - // Only use settings value if faq_schema is not already set in shortcode attributes
12 - if ( ! isset( $shortcode_attr['faq_schema'] ) ) {
13 - $enable_faq_schema = betterdocs()->settings->get( 'enable_faq_schema' );
14 - $shortcode_attr['faq_schema'] = $enable_faq_schema;
15 - }
5 + $enable_faq_schema = betterdocs()->settings->get( 'enable_faq_schema' );
6 + $shortcode_attr['faq_schema'] = $enable_faq_schema;
16 7
17 8 $attributes = betterdocs()->template_helper->get_html_attributes( $shortcode_attr );
18 9
19 10 if ( $layout === 'layout-1' ) {