Changeset 46415
- Timestamp:
- 10/06/2019 03:26:42 PM (5 years ago)
- Location:
- trunk/src/wp-includes/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-links.php
r45723 r46415 46 46 $category = isset( $instance['category'] ) ? $instance['category'] : false; 47 47 $orderby = isset( $instance['orderby'] ) ? $instance['orderby'] : 'name'; 48 $order = $orderby == 'rating'? 'DESC' : 'ASC';48 $order = 'rating' === $orderby ? 'DESC' : 'ASC'; 49 49 $limit = isset( $instance['limit'] ) ? $instance['limit'] : -1; 50 50 … … 176 176 <p> 177 177 <label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of links to show:' ); ?></label> 178 <input id="<?php echo $this->get_field_id( 'limit' ); ?>" name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit == -1 ? '' : intval( $limit ); ?>" size="3" />178 <input id="<?php echo $this->get_field_id( 'limit' ); ?>" name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo ( -1 !== $limit ) ? intval( $limit ) : ''; ?>" size="3" /> 179 179 </p> 180 180 <?php -
trunk/src/wp-includes/widgets/class-wp-widget-pages.php
r43571 r46415 57 57 $exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude']; 58 58 59 if ( $sortby == 'menu_order') {59 if ( 'menu_order' === $sortby ) { 60 60 $sortby = 'menu_order, post_title'; 61 61 }
Note: See TracChangeset
for help on using the changeset viewer.