Ticket #13771: 13771.2.diff
File 13771.2.diff, 1.1 KB (added by , 11 years ago) |
---|
-
src/wp-includes/general-template.php
1420 1420 } 1421 1421 1422 1422 /** 1423 * Retrieve the date the currentpost was written.1423 * Retrieve the date on which the post was written. 1424 1424 * 1425 1425 * Unlike the_date() this function will always return the date. 1426 1426 * Modify output with 'get_the_date' filter. 1427 1427 * 1428 1428 * @since 3.0.0 1429 1429 * 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. 1432 1433 */ 1433 function get_the_date( $d = '' ) {1434 $post = get_post( );1434 function get_the_date( $d = '', $post = 0 ) { 1435 $post = get_post( $post ); 1435 1436 1436 1437 if ( '' == $d ) 1437 1438 $the_date = mysql2date( get_option( 'date_format' ), $post->post_date );