WP_Customize_Nav_Menus::intval_base10() WordPress Method

The intval_base10() method is used in the WordPress Customize Nav Menus class to convert a string value to an integer in base 10. This is useful for sanitizing data before it is stored in the database.

WP_Customize_Nav_Menus::intval_base10( mixed $value ) #

Gets the base10 intval.


Description

This is used as a setting’s sanitize_callback; we can’t use just plain intval because the second argument is not what intval() expects.


Top ↑

Parameters

$value

(mixed)(Required)Number to convert.


Top ↑

Return

(int) Integer.


Top ↑

Source

File: wp-includes/class-wp-customize-nav-menus.php

	public function intval_base10( $value ) {
		return intval( $value, 10 );
	}

Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.