number_format_i18n WordPress Filter Hook

The number_format_i18n hook is used to format a number with the correct number of decimal places and thousands separators for the current language.

apply_filters( 'number_format_i18n', string $formatted, float $number, int $decimals ) #

Filters the number formatted based on the locale.


Parameters

$formatted

(string)Converted number in string format.

$number

(float)The number to convert based on locale.

$decimals

(int)Precision of the number of decimal places.


Top ↑

Source

File: wp-includes/functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.9.0The $number and $decimals parameters were added.
2.8.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.

Show More
Show More