WP_REST_Posts_Controller::handle_status_param

SummerySummery

Determines validity and normalizes the given status parameter.

Syntax

WP_REST_Posts_Controller::handle_status_param( string $post_status, WP_Post_Type $post_type )

ParametersParameters

$post_status

(string) (Required) Post status.

$post_type

(WP_Post_Type) (Required) Post type.

ReturnReturn

(string|WP_Error) Post status or WP_Error if lacking the proper permission.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top