WordPress at a glance
function is not described

WP_REST_Themes_Controller::sanitize_theme_status() public WP 5.0.0

Sanitizes and validates the list of theme status.

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

No Hooks.

Return

Array/WP_Error. A list of valid statuses, otherwise WP_Error object.

Usage

$WP_REST_Themes_Controller = new WP_REST_Themes_Controller();
$WP_REST_Themes_Controller->sanitize_theme_status( $statuses, $request, $parameter );
$statuses(string/array) (required)
One or more theme statuses.
$request(WP_REST_Request) (required)
Full details about the request.
$parameter(string) (required)
Additional parameter to pass to validation.

Changelog

Since 5.0.0 Introduced.

Code of WP_REST_Themes_Controller::sanitize_theme_status() WP 5.5.3

<?php
public function sanitize_theme_status( $statuses, $request, $parameter ) {
	$statuses = wp_parse_slug_list( $statuses );

	foreach ( $statuses as $status ) {
		$result = rest_validate_request_arg( $status, $request, $parameter );

		if ( is_wp_error( $result ) ) {
			return $result;
		}
	}

	return $statuses;
}