Making WordPress.org


Ignore:
Timestamp:
02/26/2016 07:52:43 AM (8 years ago)
Author:
dd32
Message:

Plugin Directory: Upload shortcode: Abstract out the filesystem handling and cleanup remaining themes-specific logic which don't apply to plugins.
See #1569

File:
1 edited

Legend:

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

    r2625 r2640  
    1212            if ( ! empty( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'wporg-plugins-upload' ) && 'upload' === $_POST['action'] ) {
    1313                if ( UPLOAD_ERR_OK === $_FILES['zip_file']['error'] ) {
    14                     switch_to_blog( WPORG_PLUGIN_DIRECTORY_BLOGID );
    1514                    $uploader = new Upload_Handler;
    1615                    $message  = $uploader->process_upload();
    17                     restore_current_blog();
    18 
    1916                }  else {
    2017                    $message = __( 'Error in file upload.', 'wporg-plugins' );
     
    3835        <?php else : ?>
    3936            <p><?php printf( __( 'Before you can upload a new plugin, <a href="%s">please log in</a>.', 'wporg-plugins' ), esc_url( 'https://login.wordpress.org/' ) ); ?>
    40             <p>
     37            </p>
    4138        <?php endif;
    4239    }
Note: See TracChangeset for help on using the changeset viewer.