avatar_defaults filter-hookWP 2.6.0

Filters the default avatars.

Avatars are stored in key/value pairs, where the key is option value, and the name is the displayed avatar name.


add_filter( 'avatar_defaults', 'wp_kama_avatar_defaults_filter' );

 * Function for `avatar_defaults` filter-hook.
 * @param string[] $avatar_defaults Associative array of default avatars.
 * @return string[]
function wp_kama_avatar_defaults_filter( $avatar_defaults ){

	// filter...
	return $avatar_defaults;
Associative array of default avatars.


Since 2.6.0 Introduced.

Where the hook is called

In file: /wp-admin/options-discussion.php
wp-admin/options-discussion.php 336
$avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults );

Where the hook is used in WordPress

Usage not found.