Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/17/2012 02:46:26 PM (11 years ago)
Author:
boonebgorges
Message:

Only register BP_Group_Extension meta box if the display callback is defined. See #4414

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r6642 r6643  
    13701370    function create_screen_save() {}
    13711371
    1372     function admin_screen( $group_id ) {}
    1373 
    1374     function admin_screen_save( $group_id ) {}
    1375 
    13761372    // Private Methods
    13771373
     
    14491445
    14501446        // Construct the admin metabox
    1451         if ( ! empty( $this->enable_admin_item ) ) {
     1447        // Plugin authors: Note that $this->enable_admin_item must be
     1448        // set to true, and self::admin_screen() must be defined
     1449        if ( ! empty( $this->enable_admin_item ) && is_admin() && method_exists( get_class( $this ), 'admin_screen' ) ) {
    14521450            // Hook the admin screen markup function to the content hook
    14531451            add_action( 'bp_groups_admin_meta_box_content_' . $this->slug, array( $this, 'admin_screen' ) );
Note: See TracChangeset for help on using the changeset viewer.