Changeset 46415 for trunk/src/wp-includes/widgets/class-wp-widget-links.php
- Timestamp:
- 10/06/2019 03:26:42 PM (5 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.