Making WordPress.org


Ignore:
Timestamp:
08/13/2018 01:41:42 PM (8 years ago)
Author:
vedjain
Message:

WordCamp: Remove duplicate add_meta_box calls from Meetup admin. Also, use common permissions for both WordCamp and Meetup.

Event_Admin class already loads logs and private note meta boxes for both WordCamp and Meetup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-admin.php

    r7607 r7608  
    2020         */
    2121        public function __construct() {
     22
    2223                add_action( 'add_meta_boxes', array( $this, 'metabox' ) );
    2324
    … …  
    151152                }
    152153
     154                if ( ! current_user_can( 'wordcamp_wrangle_wordcamps' ) ) {
     155                        return;
     156                }
     157
    153158                add_meta_box(
    154159                        'wcpt_log',
    … …  
    167172        public function add_note_metabox() {
    168173                if ( ! current_user_can( $this->get_edit_capability() ) ) {
     174                        return;
     175                }
     176
     177                if ( ! current_user_can( 'wordcamp_wrangle_wordcamps' ) ) {
    169178                        return;
    170179                }
Note: See TracChangeset for help on using the changeset viewer.