WordPress.org

Making WordPress.org

Ticket #4237: 4237.diff

File 4237.diff, 2.0 KB (added by ck3lee, 22 months ago)
  • wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php

    diff --git wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
    index 5137ea713..9c8eff10b 100644
    class Status_Transitions { 
    148148                                $this->set_translation_status( $post, 'inactive' );
    149149                                break;
    150150                }
    151 
    152                 // Record the time a plugin was transitioned into a specific status.
    153                 if ( '0000-00-00 00:00:00' === $post->post_modified_gmt ) {
    154                         // Assume now.
    155                         update_post_meta( $post->ID, "_{$new_status}", time() );
    156                 } else {
    157                         update_post_meta( $post->ID, "_{$new_status}", strtotime( $post->post_modified_gmt ) );
    158                 }
    159         }
     151                update_post_meta( $post->ID, "_{$new_status}", time() );
     152                update_post_meta( $post->ID, "last_updated", gmdate( 'Y-m-d H:i:s', time() ) );
     153}
    160154
    161155        /**
    162156         * Updates project status of the plugin on translate.wordpress.org.
  • wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php

    diff --git wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
    index f411b5deb..4eeb162d2 100644
    class Import { 
    158158                update_post_meta( $plugin->ID, 'assets_banners', wp_slash( $assets['banner'] ) );
    159159                update_post_meta( $plugin->ID, 'last_updated', wp_slash( $plugin->post_modified_gmt ) );
    160160                update_post_meta( $plugin->ID, 'plugin_status', wp_slash( $plugin->post_status ) );
     161                update_post_meta( $plugin->ID, '_submitted_date', time() );
    161162
    162163                // Calculate the 'plugin color' from the average color of the banner if provided. This is used for fallback icons.
    163164                $banner_average_color = '';