• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Yoast SEO a2z

Yoast SEO a2z

WordPress SEO a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / WPSEO_Validator::is_integer() – Validates whether the passed variable is an integer.

You appear to be a bot. Output may be restricted

Description

Validates whether the passed variable is an integer.

Usage

$bool = WPSEO_Validator::is_integer( $variable );

Parameters

$variable
( mixed ) required – The variable to validate.

Returns

bool Whether or not the passed variable is an integer.

Source

File name: wordpress-seo/inc/class-wpseo-validator.php


Lines:

1 to 4 of 4
  public static function is_integer( $variable ) {
    return filter_var( $variable, FILTER_VALIDATE_INT ) || filter_var( $variable, FILTER_VALIDATE_INT ) === 0;
  }
 

 View on GitHub View on Trac

Published: 27th November 2019 | Last updated: 27th November 2019

Primary Sidebar

Information

Function name: WPSEO_Validator::is_integer
Class ref: WPSEO_Validator
Plugin ref: Yoast SEO
Version: 15.4
Sourcefile: inc/class-wpseo-validator.php
File ref: inc/class-wpseo-validator.php
Deprecated?: No
API Letters: I,V,W

Footer

Yoast SEO a2z
Yoast SEO a2z
WordPress SEO a2z
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wordpress-seo.wp-a2z.org
© Copyright Yoast SEO a2z 2017-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites