Skip to:
Content

BuddyPress.org

Ticket #6298: 6298.diff

File 6298.diff, 713 bytes (added by henry.wright, 9 years ago)
  • src/bp-core/bp-core-avatars.php

    diff --git src/bp-core/bp-core-avatars.php src/bp-core/bp-core-avatars.php
    index 8b98657..ee251e3 100644
    add_action( 'wp_ajax_bp_avatar_set', 'bp_avatar_ajax_set' ); 
    13261326function bp_core_fetch_avatar_filter( $avatar, $user, $size, $default, $alt = '', $args = array() ) {
    13271327        global $pagenow;
    13281328
    1329         // Do not filter if inside WordPress options page.
    1330         if ( 'options-discussion.php' == $pagenow )
     1329        // Don't filter if inside WordPress options page and force_default is true.
     1330        if ( 'options-discussion.php' === $pagenow && true === $args['force_default'] )
    13311331                return $avatar;
    13321332
    13331333        // If passed an object, assume $user->user_id.