| @@ -1,15 +1,30 @@ | ||
| 1 | 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 | +} | |
| 2 | 7 | $mods = betterdocs()->customizer->defaults->generate_defaults(); |
| 3 | -$query = new WP_Query( ['post_type' => 'betterdocs_faq', 'post_status' => 'publish'] ); | |
| 8 | +$query = new WP_Query( | |
| 9 | + [ | |
| 10 | + 'post_type' => 'betterdocs_faq', | |
| 11 | + 'post_status' => 'publish' | |
| 12 | + ] | |
| 13 | +); | |
| 4 | 14 | $faq_terms = get_terms( betterdocs()->query->faq_terms_query_args() ); |
| 5 | 15 | |
| 6 | -betterdocs()->views->get( 'layouts/faq', [ | |
| 7 | - 'enable' => $mods['betterdocs_faq_switch'], | |
| 8 | - 'have_posts' => $query->have_posts(), | |
| 9 | - 'layout' => $mods['betterdocs_select_faq_template'], | |
| 10 | - 'shortcode_attr' => [ | |
| 11 | - 'groups' => $mods['betterdocs_select_specific_faq'], | |
| 12 | - 'class' => 'faq-doc betterdocs-faq-' . $mods['betterdocs_select_faq_template'], | |
| 13 | - 'faq_heading' => $mods['betterdocs_faq_title_text'] | |
| 14 | - ] | |
| 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 | +); | |