From 042e304dac785e5529bbe4203d45286f59de817f Mon Sep 17 00:00:00 2001 From: Marian <42134098+IanDelMar@users.noreply.github.com> Date: Thu, 2 Jan 2025 00:18:44 +0100 Subject: [PATCH] WP_Widget_Categories::widget(): Use booleans instead of numeric strings --- src/wp-includes/widgets/class-wp-widget-categories.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/widgets/class-wp-widget-categories.php b/src/wp-includes/widgets/class-wp-widget-categories.php index b79881e75292f..db80c3a8a61da 100644 --- a/src/wp-includes/widgets/class-wp-widget-categories.php +++ b/src/wp-includes/widgets/class-wp-widget-categories.php @@ -51,9 +51,9 @@ public function widget( $args, $instance ) { /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); - $count = ! empty( $instance['count'] ) ? '1' : '0'; - $hierarchical = ! empty( $instance['hierarchical'] ) ? '1' : '0'; - $dropdown = ! empty( $instance['dropdown'] ) ? '1' : '0'; + $count = ! empty( $instance['count'] ) ? true : false; + $hierarchical = ! empty( $instance['hierarchical'] ) ? true : false; + $dropdown = ! empty( $instance['dropdown'] ) ? true : false; echo $args['before_widget'];