Make WordPress Core

Ticket #13771: 13771_3.diff

File 13771_3.diff, 983 bytes (added by tanner m, 11 years ago)

Fix doc block grammar and use more conventional $post = 0.

  • wp-includes/general-template.php

     
    14201420}
    14211421
    14221422/**
    1423  * Retrieve the date the current post was written.
     1423 * Retrieve the date on which the post was written.
    14241424 *
    14251425 * Unlike the_date() this function will always return the date.
    14261426 * Modify output with 'get_the_date' filter.
     
    14281428 * @since 3.0.0
    14291429 *
    14301430 * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
     1431 * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
    14311432 * @return string Date the current post was written.
    14321433 */
    1433 function get_the_date( $d = '' ) {
    1434         $post = get_post();
     1434function get_the_date( $d = '', $post = 0 ) {
     1435        $post = get_post( $post );
    14351436
    14361437        if ( '' == $d )
    14371438                $the_date = mysql2date( get_option( 'date_format' ), $post->post_date );