Template functions for getting the post's modified time from error and Mark Jaquith. fixes #1836

git-svn-id: http://svn.automattic.com/wordpress/trunk@3030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-11-10 23:31:30 +00:00
parent 7710b94ad0
commit 833f1cca4e
1 changed files with 27 additions and 0 deletions

View File

@ -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)];