From ab511830e6b31e2b04a350878b65eb57d7c6b539 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 20 May 2009 16:08:35 +0000 Subject: [PATCH] Add number_format_i18n filter. Props kambiz.k. fixes #7753 git-svn-id: https://develop.svn.wordpress.org/trunk@11407 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 34a127a5b1..b12bd80b91 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -140,7 +140,10 @@ function number_format_i18n( $number, $decimals = null ) { // let the user override the precision only $decimals = ( is_null( $decimals ) ) ? $wp_locale->number_format['decimals'] : intval( $decimals ); - return number_format( $number, $decimals, $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] ); + $num = number_format( $number, $decimals, $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] ); + + // let the user translate digits from latin to localized language + return apply_filters( 'number_format_i18n', $num ); } /**