WordPress at a glance
function is not described

WP_REST_Post_Statuses_Controller::get_item() public WP 4.7.0

Retrieves a specific post status.

{} It's a method of the class: WP_REST_Post_Statuses_Controller{}

No Hooks.

Return

WP_REST_Response/WP_Error. Response object on success, or WP_Error object on failure.

Usage

$WP_REST_Post_Statuses_Controller = new WP_REST_Post_Statuses_Controller();
$WP_REST_Post_Statuses_Controller->get_item( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Changelog

Since 4.7.0 Introduced.

Code of WP_REST_Post_Statuses_Controller::get_item() WP 5.5.1

<?php
public function get_item( $request ) {
	$obj = get_post_status_object( $request['status'] );

	if ( empty( $obj ) ) {
		return new WP_Error(
			'rest_status_invalid',
			__( 'Invalid status.' ),
			array( 'status' => 404 )
		);
	}

	$data = $this->prepare_item_for_response( $obj, $request );

	return rest_ensure_response( $data );
}