Make WordPress Core

Ticket #13771: 13771.2.diff

File 13771.2.diff, 1.1 KB (added by adamsilverstein, 11 years ago)

Slight doc block cleanup, add 'Optional' to description of $post variable

  • src/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.
    14271427 *
    14281428 * @since 3.0.0
    14291429 *
    1430  * @param string $d Optional. PHP date format defaults to the date_format option if not specified.
    1431  * @return string Date the current post was written.
     1430 * @param  string      $d    Optional. PHP date format defaults to the date_format option if not specified.
     1431 * @param  int|WP_Post $post Optional. WP_Post object or ID. Default is global $post object.
     1432 * @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 );