Making WordPress.org

Changeset 5266


Ignore:
Timestamp:
04/05/2017 11:00:53 PM (7 years ago)
Author:
coffee2code
Message:

Plugin Directory, Author Card: Check for last updated date of post via post meta 'last_updated' instead of post_date field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php

    r5265 r5266  
    136136                    $extra   = '';
    137137                    $classes = $tooltips = array();
     138                    $last_updated = get_post_meta( $plugin->ID, 'last_updated', true );
    138139
    139140                    if ( in_array( $plugin->post_name, wp_list_pluck( $author_plugins, 'post_name' ) ) ) {
     
    148149                    $plugin_slug = $plugin->post_name;
    149150                    if ( in_array( $plugin->post_status, array( 'draft', 'pending' ) ) ) {
    150                         $extra .= ' (requested ' . human_time_diff( strtotime( $plugin->post_date ) ) . ' ago)';
     151                        $extra .= ' (requested ' . human_time_diff( strtotime( $last_updated ) ) . ' ago)';
    151152                        $tooltips[] = 'Requested, remains unapproved.';
    152153                        $classes[]  = 'profile-plugin-requested';
     
    176177                        $classes[]      = 'profile-plugin-open';
    177178
    178                         if ( strtotime( '-2 years' ) > strtotime( $plugin->post_date ) ) {
     179                        if ( strtotime( '-2 years' ) > strtotime( $last_updated ) ) {
    179180                            $tooltips[] = 'Plugin is open, but has not been updated in more than two years.';
    180181                            $classes[]  = 'profile-plugin-open-old';
Note: See TracChangeset for help on using the changeset viewer.