Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/04/2020 01:26:10 AM (5 years ago)
Author:
imath
Message:

Stop using the $current_blog global when fetching/deleting an avatar

Props itowhid06

Fixes #8254

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-avatars.php

    r12555 r12565  
    198198    }
    199199
    200     global $current_blog;
    201 
    202200    // Set the default variables array and parse it against incoming $args array.
    203201    $params = wp_parse_args( $args, array(
     
    228226
    229227            case 'blog'  :
    230                 $params['item_id'] = $current_blog->id;
     228                $params['item_id'] = get_current_blog_id();
    231229                break;
    232230
     
    751749            $args['item_id'] = buddypress()->groups->current_group->id;
    752750        } elseif ( 'blog' === $args['object'] ) {
    753             $args['item_id'] = $current_blog->id;
     751            $args['item_id'] = get_current_blog_id();
    754752        }
    755753
Note: See TracChangeset for help on using the changeset viewer.