Ticket #43480: 43480.patch
File 43480.patch, 1.3 KB (added by , 6 years ago) |
---|
-
src/wp-includes/general-template.php
2395 2395 * 2396 2396 * @since 0.71 2397 2397 * 2398 * @param string $d Either 'G', 'U', or php date format. 2398 * @param string $d Either 'G', 'U', or php date format. 2399 * @param bool $gmt Optional. Whether to retrieve the GMT time. Default false. 2399 2400 */ 2400 function the_time( $d = '' ) { 2401 function the_time( $d = '', $gmt = false ) { 2402 $post = get_post( $post ); 2403 2404 if ( ! $post ) { 2405 return false; 2406 } 2407 2408 if ( '' == $d ) { 2409 $the_time = get_post_time( get_option( 'time_format' ), $gmt, $post, true ); 2410 } else { 2411 $the_time = get_post_time( $d, $gmt, $post, true ); 2412 } 2413 2401 2414 /** 2402 2415 * Filters the time a post was written for display. 2403 2416 * 2404 2417 * @since 0.71 2405 2418 * 2406 * @param string $ get_the_timeThe formatted time.2407 * @param string $d 2408 * 2419 * @param string $the_time The formatted time. 2420 * @param string $d The time format. Accepts 'G', 'U', 2421 * or php date format. 2409 2422 */ 2410 echo apply_filters( 'the_time', get_the_time( $d ), $d );2423 echo apply_filters( 'the_time', $the_time, $d ); 2411 2424 } 2412 2425 2413 2426 /**