rest_validate_value_from_schema( mixed $value, array $args, string $param = '' ): true|WP_Error
- Since
- 4.7.0, 4.9.0, 5.2.0, 5.3.0, 5.4.0, 5.5.0, 5.6.0
- Source
wp-includes/rest-api.php:2221
Compatibility
- WordPress
- since 5.6.0
- PHP
- 7.4–8.6-dev
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.
Parameters
$valuemixed- The value to validate.
$argsarray- Schema array to use for validation.
$paramstringoptional- The parameter name, used in error messages.Default:
''
Return value
true|WP_Error
Performance profile
How much work a call to rest_validate_value_from_schema() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.
- Cost class
- Trivial
- Scaling
- Constant
- Instructions
- 25–105
- Plugin surface
- None
- Called by
- 19
Touches nothing outside its own arguments.
No loop in the body: the same number of instructions runs whatever you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 287.
Nothing here hands control to plugin code.
19 places in core call this, so the cost is paid more often than your own code shows.
What it touches
- hookthird-party callbacks
do_action()one call below rest_validate_value_from_schema()
Further down the call graph this can also reach option, cache, serialize, query and transient. Those are the worst case, several calls deep and usually down an error path, not what a normal call pays.
What one call costs · 352 distinct outcomes
One number would be a lie: the work depends on which branch runs. These are every distinct cost rest_validate_value_from_schema() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
| always | 25–67 | is_wp_error() |
| always | 30–59 | rest_validate_null_value_from_schema(), is_wp_error() |
| always | 30–61 | rest_validate_boolean_value_from_schema(), is_wp_error() |
| always | 31–64 | rest_validate_object_value_from_schema(), is_wp_error() |
| always | 31–66 | rest_validate_array_value_from_schema(), is_wp_error() |
| always | 31–68 | rest_validate_number_value_from_schema(), is_wp_error() |
| always | 31–70 | rest_validate_string_value_from_schema(), is_wp_error() |
| always | 31–72 | rest_validate_integer_value_from_schema(), is_wp_error() |
!is_wp_error() && !empty($args) | 37–77 | is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 38–62 | is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 38–66 | is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 38–68 | is_wp_error(), rest_is_ip_address() |
340 further outcomes, up to 95 instructions
!is_wp_error() && empty($args) && wp_is_uuid() | 38–70 | is_wp_error(), wp_is_uuid() |
$args | 38–65 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error() |
!is_wp_error() && empty($args) | 39–65 | is_wp_error(), rest_parse_date() |
!is_wp_error() && !empty($args) | 42–69 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 42–71 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 43–54 | rest_validate_null_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 43–58 | rest_validate_null_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 43–60 | rest_validate_null_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 43–62 | rest_validate_null_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 43–56 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 43–60 | rest_validate_boolean_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 43–62 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 43–64 | rest_validate_boolean_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) | 43–74 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 43–76 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 43–78 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 43–80 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 43–82 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
| always | 43–72 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error() |
| always | 43–74 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error() |
!is_wp_error() && empty($args) | 44–57 | rest_validate_null_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) | 44–59 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 44–59 | rest_validate_object_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 44–63 | rest_validate_object_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 44–65 | rest_validate_object_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 44–67 | rest_validate_object_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 44–61 | rest_validate_array_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 44–65 | rest_validate_array_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 44–67 | rest_validate_array_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 44–69 | rest_validate_array_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 44–63 | rest_validate_number_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 44–67 | rest_validate_number_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 44–69 | rest_validate_number_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 44–71 | rest_validate_number_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 44–65 | rest_validate_string_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 44–69 | rest_validate_string_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 44–71 | rest_validate_string_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 44–73 | rest_validate_string_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 44–67 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 44–71 | rest_validate_integer_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 44–73 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 44–75 | rest_validate_integer_value_from_schema(), is_wp_error(), wp_is_uuid() |
| always | 44–77 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error() |
| always | 44–79 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error() |
| always | 44–81 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error() |
$args | 44–71 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error() |
$args | 44–71 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error() |
!is_wp_error() && empty($args) | 45–62 | rest_validate_object_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) | 45–64 | rest_validate_array_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) | 45–66 | rest_validate_number_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) | 45–68 | rest_validate_string_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) | 45–70 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 45–69 | is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 45–73 | is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) | 46–72 | is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 48–72 | is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 48–76 | is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 48–78 | is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 48–80 | is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 49–79 | is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 49–81 | is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 49–75 | is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 50–61 | rest_validate_null_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 50–65 | rest_validate_null_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 50–63 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 50–67 | rest_validate_boolean_value_from_schema(), is_wp_error(), is_email(), __() |
$args && !is_wp_error() && !empty($args) | 50–75 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && empty($args) | 51–64 | rest_validate_null_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) | 51–66 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 51–66 | rest_validate_object_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 51–70 | rest_validate_object_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 51–68 | rest_validate_array_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 51–72 | rest_validate_array_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 51–70 | rest_validate_number_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 51–74 | rest_validate_number_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 51–72 | rest_validate_string_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 51–76 | rest_validate_string_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 51–74 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 51–78 | rest_validate_integer_value_from_schema(), is_wp_error(), is_email(), __() |
$args && !is_wp_error() && empty($args) && rest_parse_hex_color() | 51–60 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_parse_hex_color() |
$args && !is_wp_error() && empty($args) && is_email() | 51–64 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), is_email() |
$args && !is_wp_error() && empty($args) && rest_is_ip_address() | 51–66 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_is_ip_address() |
$args && !is_wp_error() && empty($args) && wp_is_uuid() | 51–68 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) | 52–69 | rest_validate_object_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) | 52–71 | rest_validate_array_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) | 52–73 | rest_validate_number_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) | 52–75 | rest_validate_string_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) | 52–77 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
$args && !is_wp_error() && empty($args) | 52–63 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_parse_date() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 53–64 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 53–68 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 53–70 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 53–72 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 53–66 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 53–70 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 53–72 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 53–74 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 54–71 | rest_validate_null_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 54–73 | rest_validate_null_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 54–67 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 54–73 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 54–75 | rest_validate_boolean_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 54–69 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 54–69 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 54–73 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 54–75 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 54–77 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 54–71 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 54–75 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 54–77 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 54–79 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 54–73 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 54–77 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 54–79 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 54–81 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 54–75 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 54–79 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 54–81 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 54–83 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 54–77 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 54–81 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 54–83 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 54–85 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 55–76 | rest_validate_object_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 55–78 | rest_validate_object_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 55–72 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 55–78 | rest_validate_array_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 55–80 | rest_validate_array_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 55–74 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 55–80 | rest_validate_number_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 55–82 | rest_validate_number_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 55–76 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 55–82 | rest_validate_string_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 55–84 | rest_validate_string_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 55–78 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 55–84 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 55–86 | rest_validate_integer_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 55–80 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 55–79 | is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 55–83 | is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) | 55–82 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 55–84 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 56–82 | is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 56–67 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 56–71 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 56–73 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 56–75 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 56–69 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 56–73 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 56–75 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 56–77 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) | 56–87 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 56–89 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && !empty($args) | 56–91 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
$args && !is_wp_error() && !empty($args) | 56–81 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
$args && !is_wp_error() && !empty($args) | 56–81 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error() |
!is_wp_error() && empty($args) | 57–70 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) | 57–72 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 57–72 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 57–76 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 57–78 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 57–80 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 57–74 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 57–78 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 57–80 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 57–82 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && rest_parse_hex_color() | 57–76 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && empty($args) && is_email() | 57–80 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), is_email() |
!is_wp_error() && empty($args) && rest_is_ip_address() | 57–82 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && empty($args) && wp_is_uuid() | 57–84 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), wp_is_uuid() |
$args && !is_wp_error() && empty($args) && rest_parse_hex_color() | 57–66 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
$args && !is_wp_error() && empty($args) && is_email() | 57–70 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), is_email() |
$args && !is_wp_error() && empty($args) && rest_is_ip_address() | 57–72 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_is_ip_address() |
$args && !is_wp_error() && empty($args) && wp_is_uuid() | 57–74 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), wp_is_uuid() |
$args && !is_wp_error() && empty($args) && rest_parse_hex_color() | 57–66 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_parse_hex_color() |
$args && !is_wp_error() && empty($args) && is_email() | 57–70 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), is_email() |
$args && !is_wp_error() && empty($args) && rest_is_ip_address() | 57–72 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_is_ip_address() |
$args && !is_wp_error() && empty($args) && wp_is_uuid() | 57–74 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) | 58–75 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) | 58–77 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) | 58–79 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_parse_date() |
$args && !is_wp_error() && empty($args) | 58–69 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_parse_date() |
$args && !is_wp_error() && empty($args) | 58–69 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_parse_date() |
$args && !is_wp_error() && empty($args) && !rest_parse_hex_color() | 58–67 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_parse_hex_color(), __() |
$args && !is_wp_error() && empty($args) && !is_email() | 58–71 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 59–89 | is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 59–91 | is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
$args && !is_wp_error() && empty($args) | 59–70 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 60–71 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 60–75 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 60–73 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 60–77 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) | 61–74 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) | 61–76 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 61–76 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 61–80 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 61–78 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 61–82 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 61–80 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 61–84 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 61–82 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 61–86 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 61–84 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 61–88 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
$args && !is_wp_error() && !empty($args) && rest_parse_hex_color() | 61–70 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
$args && !is_wp_error() && !empty($args) && is_email() | 61–74 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
$args && !is_wp_error() && !empty($args) && rest_is_ip_address() | 61–76 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
$args && !is_wp_error() && !empty($args) && wp_is_uuid() | 61–78 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) | 62–79 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) | 62–81 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) | 62–83 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) | 62–85 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) | 62–87 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
$args && !is_wp_error() && empty($args) && !rest_is_ip_address() | 62–77 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
$args && !is_wp_error() && empty($args) && !wp_is_uuid() | 62–79 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
$args && !is_wp_error() && !empty($args) | 62–73 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 63–74 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 63–78 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 63–76 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 63–80 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 64–81 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 64–83 | rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 64–83 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 64–85 | rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && empty($args) | 64–77 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) | 64–79 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 64–79 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 64–83 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 64–81 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 64–85 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && empty($args) && !rest_parse_hex_color() | 64–83 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && empty($args) && !is_email() | 64–87 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), is_email(), __() |
$args && !is_wp_error() && empty($args) && !rest_parse_hex_color() | 64–73 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
$args && !is_wp_error() && empty($args) && !is_email() | 64–77 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), is_email(), __() |
$args && !is_wp_error() && empty($args) && !rest_parse_hex_color() | 64–73 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_parse_hex_color(), __() |
$args && !is_wp_error() && empty($args) && !is_email() | 64–77 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 65–86 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 65–88 | rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 65–88 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 65–90 | rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 65–90 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 65–92 | rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 65–92 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 65–94 | rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 65–94 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 65–96 | rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && empty($args) | 65–82 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) | 65–84 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && empty($args) | 65–86 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
$args && !is_wp_error() && empty($args) | 65–76 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
$args && !is_wp_error() && empty($args) | 65–76 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 66–77 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 66–81 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 66–83 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 66–85 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 66–79 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 66–83 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 66–85 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 66–87 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 67–84 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 67–86 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 67–80 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 67–86 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 67–88 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 67–82 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 67–82 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 67–86 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 67–88 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 67–90 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 67–84 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 67–88 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 67–90 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 67–92 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && !empty($args) && rest_parse_hex_color() | 67–86 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
!is_wp_error() && !empty($args) && is_email() | 67–90 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
!is_wp_error() && !empty($args) && rest_is_ip_address() | 67–92 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
!is_wp_error() && !empty($args) && wp_is_uuid() | 67–94 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
$args && !is_wp_error() && !empty($args) && rest_parse_hex_color() | 67–76 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
$args && !is_wp_error() && !empty($args) && is_email() | 67–80 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
$args && !is_wp_error() && !empty($args) && rest_is_ip_address() | 67–82 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
$args && !is_wp_error() && !empty($args) && wp_is_uuid() | 67–84 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
$args && !is_wp_error() && !empty($args) && rest_parse_hex_color() | 67–76 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color() |
$args && !is_wp_error() && !empty($args) && is_email() | 67–80 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email() |
$args && !is_wp_error() && !empty($args) && rest_is_ip_address() | 67–82 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address() |
$args && !is_wp_error() && !empty($args) && wp_is_uuid() | 67–84 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 68–89 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 68–91 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 68–85 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 68–91 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 68–93 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 68–87 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
!is_wp_error() && empty($args) && !rest_is_ip_address() | 68–93 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && empty($args) && !wp_is_uuid() | 68–95 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) | 68–89 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
$args && !is_wp_error() && empty($args) && !rest_is_ip_address() | 68–83 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
$args && !is_wp_error() && empty($args) && !wp_is_uuid() | 68–85 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
$args && !is_wp_error() && !empty($args) | 68–79 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
$args && !is_wp_error() && empty($args) && !rest_is_ip_address() | 68–83 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
$args && !is_wp_error() && empty($args) && !wp_is_uuid() | 68–85 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
$args && !is_wp_error() && !empty($args) | 68–79 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date() |
$args && !is_wp_error() && !empty($args) && !rest_parse_hex_color() | 68–77 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
$args && !is_wp_error() && !empty($args) && !is_email() | 68–81 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
$args && !is_wp_error() && !empty($args) | 69–80 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
$args && !is_wp_error() && !empty($args) && !rest_is_ip_address() | 72–87 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
$args && !is_wp_error() && !empty($args) && !wp_is_uuid() | 72–89 | __(), wp_sprintf(), _doing_it_wrong(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 73–84 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 73–88 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 73–86 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 73–90 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) | 74–87 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) | 74–89 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 74–89 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 74–93 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 74–91 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 74–95 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) && !rest_parse_hex_color() | 74–93 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
!is_wp_error() && !empty($args) && !is_email() | 74–97 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
$args && !is_wp_error() && !empty($args) && !rest_parse_hex_color() | 74–83 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
$args && !is_wp_error() && !empty($args) && !is_email() | 74–87 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
$args && !is_wp_error() && !empty($args) && !rest_parse_hex_color() | 74–83 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_hex_color(), __() |
$args && !is_wp_error() && !empty($args) && !is_email() | 74–87 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), is_email(), __() |
!is_wp_error() && !empty($args) | 75–92 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) | 75–94 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) | 75–96 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
$args && !is_wp_error() && !empty($args) | 75–86 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
$args && !is_wp_error() && !empty($args) | 75–86 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_parse_date(), __() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 77–94 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 77–96 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_null_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 77–96 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 77–98 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_boolean_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 78–99 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 78–101 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_object_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 78–101 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 78–103 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_array_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_is_ip_address() | 78–103 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
!is_wp_error() && !empty($args) && !wp_is_uuid() | 78–105 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_number_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
$args && !is_wp_error() && !empty($args) && !rest_is_ip_address() | 78–93 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
$args && !is_wp_error() && !empty($args) && !wp_is_uuid() | 78–95 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_string_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
$args && !is_wp_error() && !empty($args) && !rest_is_ip_address() | 78–93 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), rest_is_ip_address(), __(), sprintf() |
$args && !is_wp_error() && !empty($args) && !wp_is_uuid() | 78–95 | __(), wp_sprintf(), _doing_it_wrong(), rest_validate_integer_value_from_schema(), is_wp_error(), rest_validate_enum(), is_wp_error(), wp_is_uuid(), __(), sprintf() |
This body has more branch combinations than are worth enumerating, so the table covers the outcomes found first rather than every one that exists.
Across PHP versions
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 287 | 25–105 | 38 | |
| 8.5 | 287 | 25–105 | 38 | |
| 8.4 | 287 | 25–105 | 38 | 6 fewer instructions than PHP 8.3 |
| 8.3 | 293 | 25–108 | 38 | |
| 8.2 | 293 | 25–108 | 38 | 2 more instructions than PHP 8.1 |
| 8.1 | 291 | 25–99 | 38 | |
| 7.4 | 291 | 25–99 | 38 |
An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.
Uses · 21
- rest_find_any_matching_schema()Finds the matching schema among the "anyOf" schemas.
- is_wp_error()Checks whether the given variable is a WordPress Error.
- rest_find_one_matching_schema()Finds the matching schema among the "oneOf" schemas.
- _doing_it_wrong()Marks something as being incorrectly called.
- __()Retrieves the translation of $text.
- rest_handle_multi_type_schema()Handles getting the best type for a multi-type schema.
- wp_sprintf()WordPress' implementation of PHP sprintf() with filters.
- rest_validate_null_value_from_schema()Validates a null value based on a schema.
- rest_validate_boolean_value_from_schema()Validates a boolean value based on a schema.
- rest_validate_object_value_from_schema()Validates an object value based on a schema.
- rest_validate_array_value_from_schema()Validates an array value based on a schema.
- rest_validate_number_value_from_schema()Validates a number value based on a schema.
Show all 21
- rest_validate_string_value_from_schema()Validates a string value based on a schema.
- rest_validate_integer_value_from_schema()Validates an integer value based on a schema.
- rest_validate_enum()Validates that the given value is a member of the JSON Schema "enum".
- rest_parse_hex_color()Parses a 3 or 6 digit hex color (with #).
- rest_parse_date()Parses an RFC3339 time into a Unix timestamp.
- is_email()Verifies that an email is valid.
- rest_is_ip_address()Determines if an IP address is valid.
- wp_is_uuid()Validates that a UUID is valid.
- WP_Error::__construct()Initializes the error.
Used by · 19
- WP_Ability::validate_input()Validates input data against the input schema.
- WP_Ability::validate_output()Validates output data against the output schema.
- WP_Block_Type::prepare_attributes_for_render()Validates attributes against the current block schema, populating defaulted and missing values.
- WP_REST_Block_Renderer_Controller::register_routes()Registers the necessary REST API routes, one for each dynamic block.
- WP_REST_Font_Faces_Controller::validate_create_font_face_settings()Validates settings when creating a font face.
- WP_REST_Font_Families_Controller::validate_font_family_settings()Validates settings when creating or updating a font family.
- WP_REST_Meta_Fields::prepare_value()Prepares a meta value for output.
- WP_REST_Meta_Fields::update_value()Updates meta values.
- WP_REST_Posts_Controller::check_status()Checks whether the status is valid for the given post.
- WP_REST_Settings_Controller::prepare_value()Prepares a value for output based off a schema array.
- WP_REST_Settings_Controller::update_item()Updates settings for the settings object.
- WP_REST_Sidebars_Controller::prepare_item_for_response()Prepares a single sidebar output for response.
Show all 19
- WP_Widget_Media::update()Sanitizes the widget form values as they are saved.
- register_meta()Registers a meta key.
- rest_find_any_matching_schema()Finds the matching schema among the "anyOf" schemas.
- rest_find_one_matching_schema()Finds the matching schema among the "oneOf" schemas.
- rest_validate_array_value_from_schema()Validates an array value based on a schema.
- rest_validate_object_value_from_schema()Validates an object value based on a schema.
- rest_validate_request_arg()Validate a request argument based on details registered to the route.
Source code
function rest_validate_value_from_schema( $value, $args, $param = '' ) { if ( isset( $args['anyOf'] ) ) { $matching_schema = rest_find_any_matching_schema( $value, $args, $param ); if ( is_wp_error( $matching_schema ) ) { return $matching_schema; } if ( ! isset( $args['type'] ) && isset( $matching_schema['type'] ) ) { $args['type'] = $matching_schema['type']; } } if ( isset( $args['oneOf'] ) ) { $matching_schema = rest_find_one_matching_schema( $value, $args, $param ); if ( is_wp_error( $matching_schema ) ) { return $matching_schema; } if ( ! isset( $args['type'] ) && isset( $matching_schema['type'] ) ) { $args['type'] = $matching_schema['type']; } } $allowed_types = array( 'array', 'object', 'string', 'number', 'integer', 'boolean', 'null' ); if ( ! isset( $args['type'] ) ) { /* translators: %s: Parameter. */ _doing_it_wrong( __FUNCTION__, sprintf( __( 'The "type" schema keyword for %s is required.' ), $param ), '5.5.0' ); } if ( is_array( $args['type'] ) ) { $best_type = rest_handle_multi_type_schema( $value, $args, $param ); if ( ! $best_type ) { return new WP_Error( 'rest_invalid_type', /* translators: 1: Parameter, 2: List of types. */ sprintf( __( '%1$s is not of type %2$s.' ), $param, implode( ',', $args['type'] ) ), array( 'param' => $param ) ); } $args['type'] = $best_type; } if ( ! in_array( $args['type'], $allowed_types, true ) ) { _doing_it_wrong( __FUNCTION__, /* translators: 1: Parameter, 2: The list of allowed types. */ wp_sprintf( __( 'The "type" schema keyword for %1$s can only be one of the built-in types: %2$l.' ), $param, $allowed_types ), '5.5.0' ); } switch ( $args['type'] ) { case 'null': $is_valid = rest_validate_null_value_from_schema( $value, $param ); break; case 'boolean': $is_valid = rest_validate_boolean_value_from_schema( $value, $param ); break; case 'object': $is_valid = rest_validate_object_value_from_schema( $value, $args, $param ); break; case 'array': $is_valid = rest_validate_array_value_from_schema( $value, $args, $param ); break; case 'number': $is_valid = rest_validate_number_value_from_schema( $value, $args, $param ); break; case 'string': $is_valid = rest_validate_string_value_from_schema( $value, $args, $param ); break; case 'integer': $is_valid = rest_validate_integer_value_from_schema( $value, $args, $param ); break; default: $is_valid = true; break; }Changelog
Introduced in 4.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
Support the "multipleOf" keyword for numbers and integers.
Support the "patternProperties" keyword for objects.
Support the "anyOf" and "oneOf" keywords.from the docblock
Support the "minLength", "maxLength" and "pattern" keywords for strings.
Support the "minItems", "maxItems" and "uniqueItems" keywords for arrays.
Validate required properties.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/rest-api.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.