From be97d71a94b239eb0e256c16c4f3a0e77cf66d16 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 1 Aug 2017 14:37:39 +0000 Subject: [PATCH] Formatting: Add the `$number` and `$decimals` arguments to the `number_format_i18n` filter. Props alpipego Fixes #41505 git-svn-id: https://develop.svn.wordpress.org/trunk@41199 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index f5d7d8158c..ffb09f22d6 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -226,11 +226,14 @@ function number_format_i18n( $number, $decimals = 0 ) { /** * Filters the number formatted based on the locale. * - * @since 2.8.0 + * @since 2.8.0 + * @since 4.9.0 The `$number` and `$decimals` arguments were added. * * @param string $formatted Converted number in string format. + * @param float $number The number to convert based on locale. + * @param int $decimals Precision of the number of decimal places. */ - return apply_filters( 'number_format_i18n', $formatted ); + return apply_filters( 'number_format_i18n', $formatted, $number, $decimals ); } /**