WordPress.org

Make WordPress Core

Ticket #11226: 11226.diff

File 11226.diff, 1.1 KB (added by Denis-de-Bernardy, 9 years ago)
  • wp-includes/functions.php

     
    8181 * @param string $dateformatstring Format to display the date.
    8282 * @param int $unixtimestamp Optional. Unix timestamp.
    8383 * @param bool $gmt Optional, default is false. Whether to convert to GMT for time.
     84 * @param string $context Optional, the date's context for languages with untypical grammars
    8485 * @return string The date, translated if locale specifies it.
    8586 */
    86 function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
     87function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false, $context = '' ) {
    8788        global $wp_locale;
    8889        $i = $unixtimestamp;
    8990        // Sanity check for PHP 5.1.0-
     
    122123        }
    123124        $j = @$datefunc( $dateformatstring, $i );
    124125        // allow plugins to redo this entirely for languages with untypical grammars
    125         $j = apply_filters('date_i18n', $j, $req_format, $i, $gmt);
     126        $j = apply_filters('date_i18n', $j, $req_format, $i, $gmt, $context);
    126127        return $j;
    127128}
    128129