Abstract_REST_Endpoint::sanitize_callback( mixed $value )

Sanitize a request argument based on details registered to the route.


Parameters

$value

(mixed) (Required) Value of the 'filter' argument.


Top ↑

Return

(string|array)


Top ↑

Source

File: src/Tickets/Commerce/Gateways/Contracts/Abstract_REST_Endpoint.php

	public function sanitize_callback( $value ) {
		if ( is_array( $value ) ) {
			return array_map( 'sanitize_text_field', $value );
		}

		return sanitize_text_field( $value );
	}

Top ↑

Changelog

Changelog
Version Description
5.3.0 moved to Abstract_REST_Endpoint
5.1.9 Introduced.