Making WordPress.org


Ignore:
Timestamp:
01/19/2017 01:06:17 PM (10 years ago)
Author:
dd32
Message:

Plugin Directory: Mark newly uploaded plugins as pending not draft, assign some more default meta values and do not show a stray 'results' heading (which is where a future plugin check plugin output will go).

File:
1 edited

Legend:

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

    r4729 r4731  
    161161
    162162                // Create a new post on first-time submissions.
    163                 if ( ! ( $plugin_post instanceof \WP_Post ) ) {
     163                if ( ! $plugin_post ) {
    164164                        $content = '';
    165165                        foreach ( $readme->sections as $section => $section_content ) {
    … …  
    171171                                'post_title'   => $this->plugin['Name'],
    172172                                'post_name'    => $this->plugin_slug,
     173                                'post_status'  => 'pending',
    173174                                'post_content' => $content,
    174175                                'post_excerpt' => $this->plugin['Description'],
    175                         //      'tax_input'    => wp_unslash( $_POST['tax_input'] ),
     176                        //      'tax_input'    => wp_unslash( $_POST['tax_input'] ), // for category selection
    176177                                'meta_input'   => array(
    177178                                        'tested'                   => $readme->tested,
    … …  
    196197                                        'support_threads'          => 0,
    197198                                        'support_threads_resolved' => 0,
     199                                        'downloads'                => 0,
     200                                        'last_updated'             => gmdate( 'Y-m-d H:i:s' ),
     201                                        'plugin_status'            => 'pending',
     202                                        'rating'                   => 0,
     203                                        'ratings'                  => array(),
     204                                        'active_installs'          => 0,
     205                                        'usage'                    => array(),
    198206                                        '_author_ip'               => preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ),
    199207                                ),
    … …  
    273281         */
    274282        public function check_plugin() {
     283                return true;
    275284                // Run the checks.
    276285                // @todo Include plugin checker.
Note: See TracChangeset for help on using the changeset viewer.