Changeset 3030

Show
Ignore:
Timestamp:
11/10/05 23:31:30 (3 years ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/template-functions-general.php

    r3009 r3030  
    633633 
    634634 
     635function the_modified_time($d = '') { 
     636    echo apply_filters('the_modified_time', get_the_modified_time($d), $d); 
     637} 
     638 
     639 
     640function get_the_modified_time($d = '') { 
     641    if ( '' == $d ) 
     642        $the_time = get_post_modified_time(get_settings('time_format')); 
     643    else 
     644        $the_time = get_post_modified_time($d); 
     645    return apply_filters('get_the_modified_time', $the_time, $d); 
     646} 
     647 
     648 
     649function get_post_modified_time( $d = 'U', $gmt = false ) { // returns timestamp 
     650    global $post; 
     651 
     652    if ( $gmt ) 
     653        $time = $post->post_modified_gmt; 
     654    else 
     655        $time = $post->post_modified; 
     656    $time = mysql2date($d, $time); 
     657 
     658    return apply_filters('get_the_modified_time', $time, $d, $gmt); 
     659} 
     660 
     661 
    635662function the_weekday() { 
    636663    global $weekday, $id, $post;