| 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 |
|