sanitize_post_statuses()
public method
Sanitizes and validates the list of post statuses, including whether the
user can query private statuses.
public sanitize_post_statuses ( string | array $statuses, WP_REST_Request $request, string $parameter ) : array | WP_Error |
$statuses |
string | array |
One or more post statuses. |
$request |
WP_REST_Request |
Full details about the request. |
$parameter |
string |
Additional parameter to pass to validation. |
return |
array | WP_Error |
A list of valid statuses, otherwise WP_Error object. |