Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP_Widget_Categories::widget(): Use booleans instead of numeric strings #8071

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/wp-includes/widgets/class-wp-widget-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand Down
Loading