Opened 14 years ago
Closed 14 years ago
#2671 closed defect (bug) (fixed)
'bp_core_mysteryman_src' filter needs to be honored widely
Reported by: | lucianop | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | ||
Component: | Core | Keywords: | avatar |
Cc: |
Description
The default 'mystery man' image can be overriden by means of the 'bp_core_mysteryman_src' filter. However, there are instances in the core that the filter does not get applied, namely:
- When the user just signed up for an account (the original mystery man appears, even though the filter should have been applied).
In bp_signup_avatar() function (in bp-core-templatetags.php), the filter should be applied, instead of .
$default_grav = apply_filters( 'bp_core_mysteryman_src', BP_AVATAR_DEFAULT, $grav_size );
instead of the hardcoded:
$default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg';
The same is true for the avatar shown in the admin UI (code in bp-core-admin.php). 'mistery-man.jpg' should not be hardcoded there as well.
Sorry for being verbose (instead of attaching a patch), as I don't know how to create patches.
(In [3559]) Filters the mystery man avatar src in bp_get_signup_avatar(). Fixes #2671. Props lucianop