From b58b97f05f38b1b46c4023c531291dfc5a4fd0ca Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Fri, 20 May 2022 08:43:00 -0300 Subject: [PATCH] Set some default args and instance values --- includes/classes/Feature/Facets/Renderer.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/includes/classes/Feature/Facets/Renderer.php b/includes/classes/Feature/Facets/Renderer.php index 12c467813e..140b239c67 100644 --- a/includes/classes/Feature/Facets/Renderer.php +++ b/includes/classes/Feature/Facets/Renderer.php @@ -28,6 +28,22 @@ class Renderer { public function render( $args, $instance ) { global $wp_query; + $args = wp_parse_args( + $args, + [ + 'before_widget' => '', + 'before_title' => '', + 'after_title' => '', + 'after_widget' => '', + ] + ); + $instance = wp_parse_args( + $instance, + [ + 'title' => '', + ] + ); + $feature = Features::factory()->get_registered_feature( 'facets' ); if ( $wp_query->get( 'ep_facet', false ) && ! $feature->is_facetable( $wp_query ) ) {