Changeset 14153 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php
- Timestamp:
- 10/29/2024 03:18:40 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php
r13751 r14153 61 61 <li> 62 62 <?php 63 $modified_time = get_post_modified_time(); 63 $last_updated = get_post_meta( $post->ID, 'last_updated', true ); 64 // Fallback to modified timestamp if meta unavailable. 65 $last_updated = $last_updated ? strtotime( $last_updated ) : get_post_modified_time( 'U', true ); 64 66 65 67 // Fallback for approved plugins that are not published yet. 66 if ( $modified_time< 0 ) {67 $ modified_time = get_post_time();68 if ( ! $last_updated || $last_updated < 0 ) { 69 $last_updated = get_post_time( 'U', true ); 68 70 } 69 71 … … 72 74 __( 'Last updated %s', 'wporg-plugins' ), 73 75 /* translators: %s: time since the last update */ 74 '<strong>' . wp_kses( sprintf( __( '%s ago', 'wporg-plugins' ), '<span>' . human_time_diff( $ modified_time) . '</span>' ), array( 'span' => true ) ) . '</strong>'76 '<strong>' . wp_kses( sprintf( __( '%s ago', 'wporg-plugins' ), '<span>' . human_time_diff( $last_updated ) . '</span>' ), array( 'span' => true ) ) . '</strong>' 75 77 ); 76 78 ?>
Note: See TracChangeset
for help on using the changeset viewer.