WordPress.org

Making WordPress.org

Ticket #2744: 2744.diff

File 2744.diff, 4.0 KB (added by Ipstenu, 3 years ago)
  • trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/tools/class-stats-report.php

     
    5555         *     @type int $plugin_delist                      The number of plugins delisted within the defined time interval.
    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.
     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.
    6060         *     @type int $in_queue_oending                   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".
     
    100100                                $state
    101101                        ) );
    102102                }
     103               
     104                // Temporary until the above is updated to work with the new directory:
     105                $stats['plugin_approve'] = __( 'N/A' , 'wporg-plugins' );
     106                $stats['plugin_delist']  = __( 'N/A' , 'wporg-plugins' );
     107                $stats['plugin_reject']  = __( 'N/A' , 'wporg-plugins' );
    103108
    104109                // --------------
    105110                // Plugin Queue
    106111                // --------------
    107112
    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(
     113                // # of plugins currently in the queue that are new (have not been processed/replied to yet)
     114                $stats['in_queue_new'] = $wpdb->get_var(
    110115                        "SELECT COUNT(*) FROM $wpdb->posts WHERE `post_type` = 'plugin' AND `post_status` = 'new'"
    111116                );
    112117
     
    115120                        "SELECT COUNT(*) FROM $wpdb->posts WHERE `post_type` = 'plugin' AND `post_status` = 'pending'"
    116121                );
    117122
    118                 // # of plugins currently in the queue (draft + pending)
    119                 $stats['in_queue'] = $stats['in_queue_draft'] + $stats['in_queue_pending'];
     123                // # of plugins currently in the queue (new + pending)
     124                $stats['in_queue'] = $stats['in_queue_new'] + $stats['in_queue_pending'];
    120125
    121126                // # of plugins currently in the queue submitted during the specified time window
    122127                $stats['in_queue_from_time_window'] = $wpdb->get_var( $wpdb->prepare(
     
    245250                <h3><?php _e( 'Plugin Queue Stats (current)', 'wporg-plugins' ); ?></h3>
    246251
    247252                <ul style="font-family:Courier New;">
    248                         <li><?php printf( __( 'Plugins in the queue (draft and pending)* : %d', 'wporg-plugins' ), $stats['in_queue'] ); ?></li>
     253                        <li><?php printf( __( 'Plugins in the queue (new and pending)* : %d', 'wporg-plugins' ), $stats['in_queue'] ); ?></li>
    249254                        <li><?php printf( __( '&rarr; (older than %1$d days ago)** : %2$d', 'wporg-plugins' ), $stats['recentdays'], $stats['in_queue_old'] ); ?></li>
    250255                        <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>
     256                        <li><?php printf( __( '&rarr; (new; not processed or replied to yet)* : %d', 'wporg-plugins' ), $stats['in_queue_new'] ); ?></li>
    252257                        <li><?php printf( __( '&rarr; (pending; replied to)* : %d', 'wporg-plugins' ), $stats['in_queue_pending'] ); ?></li>
    253258                </ul>
    254259