WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
213 | $avatar_defaults = array( |
214 | 'mystery' => __('Mystery Man'), |
215 | 'blank' => __('Blank'), |
216 | 'gravatar_default' => __('Gravatar Logo'), |
217 | 'identicon' => __('Identicon (Generated)'), |
218 | 'wavatar' => __('Wavatar (Generated)'), |
219 | 'monsterid' => __('MonsterID (Generated)'), |
220 | 'retro' => __('Retro (Generated)') |
221 | ); |
222 | $avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults); |
223 | $default = get_option('avatar_default'); |
224 | if ( empty($default) ) |
225 | $default = 'mystery'; |
226 | $size = 32; |
227 | $avatar_list = ''; |
228 | foreach ( $avatar_defaults as $default_key => $default_name ) { |
229 | $selected = ($default == $default_key) ? 'checked="checked" ' : ''; |
230 | $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> "; |
231 |
|