WordPress at Your Fingertips
function is not described

WP_REST_Themes_Controller::sanitize_theme_status() public WP 5.0.0

Deprecated from version 5.7.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

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.
Deprecated 5.7.0

Code of WP_REST_Themes_Controller::sanitize_theme_status() WP 5.7.2

<?php
public function sanitize_theme_status( $statuses, $request, $parameter ) {
	_deprecated_function( __METHOD__, '5.7.0' );

	$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;
}