Making WordPress.org


Ignore:
Timestamp:
01/15/2024 05:23:52 AM (14 months ago)
Author:
dd32
Message:

Plugin Directory: Allow plugins to upload additional versions for review.

This is currently limited to new plugins, which is prior to the first human review.

Iterations upon this will open it to plugins in the pending state as well, which is during the human review.

See #7384.

File:
1 edited

Legend:

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

    r13088 r13109  
    130130                $zip_preview                = Template::preview_link_zip( $slug, $zip_file->ID );
    131131                $zip_pcp                    = Template::preview_link_zip( $slug, $zip_file->ID, 'pcp' );
     132                $zip_filename               = $zip_file->submitted_name ?? preg_replace( '!^[0-9-_]+!', '', basename( $zip_url ) );
    132133
    133134                printf(
    134                     '<li>%1$s <a href="%2$s">%3$s</a> (%4$s) (<a href="%5$s" target="_blank">preview</a> | <a href="%6$s" target="_blank">pcp</a>)</li>',
     135                    '<li>%1$s <a href="%2$s" title="%3$s">%4$s</a> (%5$s) (<a href="%6$s" target="_blank">preview</a> | <a href="%7$s" target="_blank">pcp</a>)</li>',
    135136                    esc_html( $zip_date ),
    136137                    esc_url( $zip_url ),
    137                     esc_html( basename( $zip_url ) ),
     138                    esc_attr( $zip_file->post_title ),
     139                    esc_html( $zip_filename ),
    138140                    esc_html( $zip_size ),
    139141                    esc_url( $zip_preview ),
     
    142144            }
    143145            echo '</ul>';
     146        }
     147
     148        // Ability to upload an additional ZIP.
     149        if ( in_array( $post->post_status, [ 'draft', 'pending', 'new' ], true ) ) {
     150            echo '<label>
     151                <input type="file" class="plugin-file" name="zip_file" size="25" accept=".zip"/>
     152                <button class="button button-secondary plugin-upload-zip">' . __( 'Upload', 'wporg-plugins' ) . '</button>
     153                </label>';
    144154        }
    145155
Note: See TracChangeset for help on using the changeset viewer.