Making WordPress.org


Ignore:
Timestamp:
03/24/2016 06:36:48 PM (9 years ago)
Author:
obenland
Message:

Plugin Directory: Don't show review tools to Plugin Committers.

See #1570, #1571.

File:
1 edited

Legend:

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

    r2659 r2790  
    1818                self::display_post_status();
    1919
    20                 if ( 'publish' == get_post_status() ) {
     20                if ( 'publish' === get_post_status() ) {
    2121                    self::display_tested_up_to();
    2222                }
     
    3636        $post = get_post();
    3737
     38        // Bail if the current user can't review plugins.
     39        if ( ! current_user_can( 'plugin_approve', $post ) ) {
     40            return;
     41        }
     42
    3843        $statuses = array( 'publish', 'pending', 'disabled', 'closed', 'rejected' );
    39         // TODO Add capability check here
    4044        ?>
    4145        <div class="misc-pub-section misc-pub-plugin-status">
Note: See TracChangeset for help on using the changeset viewer.