Welcome, visitor! Log in
 

Source View: avatar_defaults

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: 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.

Source View

Line Code
190 <?php
191 $avatar_defaults = array(
192      'mystery' => __('Mystery Man'),
193      'blank' => __('Blank'),
194      'gravatar_default' => __('Gravatar Logo'),
195      'identicon' => __('Identicon (Generated)'),
196      'wavatar' => __('Wavatar (Generated)'),
197      'monsterid' => __('MonsterID (Generated)')
198 );
199 $avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults);
200 $default = get_option('avatar_default');
201 if ( empty($default) )
202      $default = 'mystery';
203 $size = 32;
204 $avatar_list = '';
205 foreach ( $avatar_defaults as $default_key => $default_name ) {
206      $selected = ($default == $default_key) ? 'checked="checked" ' : '';
207      $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key)  . "' {$selected}/> ";
208