Making WordPress.org


Ignore:
Timestamp:
06/11/2016 10:07:10 PM (8 years ago)
Author:
obenland
Message:

Plugin Directory: Let plugin authors select categories on upload.

Also refactors create_plugin_post() to me more of a direct wrapper of
wp_insert_post(). Front-end needs styles.

See #1573.

File:
1 edited

Legend:

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

    r3230 r3335  
    1111
    1212        if ( is_user_logged_in() ) :
     13            include_once ABSPATH . 'wp-admin/includes/template.php';
    1314
    1415            if ( ! empty( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'wporg-plugins-upload' ) && 'upload' === $_POST['action'] ) :
     
    4142            <?php endif; ?>
    4243
    43             <form enctype="multipart/form-data" id="upload_form" method="POST" action="">
     44            <form id="upload_form" enctype="multipart/form-data" method="POST" action="">
    4445                <?php wp_nonce_field( 'wporg-plugins-upload' ); ?>
    4546                <input type="hidden" name="action" value="upload"/>
     47                <fieldset>
     48                    <legend><?php _e( 'Plugin Categories (up to 3)', 'wporg-plugins' ); ?></legend>
     49                    <ul class="category-checklist form-no-clear">
     50                        <?php wp_terms_checklist( 0, array( 'taxonomy' => 'plugin_category' ) ); ?>
     51                    </ul>
     52                </fieldset>
    4653                <input type="file" id="zip_file" name="zip_file" size="25"/>
    4754                <input id="upload_button" class="button" type="submit" value="<?php esc_attr_e( 'Upload', 'wporg-plugins' ); ?>"/>
Note: See TracChangeset for help on using the changeset viewer.