Changeset 14153 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.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/api/routes/class-plugin.php
r14152 r14153 165 165 krsort( $result['ratings'] ); 166 166 167 // Determine the last_updated date. 168 $last_updated = $post->last_updated ?: $post->post_modified_gmt; // Prefer the post_meta unless not set. 169 if ( '0000-00-00 00:00:00' === $last_updated ) { 170 $last_updated = $post->post_date_gmt; 171 } 172 167 173 $result['num_ratings'] = array_sum( $result['ratings'] ); 168 174 $result['support_url'] = 'https://wordpress.org/support/plugin/' . urlencode( $plugin_slug ) . '/'; … … 171 177 $result['active_installs'] = intval( get_post_meta( $post_id, 'active_installs', true ) ); 172 178 $result['downloaded'] = intval( get_post_meta( $post_id, 'downloads', true ) ); 173 $result['last_updated'] = gmdate( 'Y-m-d g:ia \G\M\T', strtotime( $ post->post_modified_gmt) );179 $result['last_updated'] = gmdate( 'Y-m-d g:ia \G\M\T', strtotime( $last_updated ) ); 174 180 $result['added'] = gmdate( 'Y-m-d', strtotime( $post->post_date_gmt ) ); 175 181 $result['homepage'] = get_post_meta( $post_id, 'header_plugin_uri', true );
Note: See TracChangeset
for help on using the changeset viewer.