You appear to be a bot. Output may be restricted
Description
Validates that the parameter is a string.
Usage
$bool|WP_Error = Jetpack_Core_Json_Api_Endpoints::validate_string( $value, $request, $param );
Parameters
- $value
- ( string ) required – Value to check.
- $request
- ( WP_REST_Request ) required – The request sent to the WP REST API.
- $param
- ( string ) required – Name of the parameter passed to endpoint holding $value.
Returns
bool|WP_Error
Source
File name: jetpack/_inc/lib/class.core-rest-api-endpoints.php
Lines:
1 to 7 of 7
public static function validate_string( $value, $request, $param ) { if ( ! is_string( $value ) ) { return new WP_Error( 'invalid_param', sprintf( esc_html__( '%s must be a string.', 'jetpack' ), $param ) ); } return true; }