rest_sanitize_value_from_schema( mixed $value, array $args, string $param = '' ): mixed|WP_Error
- Since
- 4.7.0, 5.5.0, 5.6.0, 5.9.0
- Source
wp-includes/rest-api.php:2819
Compatibility
- WordPress
- since 5.9.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 sanitize.
$argsarray- Schema array to use for sanitization.
$paramstringoptional- The parameter name, used in error messages.Default:
''
Return value
mixed|WP_Error- The sanitized value or a WP_Error instance if the value cannot be safely sanitized.
Performance profile
How much work a call to rest_sanitize_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
- Light
- Scaling
- Scales with input
- Instructions
- 18–143
- Plugin surface
- None
- Called by
- 12
Touches nothing outside its own arguments.
The body loops, so the work grows with what you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 309.
Nothing here hands control to plugin code.
12 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_sanitize_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 · 322 distinct outcomes
One number would be a lie: the work depends on which branch runs. These are every distinct cost rest_sanitize_value_from_schema() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
is_wp_error() | 18 | rest_find_one_matching_schema(), is_wp_error() |
| always | 21–79 | rest_handle_multi_type_schema() |
| always | 26–70 | none |
empty($args) | 28–31 | rest_sanitize_array() |
| always | 29–30 | rest_sanitize_object() |
!empty($args) && rest_validate_array_contains_unique_items() | 32–35 | rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!isset($args) | 33–91 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema() |
isset($args) | 36 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error() |
empty($args) | 37–40 | rest_handle_multi_type_schema(), rest_sanitize_array() |
| always | 38 | rest_sanitize_boolean() |
| always | 38–39 | rest_handle_multi_type_schema(), rest_sanitize_object() |
!isset($args) | 38–82 | __(), sprintf(), _doing_it_wrong() |
310 further outcomes, up to 128 instructions
| always | 39–83 | __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 39–100 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema() |
!is_wp_error() | 39–97 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema() |
!isset($args) && empty($args) | 40–43 | __(), sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!empty($args) && rest_validate_array_contains_unique_items() | 41–44 | rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
empty($args) | 41–44 | __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!isset($args) | 41–42 | __(), sprintf(), _doing_it_wrong(), rest_sanitize_object() |
| always | 42–43 | __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!empty($args) && !rest_validate_array_contains_unique_items() | 43–46 | rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 44–91 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema() |
!is_wp_error() | 44–91 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema() |
!isset($args) && !empty($args) && rest_validate_array_contains_unique_items() | 44–47 | __(), sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
| always | 45–66 | sanitize_text_field() |
| always | 45–60 | sanitize_url() |
| always | 45–68 | sanitize_textarea_field() |
!empty($args) && rest_validate_array_contains_unique_items() | 45–48 | __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
| always | 46–55 | sanitize_hex_color() |
!is_wp_error() && empty($args) | 46–52 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array() |
!is_wp_error() && empty($args) | 46–52 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array() |
| always | 47 | rest_handle_multi_type_schema(), rest_sanitize_boolean() |
!is_wp_error() | 47–51 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_object() |
!is_wp_error() | 47–51 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_object() |
| always | 48–92 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!isset($args) && empty($args) | 49–52 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array() |
!isset($args) | 50 | __(), sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
empty($args) | 50–53 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!isset($args) | 50–51 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_object() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 50–56 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 50–56 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
| always | 51 | __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
| always | 51–52 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!isset($args) | 51–95 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 51–112 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema() |
!is_wp_error() | 51–109 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema() |
!empty($args) && !rest_validate_array_contains_unique_items() | 52–55 | rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!isset($args) && !empty($args) && rest_validate_array_contains_unique_items() | 53–56 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!isset($args) && empty($args) | 53–56 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
| always | 54–75 | rest_handle_multi_type_schema(), sanitize_text_field() |
| always | 54–69 | rest_handle_multi_type_schema(), sanitize_url() |
| always | 54–77 | rest_handle_multi_type_schema(), sanitize_textarea_field() |
!empty($args) && rest_validate_array_contains_unique_items() | 54–57 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!isset($args) | 54–55 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
| always | 55–64 | rest_handle_multi_type_schema(), sanitize_hex_color() |
!is_wp_error() && empty($args) | 55–61 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array() |
!is_wp_error() && empty($args) | 55–58 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array() |
!isset($args) && !empty($args) && !rest_validate_array_contains_unique_items() | 55–58 | __(), sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 56–59 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_boolean() |
!is_wp_error() | 56–59 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_boolean() |
!is_wp_error() | 56–60 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_object() |
!is_wp_error() | 56–57 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_object() |
!is_wp_error() | 56–103 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong() |
!is_wp_error() | 56–100 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong() |
!empty($args) && !rest_validate_array_contains_unique_items() | 56–59 | __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
| always | 57–78 | __(), sprintf(), _doing_it_wrong(), sanitize_text_field() |
| always | 57–72 | __(), sprintf(), _doing_it_wrong(), sanitize_url() |
| always | 57–80 | __(), sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 57–104 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 57–104 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong() |
isset($args) && !is_wp_error() | 57–118 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema() |
!isset($args) && !empty($args) && rest_validate_array_contains_unique_items() | 57–60 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
| always | 58–79 | __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
| always | 58–73 | __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
| always | 58–81 | __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
| always | 58–67 | __(), sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() && empty($args) | 58–64 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() && empty($args) | 58–61 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array() |
| always | 59–68 | __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!isset($args) | 59 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_boolean() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 59–65 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 59–62 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && empty($args) | 59–65 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 59–63 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() && empty($args) | 59–65 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 59–60 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_object() |
| always | 60 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!isset($args) | 60–104 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 60–64 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() | 60–64 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 61–67 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 61–67 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
isset($args) && !is_wp_error() | 62–109 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema() |
!isset($args) && empty($args) | 62–65 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 62–68 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 62–65 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() | 63–87 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_text_field() |
!is_wp_error() | 63–81 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_url() |
!is_wp_error() | 63–89 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_textarea_field() |
!is_wp_error() | 63–87 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_text_field() |
!is_wp_error() | 63–81 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_url() |
!is_wp_error() | 63–89 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_textarea_field() |
!isset($args) | 63 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!isset($args) | 63–64 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 63–69 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 63–69 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() | 64–76 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_hex_color() |
!is_wp_error() | 64–76 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_hex_color() |
isset($args) && !is_wp_error() && empty($args) | 64–70 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array() |
!isset($args) && !empty($args) && !rest_validate_array_contains_unique_items() | 64–67 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 65–68 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_boolean() |
!is_wp_error() | 65 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_boolean() |
isset($args) && !is_wp_error() | 65–69 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_object() |
!empty($args) && !rest_validate_array_contains_unique_items() | 65–68 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
| always | 66–87 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_text_field() |
| always | 66–81 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_url() |
| always | 66–89 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_textarea_field() |
!is_wp_error() | 66–113 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 66–110 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!isset($args) && !empty($args) && rest_validate_array_contains_unique_items() | 66–69 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
| always | 67–88 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
| always | 67–82 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
| always | 67–90 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
| always | 67–76 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_hex_color() |
!is_wp_error() && empty($args) | 67–73 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array() |
!is_wp_error() && empty($args) | 67–70 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array() |
| always | 68–77 | rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 68–71 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 68 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() && empty($args) | 68–74 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 68–72 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_object() |
!is_wp_error() && empty($args) | 68–71 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 68–69 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_object() |
isset($args) && !is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 68–74 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!isset($args) && !empty($args) && !rest_validate_array_contains_unique_items() | 68–71 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 69–72 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 69–72 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 69–73 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() | 69–70 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() | 69–116 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 69–113 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 69–130 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema() |
| always | 70–91 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
| always | 70–85 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
| always | 70–93 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 70–76 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 70–73 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
| always | 71–80 | __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 71–77 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 71–74 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && empty($args) | 71–77 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() && empty($args) | 71–74 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 72–96 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_text_field() |
!is_wp_error() | 72–90 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_url() |
!is_wp_error() | 72–98 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_textarea_field() |
!is_wp_error() | 72–93 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_text_field() |
!is_wp_error() | 72–87 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_url() |
!is_wp_error() | 72–95 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_textarea_field() |
!isset($args) | 72 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 72–78 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 72–75 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() | 72–76 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() | 72–73 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() | 73–85 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_hex_color() |
!is_wp_error() | 73–82 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_hex_color() |
isset($args) && !is_wp_error() && empty($args) | 73–79 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 73–79 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 73–76 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
isset($args) && !is_wp_error() | 74–77 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_boolean() |
isset($args) && !is_wp_error() | 74–78 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_object() |
!is_wp_error() | 74–121 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 74–80 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 74–80 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 75–99 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 75–93 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 75–101 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 75–96 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 75–90 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 75–98 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
isset($args) && !is_wp_error() | 75–122 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 75–81 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 75–78 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() | 76–100 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 76–94 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 76–102 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 76–88 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 76–100 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 76–94 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 76–102 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 76–85 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() && empty($args) | 76–82 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 77–89 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 77–89 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 77–80 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_boolean() |
!is_wp_error() | 77 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_boolean() |
isset($args) && !is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 77–83 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
isset($args) && !is_wp_error() && empty($args) | 77–83 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 77–81 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!isset($args) && !empty($args) && !rest_validate_array_contains_unique_items() | 77–80 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 78–81 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 78 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 78–125 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 78–122 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong() |
isset($args) && !is_wp_error() | 78–82 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
| always | 79–100 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
| always | 79–94 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
| always | 79–102 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
isset($args) && !is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 79–85 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
| always | 80–89 | __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() && empty($args) | 80–86 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() && empty($args) | 80–83 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 80–86 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
isset($args) && !is_wp_error() | 81–105 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_text_field() |
isset($args) && !is_wp_error() | 81–99 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_url() |
isset($args) && !is_wp_error() | 81–107 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_textarea_field() |
!is_wp_error() | 81–84 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 81 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 81–85 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() | 81–82 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
isset($args) && !is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 81–87 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
isset($args) && !is_wp_error() | 82–94 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), sanitize_hex_color() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 82–88 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 82–85 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
isset($args) && !is_wp_error() | 83–86 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_boolean() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 83–89 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 83–86 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 84–108 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_text_field() |
!is_wp_error() | 84–102 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_url() |
!is_wp_error() | 84–110 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_textarea_field() |
!is_wp_error() | 84–105 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_text_field() |
!is_wp_error() | 84–99 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_url() |
!is_wp_error() | 84–107 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_textarea_field() |
isset($args) && !is_wp_error() | 84–131 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 84–90 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 84–87 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() | 85–109 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 85–103 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 85–111 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 85–97 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_hex_color() |
!is_wp_error() | 85–106 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 85–100 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 85–108 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 85–94 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_hex_color() |
!is_wp_error() && empty($args) | 85–91 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array() |
!is_wp_error() | 86–98 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 86–95 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 86–89 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
isset($args) && !is_wp_error() && empty($args) | 86–92 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 86–90 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_object() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 86–92 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 86–89 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
isset($args) && !is_wp_error() | 87–90 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
isset($args) && !is_wp_error() | 87–91 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() | 87–134 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 88–112 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 88–106 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 88–114 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 88–109 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 88–103 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 88–111 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
isset($args) && !is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 88–94 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 89–101 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 89–98 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 89–95 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() && empty($args) | 89–95 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
isset($args) && !is_wp_error() | 90–114 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_text_field() |
isset($args) && !is_wp_error() | 90–108 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_url() |
isset($args) && !is_wp_error() | 90–116 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_textarea_field() |
!is_wp_error() | 90–93 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 90 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
isset($args) && !is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 90–96 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
!is_wp_error() | 90–94 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
isset($args) && !is_wp_error() | 91–103 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), sanitize_hex_color() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 91–97 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
isset($args) && !is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 92–98 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 93–117 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 93–111 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 93–119 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 93–99 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
isset($args) && !is_wp_error() | 94–118 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
isset($args) && !is_wp_error() | 94–112 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
isset($args) && !is_wp_error() | 94–120 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 94–106 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), sanitize_hex_color() |
isset($args) && !is_wp_error() | 95–107 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 95–98 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_boolean() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 95–101 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 95–98 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
isset($args) && !is_wp_error() | 96–99 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 96–143 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong() |
!is_wp_error() | 97–121 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 97–115 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 97–123 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 97–118 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 97–112 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 97–120 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 98–110 | rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 98–107 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() && empty($args) | 98–104 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array() |
!is_wp_error() | 99–102 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() | 99–103 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_object() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 100–106 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
isset($args) && !is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 101–107 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 102–126 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_text_field() |
!is_wp_error() | 102–120 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_url() |
!is_wp_error() | 102–128 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_textarea_field() |
!is_wp_error() && !empty($args) && rest_validate_array_contains_unique_items() | 102–108 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items() |
isset($args) && !is_wp_error() | 103–127 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
isset($args) && !is_wp_error() | 103–121 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
isset($args) && !is_wp_error() | 103–129 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 103–115 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), sanitize_hex_color() |
isset($args) && !is_wp_error() | 104–116 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 104–110 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 106–130 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 106–124 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 106–132 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 107–119 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
!is_wp_error() | 108–111 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_boolean() |
!is_wp_error() && !empty($args) && !rest_validate_array_contains_unique_items() | 113–119 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), rest_sanitize_array(), rest_validate_array_contains_unique_items(), __(), sprintf() |
!is_wp_error() | 115–139 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_text_field() |
!is_wp_error() | 115–133 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_url() |
!is_wp_error() | 115–141 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_textarea_field() |
!is_wp_error() | 116–128 | rest_find_any_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), rest_find_one_matching_schema(), is_wp_error(), rest_sanitize_value_from_schema(), __(), sprintf(), _doing_it_wrong(), rest_handle_multi_type_schema(), __(), wp_sprintf(), _doing_it_wrong(), sanitize_hex_color() |
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 | 309 | 18–143 | 42 | |
| 8.5 | 309 | 18–143 | 42 | |
| 8.4 | 309 | 18–143 | 42 | 3 fewer instructions than PHP 8.3 |
| 8.3 | 312 | 18–146 | 42 | |
| 8.2 | 312 | 18–146 | 42 | 1 more instruction than PHP 8.1 |
| 8.1 | 311 | 18–145 | 42 | |
| 7.4 | 311 | 18–145 | 42 |
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 · 18
- 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_sanitize_value_from_schema()Sanitize a value based on a schema.
- 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_sanitize_array()Converts an array-like value to an array.
- rest_validate_array_contains_unique_items()Checks if an array is made up of unique items.
- rest_sanitize_object()Converts an object-like value to an array.
- rest_find_matching_pattern_property_schema()Finds the schema for a property using the patternProperties keyword.
Show all 18
- rest_sanitize_boolean()Changes a boolean-like value into the proper boolean value.
- sanitize_hex_color()Sanitizes a hex color.
- sanitize_text_field()Sanitizes a string from user input or from the database.
- sanitize_url()Sanitizes a URL for database or redirect usage.
- sanitize_textarea_field()Sanitizes a multiline string from user input or from the database.
- WP_Error::__construct()Initializes the error.
Used by · 12
- WP_REST_Abilities_V1_Run_Controller::coerce_input_to_schema()Coerces raw request input to the types declared in the ability input schema.
- WP_REST_Block_Renderer_Controller::register_routes()Registers the necessary REST API routes, one for each dynamic block.
- WP_REST_Block_Types_Controller::prepare_item_for_response()Prepares a block type object for serialization.
- WP_REST_Meta_Fields::prepare_value()Prepares a meta value for output.
- WP_REST_Meta_Fields::update_value()Updates meta values.
- WP_REST_Settings_Controller::prepare_value()Prepares a value for output based off a schema array.
- WP_REST_Themes_Controller::prepare_theme_support()Prepares the theme support value for inclusion in the REST API response.
- WP_REST_Widget_Types_Controller::prepare_item_for_response()Prepares a widget type object for serialization.
- WP_Widget_Media::update()Sanitizes the widget form values as they are saved.
- rest_sanitize_request_arg()Sanitize a request argument based on details registered to the route.
- rest_sanitize_value_from_schema()Sanitize a value based on a schema.
- rest_validate_enum()Validates that the given value is a member of the JSON Schema "enum".
Source code
function rest_sanitize_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'] ) ) { $args['type'] = $matching_schema['type']; } $value = rest_sanitize_value_from_schema( $value, $matching_schema, $param ); } 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'] ) ) { $args['type'] = $matching_schema['type']; } $value = rest_sanitize_value_from_schema( $value, $matching_schema, $param ); } $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 null; } $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' ); } if ( 'array' === $args['type'] ) { $value = rest_sanitize_array( $value ); if ( ! empty( $args['items'] ) ) { foreach ( $value as $index => $v ) { $value[ $index ] = rest_sanitize_value_from_schema( $v, $args['items'], $param . '[' . $index . ']' ); } } if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) { /* translators: %s: Parameter. */ return new WP_Error( 'rest_duplicate_items', sprintf( __( '%s has duplicate items.' ), $param ) ); } return $value; } if ( 'object' === $args['type'] ) { $value = rest_sanitize_object( $value ); foreach ( $value as $property => $v ) { if ( isset( $args['properties'][ $property ] ) ) { $value[ $property ] = rest_sanitize_value_from_schema( $v, $args['properties'][ $property ], $param . '[' . $property . ']' ); continue; } $pattern_property_schema = rest_find_matching_pattern_property_schema( $property, $args );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.
text-field and textarea-field formats.from the docblock$param parameter.from the docblockAbout 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.