Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/24/2014 07:47:18 PM (10 years ago)
Author:
imath
Message:

Add admin menus to manage signups only if they are allowed

Before adding the menu to manage signups we must be sure the site allows people to register.

See #5374

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-admin.php

    r8149 r8152  
    195195        );
    196196
    197         $hooks['signups'] = $this->signups_page = add_users_page(
    198             __( 'Manage Signups',  'buddypress' ),
    199             __( 'Manage Signups',  'buddypress' ),
    200             $this->capability,
    201             'bp-signups',
    202             array( &$this, 'signups_admin' )
    203         );
     197        // Manage signups if allowed
     198        if ( bp_get_signup_allowed() ) {
     199            $hooks['signups'] = $this->signups_page = add_users_page(
     200                __( 'Manage Signups',  'buddypress' ),
     201                __( 'Manage Signups',  'buddypress' ),
     202                $this->capability,
     203                'bp-signups',
     204                array( &$this, 'signups_admin' )
     205            );
     206        }
    204207
    205208        $edit_page = 'user-edit';
Note: See TracChangeset for help on using the changeset viewer.