| @@ -1,5 +1,10 @@ | ||
| 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 | if ( ( isset( $force ) && $force == null ) || ! isset( $force ) ) { |
| 3 | 8 | if ( ! betterdocs()->settings->get( 'enable_sidebar_cat_list' ) && isset( $layout_type ) && $layout_type == 'template' ) { |
| 4 | 9 | return; |
| 5 | 10 | } |
| @@ -58,9 +63,10 @@ | ||
| 58 | 63 | 'show_count' => true, |
| 59 | 64 | 'list_icon_url' => false, |
| 60 | 65 | 'posts_per_page' => -1, |
| 61 | 66 | 'title_tag' => betterdocs()->template_helper->is_valid_tag( $title_tag ), |
| 62 | - 'layout_type' => isset( $layout_type ) ? $layout_type : '' | |
| 67 | + 'layout_type' => isset( $layout_type ) ? $layout_type : '', | |
| 68 | + 'lazy_load' => ! empty( betterdocs()->settings->get( 'archive_lazy_load_descendants' ) ), | |
| 63 | 69 | ]; |
| 64 | 70 | |
| 65 | 71 | if ( isset( $layout_type ) && $layout_type == 'block' ) { |
| 66 | 72 | $_shortcode_attr['list_icon_url'] = ''; |