Ticket #13771: 13771.diff
File 13771.diff, 993 bytes (added by , 13 years ago) |
---|
-
wp-includes/general-template.php
1374 1374 * @since 3.0.0 1375 1375 * 1376 1376 * @param string $d Optional. PHP date format defaults to the date_format option if not specified. 1377 * @return string|null Null if displaying, string if retrieving. 1377 * @param int|object $post Optional post ID or object. Default is global $post object. 1378 * @return string 1378 1379 */ 1379 function get_the_date( $d = '' ) { 1380 global $post; 1381 $the_date = ''; 1382 1380 function get_the_date( $d = '', $post = null ) { 1381 $post = get_post( $post ); 1382 1383 1383 if ( '' == $d ) 1384 $the_date .= mysql2date(get_option('date_format'), $post->post_date); 1385 else 1386 $the_date .= mysql2date($d, $post->post_date); 1384 $d = get_option('date_format'); 1387 1385 1386 $the_date = mysql2date( $d, $post->post_date ); 1387 1388 1388 return apply_filters('get_the_date', $the_date, $d); 1389 1389 } 1390 1390