Template functions for getting the post's modified time from error and Mark Jaquith. fixes #1836
git-svn-id: https://develop.svn.wordpress.org/trunk@3030 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ca220554a
commit
646a09ead4
@ -632,6 +632,33 @@ function get_post_time( $d = 'U', $gmt = false ) { // returns timestamp
|
||||
}
|
||||
|
||||
|
||||
function the_modified_time($d = '') {
|
||||
echo apply_filters('the_modified_time', get_the_modified_time($d), $d);
|
||||
}
|
||||
|
||||
|
||||
function get_the_modified_time($d = '') {
|
||||
if ( '' == $d )
|
||||
$the_time = get_post_modified_time(get_settings('time_format'));
|
||||
else
|
||||
$the_time = get_post_modified_time($d);
|
||||
return apply_filters('get_the_modified_time', $the_time, $d);
|
||||
}
|
||||
|
||||
|
||||
function get_post_modified_time( $d = 'U', $gmt = false ) { // returns timestamp
|
||||
global $post;
|
||||
|
||||
if ( $gmt )
|
||||
$time = $post->post_modified_gmt;
|
||||
else
|
||||
$time = $post->post_modified;
|
||||
$time = mysql2date($d, $time);
|
||||
|
||||
return apply_filters('get_the_modified_time', $time, $d, $gmt);
|
||||
}
|
||||
|
||||
|
||||
function the_weekday() {
|
||||
global $weekday, $id, $post;
|
||||
$the_weekday = $weekday[mysql2date('w', $post->post_date)];
|
||||
|
Loading…
Reference in New Issue
Block a user