Sanitizes a ‘relation’ operator.
Parameters
$relation
stringrequired- Raw relation key from the query argument.
Source
public function sanitize_relation( $relation ) {
if ( 'OR' === strtoupper( $relation ) ) {
return 'OR';
} else {
return 'AND';
}
}
Changelog
Version | Description |
---|---|
4.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.