Skip to:
Content

BuddyPress.org

Changeset 7675


Ignore:
Timestamp:
12/15/2013 02:44:35 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Add notifications and BP_NOTIFICATIONS_SLUG to illegal_names in bp_core_get_illegal_names(). Also add brackets for improved code readability.

File:
1 edited

Legend:

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

    r7572 r7675  
    10321032
    10331033        // Make sure $value is array
    1034         if ( empty( $value ) )
     1034        if ( empty( $value ) ) {
    10351035                $db_illegal_names = array();
    1036         if ( is_array( $value ) )
     1036        }
     1037
     1038        if ( is_array( $value ) ) {
    10371039                $db_illegal_names = $value;
    1038         elseif ( is_string( $value ) )
     1040        } elseif ( is_string( $value ) ) {
    10391041                $db_illegal_names = explode( ' ', $value );
     1042        }
    10401043
    10411044        // Add the core components' slugs to the banned list even if their components aren't active.
     
    10501053                'search',
    10511054                'settings',
     1055                'notifications',
    10521056                'register',
    10531057                'activate'
     
    10651069                'BP_SEARCH_SLUG',
    10661070                'BP_SETTINGS_SLUG',
     1071                'BP_NOTIFICATIONS_SLUG',
    10671072                'BP_REGISTER_SLUG',
    10681073                'BP_ACTIVATION_SLUG',
    10691074        );
    1070         foreach( $slug_constants as $constant )
    1071                 if ( defined( $constant ) )
     1075        foreach( $slug_constants as $constant ) {
     1076                if ( defined( $constant ) ) {
    10721077                        $bp_component_slugs[] = constant( $constant );
     1078                }
     1079        }
    10731080
    10741081        // Add our slugs to the array and allow them to be filtered
Note: See TracChangeset for help on using the changeset viewer.