@@ 1075-1078 (lines=4) @@ | ||
1072 | return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $param, 'integer' ) ); |
|
1073 | } |
|
1074 | ||
1075 | if ( 'boolean' === $args['type'] && ! rest_is_boolean( $value ) ) { |
|
1076 | /* translators: 1: parameter, 2: type name */ |
|
1077 | return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $value, 'boolean' ) ); |
|
1078 | } |
|
1079 | ||
1080 | if ( 'string' === $args['type'] && ! is_string( $value ) ) { |
|
1081 | /* translators: 1: parameter, 2: type name */ |
|
@@ 1080-1083 (lines=4) @@ | ||
1077 | return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $value, 'boolean' ) ); |
|
1078 | } |
|
1079 | ||
1080 | if ( 'string' === $args['type'] && ! is_string( $value ) ) { |
|
1081 | /* translators: 1: parameter, 2: type name */ |
|
1082 | return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s is not of type %2$s.' ), $param, 'string' ) ); |
|
1083 | } |
|
1084 | ||
1085 | if ( isset( $args['format'] ) ) { |
|
1086 | switch ( $args['format'] ) { |