Skip to:
Content

BuddyPress.org

Changeset 8582


Ignore:
Timestamp:
07/10/2014 06:51:21 PM (12 years ago)
Author:
johnjamesjacoby
Message:

More strict conditions to avoid debug notices when removing sign-ups from users queries. Also add some brackets and inline doc while we're poking around.

File:
1 edited

Legend:

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

    r8455 r8582  
    11311131
    11321132        // Bail if this is an ajax request
    1133         if ( defined( 'DOING_AJAX' ) )
     1133        if ( defined( 'DOING_AJAX' ) ) {
    11341134            return;
    1135 
     1135        }
     1136
     1137        // Bail if updating BuddyPress
    11361138        if ( bp_is_update() ) {
    11371139            return;
    11381140        }
    11391141
    1140         if ( ! function_exists( 'get_current_screen' ) ) {
     1142        // Bail if there is no current admin screen
     1143        if ( ! function_exists( 'get_current_screen' ) || ! get_current_screen() ) {
    11411144            return;
    11421145        }
    11431146
    1144         if ( $this->users_page != get_current_screen()->id ) {
     1147        // Bail if not on a users page
     1148        if ( $this->users_page !== get_current_screen()->id ) {
    11451149            return;
    11461150        }
    11471151
     1152        // Bail if already querying by an existing role
    11481153        if ( ! empty( $query->query_vars['role'] ) ) {
    11491154            return;
Note: See TracChangeset for help on using the changeset viewer.