Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_avatar

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.

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
1252           $rating = get_option('avatar_rating');
1253           if ( !empty( $rating ) )
1254                $out .= "&r={$rating}";
1255
1256           $avatar = "<img alt='' src='{$out}' class='avatar avatar-{$size}' height='{$size}' width='{$size}' />";
1257      } else {
1258           $avatar = "<img alt='' src='{$default}' class='avatar avatar-{$size} avatar-default' height='{$size}' width='{$size}' />";
1259      }
1260
1261      return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default);
1262 }
1263 endif;
1264
1265 if ( !function_exists('wp_setcookie') ) :
1266 /**
1267  * wp_setcookie() - Sets a cookie for a user who just logged in
1268  *
1269  * @since 1.5
1270  * @deprecated Use wp_set_auth_cookie()