wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



rest_is_integer › WordPress Function

Depuis5.5.0
Dépréciéen/a
rest_is_integer ( $maybe_integer )
Paramètres:
  • (mixed) $maybe_integer The value being evaluated.
    Requis: Oui
Retourne:
  • (bool) True if an integer, otherwise false.
Défini(e) dans:
Codex:

Determines if a given value is integer-like.



Source

function rest_is_integer( $maybe_integer ) {
	return is_numeric( $maybe_integer ) && round( (float) $maybe_integer ) === (float) $maybe_integer;
}