diff --git src/bp-core/bp-core-avatars.php src/bp-core/bp-core-avatars.php
index 68365a7a7..1c6bd5823 100644
|
|
function bp_core_fetch_avatar( $args = '' ) { |
476 | 476 | $legacy_group_avatar_name = ( 'full' == $params['type'] ) ? '-groupavatar-full' : '-groupavatar-thumb'; |
477 | 477 | |
478 | 478 | // Check for directory. |
479 | | if ( file_exists( $avatar_folder_dir ) ) { |
| 479 | if ( ! $params['force_default'] && file_exists( $avatar_folder_dir ) ) { |
480 | 480 | |
481 | 481 | // Open directory. |
482 | 482 | if ( $av_dir = opendir( $avatar_folder_dir ) ) { |
… |
… |
function bp_core_fetch_avatar( $args = '' ) { |
637 | 637 | // Custom Gravatar URL args. |
638 | 638 | if ( ! empty( $params['force_default'] ) ) { |
639 | 639 | $url_args['f'] = 'y'; |
| 640 | $url_args['d'] = $params['default']; |
640 | 641 | } |
641 | 642 | if ( ! empty( $params['rating'] ) ) { |
642 | 643 | $url_args['r'] = strtolower( $params['rating'] ); |
… |
… |
function bp_core_fetch_avatar( $args = '' ) { |
653 | 654 | $default_grav = apply_filters( 'bp_core_avatar_default', $default_grav, $params ); |
654 | 655 | |
655 | 656 | // Only set default image if 'Gravatar Logo' is not requested. |
656 | | if ( 'gravatar_default' !== $default_grav ) { |
| 657 | if ( ! $params['force_default'] && 'gravatar_default' !== $default_grav ) { |
657 | 658 | $url_args['d'] = $default_grav; |
658 | 659 | } |
659 | 660 | |