number_format_i18n filter-hook . WP 2.8.0
Filters the number formatted based on the locale.
Usage
add_filter( 'number_format_i18n', 'filter_function_name_7569', 10, 3 ); function filter_function_name_7569( $formatted, $number, $decimals ){ // filter... return $formatted; }
- $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.
Changelog
Since 2.8.0 | Introduced. |
Since 4.9.0 | The $number and $decimals parameters were added. |
Where the hook is called
number_format_i18n
wp-includes/functions.php 427
return apply_filters( 'number_format_i18n', $formatted, $number, $decimals );