LLMS_REST_Posts_Controller::sanitize_post_statuses( string|array $statuses, WP_REST_Request $request, string $parameter )
Sanitizes and validates the list of post statuses, including whether the user can query private statuses
Description Description
Heavily based on the WordPress WP_REST_Posts_Controller::sanitize_post_statuses().
Parameters Parameters
- $statuses
-
(string|array) (Required) One or more post statuses.
- $request
-
(WP_REST_Request) (Required) Full details about the request.
- $parameter
-
(string) (Required) Additional parameter to pass to validation.
Return Return
(array|WP_Error) A list of valid statuses, otherwise WP_Error object.
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php
$class = 'LLMS'; foreach ( $post_type as $part ) { $class .= '_' . ucfirst( $part ); } if ( class_exists( $class ) ) { $this->llms_post_class = $class; } else { $this->llms_post_class = false; } return $this->llms_post_class; } /** * Sanitizes and validates the list of post statuses, including whether the user can query private statuses * * Heavily based on the WordPress WP_REST_Posts_Controller::sanitize_post_statuses(). * * @since 1.0.0-beta.19 * * @param string|array $statuses One or more post statuses. * @param WP_REST_Request $request Full details about the request. * @param string $parameter Additional parameter to pass to validation.
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.19 | Introduced. |