Changeset 2790
- Timestamp:
- 03/24/2016 06:36:48 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r2777 r2790 100 100 101 101 /** 102 * Filter the query in wp-admin to list only 102 * Filter the query in wp-admin to list only. 103 103 */ 104 104 public function pre_get_posts( $query ) { … … 181 181 } 182 182 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 } 203 199 204 200 add_meta_box( … … 215 211 array( __NAMESPACE__ . '\Metabox\Controls', 'display' ), 216 212 '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' 217 220 ); 218 221 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php
r2659 r2790 18 18 self::display_post_status(); 19 19 20 if ( 'publish' == get_post_status() ) {20 if ( 'publish' === get_post_status() ) { 21 21 self::display_tested_up_to(); 22 22 } … … 36 36 $post = get_post(); 37 37 38 // Bail if the current user can't review plugins. 39 if ( ! current_user_can( 'plugin_approve', $post ) ) { 40 return; 41 } 42 38 43 $statuses = array( 'publish', 'pending', 'disabled', 'closed', 'rejected' ); 39 // TODO Add capability check here40 44 ?> 41 45 <div class="misc-pub-section misc-pub-plugin-status">
Note: See TracChangeset
for help on using the changeset viewer.