Noptin_Subscriber_Query::parse_order( string $order )
Parse an ‘order’ query variable and cast it to ASC or DESC as necessary.
Parameters Parameters
- $order
(string) (Required) The 'order' query variable.
Return Return
(string) The sanitized 'order' query variable.
Source Source
File: includes/class-noptin-subscriber-query.php
protected function parse_order( $order ) { if ( ! is_string( $order ) || empty( $order ) ) { return 'DESC'; } if ( 'ASC' === strtoupper( $order ) ) { return 'ASC'; } else { return 'DESC'; } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.2.7 | Introduced. |