Skip to:
Content

BuddyPress.org

Changeset 6046


Ignore:
Timestamp:
05/26/2012 03:37:59 PM (13 years ago)
Author:
boonebgorges
Message:

Eases up on type checks when passing an 'html' param to bp_core_fetch_avatar().

Fixes #4215. Props magnus78

File:
1 edited

Legend:

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

    r6023 r6046  
    308308
    309309            // Return it wrapped in an <img> element
    310             if ( true === $html ) {
     310            if ( !empty( $html ) ) {
    311311                return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $avatar_url . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
    312312
     
    370370    }
    371371
    372     if ( true === $html )
     372    if ( !empty( $html ) )
    373373        return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
    374374    else
Note: See TracChangeset for help on using the changeset viewer.