WordPress.org

Make WordPress Core

Ticket #9396: 9396.diff

File 9396.diff, 951 bytes (added by Denis-de-Bernardy, 12 years ago)
  • Users/denis/Sites/sem-pro/wp-includes/functions.php

     
    9696                // specially computed timestamp
    9797                $gmt = true;
    9898        }
    99 
     99       
     100        // store original value for language with untypical grammars
     101        // see http://core.trac.wordpress.org/ticket/9396
     102        $req_format = $dateformatstring;
     103       
    100104        $datefunc = $gmt? 'gmdate' : 'date';
    101105
    102106        if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) {
     
    117121                $dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );
    118122        }
    119123        $j = @$datefunc( $dateformatstring, $i );
     124        // allow plugins to redo this entirely for languages with untypical grammars
     125        $j = apply_filters('date_i18n', $j, $req_format, $unixtimestamp, $gmt);
    120126        return $j;
    121127}
    122128