Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/10/2015 02:49:16 AM (10 years ago)
Author:
johnjamesjacoby
Message:

Replace all remaining $bp global touches with buddypress().

All existing tests continue to pass as normal. I will further manually scrutinize each replacement to ensure correctness.

Fixes #5138. Any stragglers or updates will reference this ticket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-functions.php

    r9351 r9471  
    218218 */
    219219function xprofile_insert_field( $args = '' ) {
    220     global $bp;
    221220
    222221    $r = wp_parse_args( $args, array(
     
    240239
    241240    // Check this is a valid field type
    242     if ( ! in_array( $r['type'], (array) $bp->profile->field_types ) ) {
     241    if ( ! in_array( $r['type'], (array) buddypress()->profile->field_types ) ) {
    243242        return false;
    244243    }
     
    10221021 */
    10231022function bp_xprofile_get_visibility_levels() {
    1024     global $bp;
    10251023
    10261024    /**
     
    10311029     * @param array $visibility_levels Array of visibility levels.
    10321030     */
    1033     return apply_filters( 'bp_xprofile_get_visibility_levels', $bp->profile->visibility_levels );
     1031    return apply_filters( 'bp_xprofile_get_visibility_levels', buddypress()->profile->visibility_levels );
    10341032}
    10351033
Note: See TracChangeset for help on using the changeset viewer.