PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.6.0
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.6.0
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
betterdocs / views / templates / faq.php

faq.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.6.0, at views/templates/faq.php

31 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical.
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7 $mods = betterdocs()->customizer->defaults->generate_defaults();
8 $query = new WP_Query(
9 [
10 'post_type' => 'betterdocs_faq',
11 'post_status' => 'publish'
12 ]
13 );
14 $faq_terms = get_terms( betterdocs()->query->faq_terms_query_args() );
15
16 betterdocs()->views->get(
17 'layouts/faq',
18 [
19 'enable' => $mods['betterdocs_faq_switch'],
20 'have_posts' => $query->have_posts(),
21 'layout' => $mods['betterdocs_select_faq_template'],
22 'shortcode_attr' => [
23 'groups' => $mods['betterdocs_select_specific_faq'],
24 'class' => 'faq-doc betterdocs-faq-' . $mods['betterdocs_select_faq_template'],
25 'faq_heading' => $mods['betterdocs_faq_title_text'],
26 'faq_section_title_tag' => $mods['betterdocs_faq_section_title_tag'],
27 'faq_group_title_tag' => $mods['betterdocs_faq_group_title_tag']
28 ]
29 ]
30 );
31