Make WordPress Core

Ticket #43480: 43480.patch

File 43480.patch, 1.3 KB (added by paulschreiber, 6 years ago)
  • src/wp-includes/general-template.php

     
    23952395 *
    23962396 * @since 0.71
    23972397 *
    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.
    23992400 */
    2400 function the_time( $d = '' ) {
     2401function 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
    24012414        /**
    24022415         * Filters the time a post was written for display.
    24032416         *
    24042417         * @since 0.71
    24052418         *
    2406          * @param string $get_the_time The formatted time.
    2407          * @param string $d            The time format. Accepts 'G', 'U',
    2408          *                             or php date format.
     2419         * @param string $the_time    The formatted time.
     2420         * @param string $d           The time format. Accepts 'G', 'U',
     2421         *                            or php date format.
    24092422         */
    2410         echo apply_filters( 'the_time', get_the_time( $d ), $d );
     2423        echo apply_filters( 'the_time', $the_time, $d );
    24112424}
    24122425
    24132426/**