Make WordPress Core

Ticket #27181: 27181.3.patch

File 27181.3.patch, 925 bytes (added by TobiasBg, 8 years ago)
  • src/wp-includes/general-template.php

    diff --git src/wp-includes/general-template.php src/wp-includes/general-template.php
    index cb61c58..b5f2b5b 100644
    function the_date( $d = '', $before = '', $after = '', $echo = true ) { 
    14281428 * @since 3.0.0
    14291429 *
    14301430 * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
    1431  * @return string|null Null if displaying, string if retrieving.
     1431 * @return string Date the current $post was written.
    14321432 */
    14331433function get_the_date( $d = '' ) {
    14341434        $post = get_post();
    14351435
    1436         if ( '' == $d )
    1437                 $the_date = mysql2date( get_option( 'date_format' ), $post->post_date );
    1438         else
    1439                 $the_date = mysql2date( $d, $post->post_date );
     1436        if ( '' == $d ) {
     1437                $d = get_option( 'date_format' );
     1438        }
     1439        $the_date = mysql2date( $d, $post->post_date );
    14401440
    14411441        return apply_filters( 'get_the_date', $the_date, $d );
    14421442}