Making WordPress.org

Changeset 5334


Ignore:
Timestamp:
04/14/2017 08:03:47 PM (8 years ago)
Author:
coffee2code
Message:

Plugin Directory: Update PHPDocs and array key names to reflect change of initial post_status from 'draft' to 'new'.

Props SergeyBiryukov.
Fixes #2725.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/tools/class-stats-report.php

    r5318 r5334  
    5656     *     @type int $plugin_new                         The number of plugins submitted within the defined time interval.
    5757     *     @type int $plugin_reject                      The number of plugins rejected within the defined time interval.
    58      *     @type int $in_queue                           The number of plugins currently in the queue (draft or pending).
    59      *     @type int $in_queue_draft                     The number of draft plugins currently in the queue.
    60      *     @type int $in_queue_oending                   The number of pending plugins currently in the queue.
     58     *     @type int $in_queue                           The number of plugins currently in the queue (new or pending).
     59     *     @type int $in_queue_new                       The number of new plugins currently in the queue.
     60     *     @type int $in_queue_pending                   The number of pending plugins currently in the queue.
    6161     *     @type int $in_queue_from_time_window          The number of plugins currently in the queue submitted during the specified time window.
    6262     *     @type int $in_queue_old                       The number of plugins currently in the queue that are older than "recently".
     
    106106        // --------------
    107107
    108         // # of plugins currently in the queue that are drafts (have not been processed/replied to yet)
    109         $stats['in_queue_draft'] = $wpdb->get_var(
     108        // # of plugins currently in the queue that are new (have not been processed/replied to yet)
     109        $stats['in_queue_new'] = $wpdb->get_var(
    110110            "SELECT COUNT(*) FROM $wpdb->posts WHERE `post_type` = 'plugin' AND `post_status` = 'new'"
    111111        );
     
    116116        );
    117117
    118         // # of plugins currently in the queue (draft + pending)
    119         $stats['in_queue'] = $stats['in_queue_draft'] + $stats['in_queue_pending'];
     118        // # of plugins currently in the queue (new + pending)
     119        $stats['in_queue'] = $stats['in_queue_new'] + $stats['in_queue_pending'];
    120120
    121121        // # of plugins currently in the queue submitted during the specified time window
     
    246246
    247247        <ul style="font-family:Courier New;">
    248             <li><?php printf( __( 'Plugins in the queue (draft and pending)* : %d', 'wporg-plugins' ), $stats['in_queue'] ); ?></li>
     248            <li><?php printf( __( 'Plugins in the queue (new and pending)* : %d', 'wporg-plugins' ), $stats['in_queue'] ); ?></li>
    249249            <li><?php printf( __( '&rarr; (older than %1$d days ago)** : %2$d', 'wporg-plugins' ), $stats['recentdays'], $stats['in_queue_old'] ); ?></li>
    250250            <li><?php printf( __( '&rarr; (%1$s - %2$s) : %3$d', 'wporg-plugins' ), $start_date, $stats['date'], $stats['in_queue_from_time_window'] ); ?></li>
    251             <li><?php printf( __( '&rarr; (drafts; not processed or replied to yet)* : %d', 'wporg-plugins' ), $stats['in_queue_draft'] ); ?></li>
     251            <li><?php printf( __( '&rarr; (new; not processed or replied to yet)* : %d', 'wporg-plugins' ), $stats['in_queue_new'] ); ?></li>
    252252            <li><?php printf( __( '&rarr; (pending; replied to)* : %d', 'wporg-plugins' ), $stats['in_queue_pending'] ); ?></li>
    253253        </ul>
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

    r5328 r5334  
    12331233     *     @type string $post_title            The post title. Default empty.
    12341234     *     @type string $post_excerpt          The post excerpt. Default empty.
    1235      *     @type string $post_status           The post status. Default 'draft'.
     1235     *     @type string $post_status           The post status. Default 'new'.
    12361236     *     @type string $post_type             The post type. Default 'post'.
    12371237     *     @type string $comment_status        Whether the post can accept comments. Accepts 'open' or 'closed'.
Note: See TracChangeset for help on using the changeset viewer.