WP_REST_Search_Controller::sanitize_subtypes

SummerySummery

Sanitizes the list of subtypes, to ensure only subtypes of the passed type are included.

Syntax

WP_REST_Search_Controller::sanitize_subtypes( string|array $subtypes, WP_REST_Request $request, string $parameter )

ParametersParameters

$subtypes

(string|array) (Required) One or more subtypes.

$request

(WP_REST_Request) (Required) Full details about the request.

$parameter

(string) (Required) Parameter name.

ReturnReturn

(array|WP_Error) List of valid subtypes, or WP_Error object on failure.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
5.0.0 Introduced.
Scroll to Top