Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/21/2014 12:16:37 AM (11 years ago)
Author:
imath
Message:

On single group screens, uses default avatar as a fallback in group navigation menu

In case the WordPress Discussion Avatar display setting is disabled, using bp_group_current_avatar() to set group navigation menu was outputing an unfound image making the group edit screens unavailable. This fix uses default avatar as a fallback if no group avatar has been found to build the group navigation menu. It also keeps bp_group_current_avatar() function in case it is still used by a plugin or a theme, but this function now outputs the current avatar.

Fixes #5343

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-loader.php

    r7520 r7745  
    592592
    593593                if ( empty( $bp->bp_options_avatar ) ) {
    594                     $bp->bp_options_avatar = bp_group_current_avatar();
     594                    $bp->bp_options_avatar = '<img src="' . esc_url( bp_core_avatar_default_thumb() ) . '" alt="' . esc_attr__( 'No Group Avatar', 'buddypress' ) . '" class="avatar" />';
    595595                }
    596596            }
Note: See TracChangeset for help on using the changeset viewer.