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-handler.php

    r3331 r3335  
    175175            // Add a Plugin Directory entry for this plugin.
    176176            $plugin_post = Plugin_Directory::create_plugin_post( array(
    177                 'title'       => $this->plugin['Name'],
    178                 'slug'        => $this->plugin_slug,
    179                 'status'      => 'draft',
    180                 'author'      => get_current_user_id(),
    181                 'content'     => $content,
    182                 'description' => $this->plugin['Description'],
    183                 'tags'        => $readme->tags,
    184                 'meta'        => array(
     177                'post_title'   => $this->plugin['Name'],
     178                'post_name'    => $this->plugin_slug,
     179                'post_content' => $content,
     180                'post_excerpt' => $this->plugin['Description'],
     181                'tax_input'    => wp_unslash( $_POST['tax_input'] ),
     182                'meta_input'   => array(
    185183                    'tested'                   => $readme->tested,
    186184                    'requires'                 => $readme->requires,
Note: See TracChangeset for help on using the changeset viewer.