Making WordPress.org

Changeset 6406


Ignore:
Timestamp:
01/20/2018 12:41:51 AM (6 years ago)
Author:
obenland
Message:

Plugins: Display correct time for approved plugins.

Fixes #3039.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php

    r6287 r6406  
    4444            <li>
    4545                <?php
     46                $modefied_time = get_post_modified_time();
     47
     48                // Fallback for approved plugins that are not published yet.
     49                if ( $modefied_time < 0 ) {
     50                    $modefied_time = get_post_time();
     51                }
     52
    4653                printf(
    4754                    __( 'Last updated: %s', 'wporg-plugins' ),
    4855                    /* Translators: Plugin modified time. */
    49                     '<strong>' . sprintf( __( '%s ago', 'wporg-plugins' ), '<span>' . human_time_diff( get_post_modified_time() ) . '</span>' ) . '</strong>'
     56                    '<strong>' . sprintf( __( '%s ago', 'wporg-plugins' ), '<span>' . human_time_diff( $modefied_time ) . '</span>' ) . '</strong>'
    5057                );
    5158                ?>
Note: See TracChangeset for help on using the changeset viewer.