From a59b9dd39ec95c260a36bc5e5d5187a3b5e50b6c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 6 Oct 2019 15:26:42 +0000 Subject: [PATCH] Coding Standards: Fix WPCS issues in `WP_Widget_Links` and `WP_Widget_Pages`. Props itowhid06. Fixes #48228. git-svn-id: https://develop.svn.wordpress.org/trunk@46415 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/widgets/class-wp-widget-links.php | 4 ++-- src/wp-includes/widgets/class-wp-widget-pages.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/widgets/class-wp-widget-links.php b/src/wp-includes/widgets/class-wp-widget-links.php index 233c64bcd8..92924380ed 100644 --- a/src/wp-includes/widgets/class-wp-widget-links.php +++ b/src/wp-includes/widgets/class-wp-widget-links.php @@ -45,7 +45,7 @@ class WP_Widget_Links extends WP_Widget { $show_images = isset( $instance['images'] ) ? $instance['images'] : true; $category = isset( $instance['category'] ) ? $instance['category'] : false; $orderby = isset( $instance['orderby'] ) ? $instance['orderby'] : 'name'; - $order = $orderby == 'rating' ? 'DESC' : 'ASC'; + $order = 'rating' === $orderby ? 'DESC' : 'ASC'; $limit = isset( $instance['limit'] ) ? $instance['limit'] : -1; $before_widget = preg_replace( '/id="[^"]*"/', 'id="%id"', $args['before_widget'] ); @@ -175,7 +175,7 @@ class WP_Widget_Links extends WP_Widget {
- +