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/class-customizations.php

    r2777 r2790  
    100100
    101101    /**
    102      * Filter the query in wp-admin to list only 
     102     * Filter the query in wp-admin to list only.
    103103     */
    104104    public function pre_get_posts( $query ) {
     
    181181        }
    182182
    183         add_meta_box(
    184             'plugin-committers',
    185             __( 'Plugin Committers', 'wporg-plugins' ),
    186             array( __NAMESPACE__ . '\Metabox\Committers', 'display' ),
    187             'plugin', 'side'
    188         );
    189 
    190         add_meta_box(
    191             'internal-notes',
    192             __( 'Internal Notes', 'wporg-plugins' ),
    193             array( __NAMESPACE__ . '\Metabox\Internal_Notes', 'display' ),
    194             'plugin', 'normal', 'high'
    195         );
    196 
    197         add_meta_box(
    198             'plugin-review',
    199             __( 'Plugin Review Tools', 'wporg-plugins' ),
    200             array( __NAMESPACE__ . '\Metabox\Review_Tools', 'display' ),
    201             'plugin', 'normal', 'high'
    202         );
     183        // Only plugin reviewers/admins need review-related meta boxes.
     184        if ( current_user_can( 'plugin_approve' ) ) {
     185            add_meta_box(
     186                'internal-notes',
     187                __( 'Internal Notes', 'wporg-plugins' ),
     188                array( __NAMESPACE__ . '\Metabox\Internal_Notes', 'display' ),
     189                'plugin', 'normal', 'high'
     190            );
     191
     192            add_meta_box(
     193                'plugin-review',
     194                __( 'Plugin Review Tools', 'wporg-plugins' ),
     195                array( __NAMESPACE__ . '\Metabox\Review_Tools', 'display' ),
     196                'plugin', 'normal', 'high'
     197            );
     198        }
    203199
    204200        add_meta_box(
     
    215211            array( __NAMESPACE__ . '\Metabox\Controls', 'display' ),
    216212            'plugin', 'side', 'high'
     213        );
     214
     215        add_meta_box(
     216            'plugin-committers',
     217            __( 'Plugin Committers', 'wporg-plugins' ),
     218            array( __NAMESPACE__ . '\Metabox\Committers', 'display' ),
     219            'plugin', 'side'
    217220        );
    218221
Note: See TracChangeset for help on using the changeset viewer.