Making WordPress.org


Ignore:
Timestamp:
04/19/2024 02:56:22 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: Upload: Allow specifying a comment during the ZIP upload.

See #7598, #6853.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php

    r13352 r13575  
    299299                                                                        <input type="hidden" name="plugin_id" value="<?php echo esc_attr( $plugin->ID ); ?>" />
    300300
     301                                                                        <label>
     302                                                                                <?php _e( 'Additional Information', 'wporg-plugins' ); ?><br>
     303                                                                                <textarea name="comment" rows="3" cols="80"></textarea>
     304                                                                        </label>
     305                                                                        <br>
     306
    301307                                                                        <label class="button button-secondary zip-file">
    302308                                                                                <input type="file" class="plugin-file" name="zip_file" size="25" accept=".zip" required data-maxbytes="<?php echo esc_attr( wp_max_upload_size() ); ?>" />
     
    317323                                                                echo '<li>' . sprintf( __( 'Version: %s', 'wporg-plugins' ), '<code>' . esc_html( $upload->version ) . '</code>' ) . '</li>';
    318324                                                                echo '<li>' . sprintf( __( 'Upload Date: %s', 'wporg-plugins' ), date_i18n( get_option( 'date_format' ), strtotime( $upload->post_date ) ) ) . '</li>';
     325                                                                if ( $upload->post_content ) {
     326                                                                        echo '<li>' . nl2br( wp_kses_post( $upload->post_content ) ) . '</li>';
     327                                                                }
    319328                                                                if ( array_key_first( $attached_media) === $attachment_post_id ) {
    320329                                                                        printf(
     
    398407                                <p>
    399408                                        <label>
     409                                                <?php _e( 'Additional Information', 'wporg-plugins' ); ?><br>
     410                                                <textarea name="comment" rows="3" cols="80"><?php
     411                                                        if ( ! empty( $_REQUEST['comment'] ) ) {
     412                                                                echo esc_textarea( $_REQUEST['comment'] );
     413                                                        }
     414                                                ?></textarea>
     415                                        </label>
     416                                </p>
     417
     418                                <p>
     419                                        <label>
    400420                                                <input type="checkbox" name="requirements[faq]" required="required">
    401421                                                <?php
Note: See TracChangeset for help on using the changeset viewer.