rest_is_array()
Determines if a given value is array-like.
No Hooks.
Returns
true|false.
Usage
rest_is_array( $maybe_array );
- $maybe_array(mixed) (required)
- The value being evaluated.
Changelog
| Since 5.5.0 | Introduced. |
rest_is_array() rest is array code WP 7.0
function rest_is_array( $maybe_array ) {
if ( is_scalar( $maybe_array ) ) {
$maybe_array = wp_parse_list( $maybe_array );
}
return wp_is_numeric_array( $maybe_array );
}