Summery Summery
Parses an ‘order’ query variable and cast it to ‘ASC’ or ‘DESC’ as necessary.
Syntax Syntax
Parameters Parameters
- $order
-
(Required) The 'order' query variable.
Return Return
(string) The sanitized 'order' query variable.
Source Source
File: wp-includes/class-wp-network-query.php
if ( ! is_string( $order ) || empty( $order ) ) { return 'ASC'; } if ( 'ASC' === strtoupper( $order ) ) { return 'ASC'; } else { return 'DESC'; } } }
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |