WordPress.org

Make WordPress Core

Ticket #48228: 48228.diff

File 48228.diff, 1.4 KB (added by itowhid06, 16 months ago)
  • src/wp-includes/widgets/class-wp-widget-links.php

    diff --git a/src/wp-includes/widgets/class-wp-widget-links.php b/src/wp-includes/widgets/class-wp-widget-links.php
    index 233c64bcd8..dead10997c 100644
    a b class WP_Widget_Links extends WP_Widget { 
    4545                $show_images      = isset( $instance['images'] ) ? $instance['images'] : true;
    4646                $category         = isset( $instance['category'] ) ? $instance['category'] : false;
    4747                $orderby          = isset( $instance['orderby'] ) ? $instance['orderby'] : 'name';
    48                 $order            = $orderby == 'rating' ? 'DESC' : 'ASC';
     48                $order            = 'rating' == $orderby ? 'DESC' : 'ASC';
    4949                $limit            = isset( $instance['limit'] ) ? $instance['limit'] : -1;
    5050
    5151                $before_widget = preg_replace( '/id="[^"]*"/', 'id="%id"', $args['before_widget'] );
  • src/wp-includes/widgets/class-wp-widget-pages.php

    diff --git a/src/wp-includes/widgets/class-wp-widget-pages.php b/src/wp-includes/widgets/class-wp-widget-pages.php
    index 43ab8e4717..89f5c9c4e1 100644
    a b class WP_Widget_Pages extends WP_Widget { 
    5656                $sortby  = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby'];
    5757                $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude'];
    5858
    59                 if ( $sortby == 'menu_order' ) {
     59                if ( 'menu_order' == $sortby ) {
    6060                        $sortby = 'menu_order, post_title';
    6161                }
    6262