Definition:
function get_the_date( $d = '' ) {}
Retrieve the date the current $post was written.
Unlike the_date() this function will always return the date. Modify output with ‘get_the_date’ filter.
Parameters
- string $d: Optional. PHP date format defaults to the date_format option if not specified.
Return values
returns:Null if displaying, string if retrieving.
Defined filters
- get_the_date
apply_filters('get_the_date', $the_date, $d)
Source code
function get_the_date( $d = '' ) {
global $post;
$the_date = '';
if ( '' == $d )
$the_date .= mysql2date(get_option('date_format'), $post->post_date);
else
$the_date .= mysql2date($d, $post->post_date);
return apply_filters('get_the_date', $the_date, $d);
}
1827

February 12, 2011 


No comments yet... Be the first to leave a reply!