Used By
Used By | Description |
---|---|
wp-includes/rest-api.php: rest_validate_value_from_schema() | Validate a value based on a schema. |
Determines if a given value is integer-like.
(mixed) (Required) The value being evaluated.
(bool) True if an integer, otherwise false.
File: wp-includes/rest-api.php
function rest_is_integer( $maybe_integer ) { return is_numeric( $maybe_integer ) && round( floatval( $maybe_integer ) ) === floatval( $maybe_integer ); }
Version | Description |
---|---|
5.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/rest_is_integer