WordPress filter hook

bp_core_mysteryman_src

Fired by 5 WordPress plugins, running on 90K+ sites between them.

“Filters the Mystery person avatar src value.”

How to use bp_core_mysteryman_src

It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'bp_core_mysteryman_src', function( $value, $grav_size ) {
	// Change $value here.
	return $value;
}, 10, 2 );

Argument names come from BuddyPress Custom Posts's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

5 plugins that fire bp_core_mysteryman_src

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. BuddyPress icon BuddyPress90,000+ installs apply_filters( 'bp_core_mysteryman_src', 'mm', $params['width'] ) bp-core/bp-core-avatars.php:643
  2. BuddyPress Default Group Avatar icon BuddyPress Default Group Avatar10+ installs apply_filters( 'bp_core_mysteryman_src', bp_core_avatar_default(), $grav_size ) bp-default-group-avatar.php:125
  3. BuddyPress Custom Posts icon BuddyPress Custom Posts10+ installs apply_filters( 'bp_core_mysteryman_src', BP_AVATAR_DEFAULT, $grav_size ) themes/tags.php:161
  4. Jet Event System for BuddyPress icon Jet Event System for BuddyPress10+ installs apply_filters( 'bp_core_mysteryman_src', BP_AVATAR_DEFAULT, $grav_size ) main/jet-events-templatetags.php:460
  5. u-wordpress icon u-wordpressFewer than 10 installs apply_filters( 'bp_core_mysteryman_src', BP_AVATAR_DEFAULT, $grav_size ) bp-core-avatars.php:232

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.