Making WordPress.org


Ignore:
Timestamp:
11/01/2022 05:41:04 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: Don't delete submitted ZIP files immediately upon approval/rejection, and instead delete them x days afterwards.

This provides some room for re-reviewing recently-rejected or recently-approved plugins when required.

Closes https://github.com/WordPress/wordpress.org/pull/106.
Fixes #5636.

File:
1 edited

Legend:

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

    r11770 r12175  
    203203     */
    204204    public function approved( $post_id, $post ) {
    205         $attachments   = get_attached_media( 'application/zip', $post_id );
    206205        $plugin_author = get_user_by( 'id', $post->post_author );
    207206
     
    214213        /*
    215214         Temporarily disable SVN prefill from ZIP files
     215        $attachments = get_attached_media( 'application/zip', $post_id );
    216216        if ( $attachments ) {
    217217            $attachment = end( $attachments );
     
    229229        SVN::import( $dir, 'http://plugins.svn.wordpress.org/' . $post->post_name, sprintf( 'Adding %1$s by %2$s.', $post->post_title, $plugin_author->user_login ) );
    230230
    231         // Delete zips.
    232         foreach ( $attachments as $attachment ) {
    233             wp_delete_attachment( $attachment->ID, true );
    234         }
    235 
    236231        // Grant commit access.
    237232        Tools::grant_plugin_committer( $post->post_name, $plugin_author );
     
    255250        $original_permalink = $post->post_name;
    256251        $submission_date    = get_the_modified_date( 'F j, Y', $post_id );
    257 
    258         // Delete zips.
    259         foreach ( get_attached_media( 'application/zip', $post_id ) as $attachment ) {
    260             wp_delete_attachment( $attachment->ID, true );
    261         }
    262252
    263253        // Change slug to 'rejected-plugin-name-rejected' to free up 'plugin-name'.
Note: See TracChangeset for help on using the changeset viewer.