Ticket #43831: 43831.diff
| File 43831.diff, 660 bytes (added by , 8 years ago) |
|---|
-
src/wp-includes/class-wp-query.php
1627 1627 * @return string The sanitized 'order' query variable. 1628 1628 */ 1629 1629 protected function parse_order( $order ) { 1630 if ( ! is_string( $order ) || empty( $order ) ) { 1630 if ( 1631 ! is_string( $order ) 1632 || empty( $order ) 1633 || 'ASC' !== strtoupper( $order ) 1634 ) { 1631 1635 return 'DESC'; 1632 1636 } 1633 1637 1634 if ( 'ASC' === strtoupper( $order ) ) { 1635 return 'ASC'; 1636 } else { 1637 return 'DESC'; 1638 } 1638 return 'ASC'; 1639 1639 } 1640 1640 1641 1641 /**