Ticket #37059: 37059.2.patch
File 37059.2.patch, 2.2 KB (added by , 8 years ago) |
---|
-
src/wp-includes/general-template.php
2255 2255 * 2256 2256 * @since 2.1.0 2257 2257 * 2258 * @param string $d Optional. PHP date format. Defaults to the "date_format" option 2259 * @return string 2258 * @param string $d Optional. PHP date format defaults to the date_format option if not specified. 2259 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. 2260 * @return false|string Date the current post was modified. False on failure. 2260 2261 */ 2261 function get_the_modified_date($d = '') { 2262 function get_the_modified_date($d = '', $post = null ) { 2263 2262 2264 if ( '' == $d ) 2263 $the_time = get_post_modified_time(get_option('date_format'), null, null, true);2265 $the_time = get_post_modified_time(get_option('date_format'), null, $post, true); 2264 2266 else 2265 $the_time = get_post_modified_time($d, null, null, true);2267 $the_time = get_post_modified_time($d, null, $post, true); 2266 2268 2267 2269 /** 2268 2270 * Filters the date a post was last modified. … … 2398 2400 * 2399 2401 * @since 2.0.0 2400 2402 * 2401 * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option. 2402 * @return string 2403 * @param string $d Optional. Format to use for retrieving the time the post 2404 * was modified. Either 'G', 'U', or php date format defaults 2405 * to the value specified in the time_format option. Default empty. 2406 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. 2407 * @return false|string Formatted date string or Unix timestamp. False on failure. 2403 2408 */ 2404 function get_the_modified_time($d = '' ) {2409 function get_the_modified_time($d = '', $post = null ) { 2405 2410 if ( '' == $d ) 2406 $the_time = get_post_modified_time(get_option('time_format'), null, null, true);2411 $the_time = get_post_modified_time(get_option('time_format'), null, $post, true); 2407 2412 else 2408 $the_time = get_post_modified_time($d, null, null, true);2413 $the_time = get_post_modified_time($d, null, $post, true); 2409 2414 2410 2415 /** 2411 2416 * Filters the localized time a post was last modified.