Make WordPress Core

Changeset 41199


Ignore:
Timestamp:
08/01/2017 02:37:39 PM (7 years ago)
Author:
johnbillion
Message:

Formatting: Add the $number and $decimals arguments to the number_format_i18n filter.

Props alpipego

Fixes #41505

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r41167 r41199  
    227227     * Filters the number formatted based on the locale.
    228228     *
    229      * @since  2.8.0
     229     * @since 2.8.0
     230     * @since 4.9.0 The `$number` and `$decimals` arguments were added.
    230231     *
    231232     * @param string $formatted Converted number in string format.
     233     * @param float  $number    The number to convert based on locale.
     234     * @param int    $decimals  Precision of the number of decimal places.
    232235     */
    233     return apply_filters( 'number_format_i18n', $formatted );
     236    return apply_filters( 'number_format_i18n', $formatted, $number, $decimals );
    234237}
    235238
Note: See TracChangeset for help on using the changeset viewer.