| @@ -1,6 +1,11 @@ | ||
| 1 | 1 | <?php |
| 2 | - $_defined_vars = get_defined_vars(); | |
| 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 | +$_defined_vars = get_defined_vars(); | |
| 3 | 8 | |
| 4 | 9 | $_layout_sequence = [ 'category_icon', 'category_title', 'category_counts' ]; |
| 5 | 10 | |
| 6 | 11 | if ( $layout === 'layout-2' && $widget_type == 'category-grid' ) { |