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 |
|---|---|
| 1615 | if ( !empty($email) ) { |
| 1616 | $out = "$host/avatar/"; |
| 1617 | $out .= md5( strtolower( $email ) ); |
| 1618 | $out .= '?s='.$size; |
| 1619 | $out .= '&d=' . urlencode( $default ); |
| 1620 | |
| 1621 | $rating = get_option('avatar_rating'); |
| 1622 | if ( !empty( $rating ) ) |
| 1623 | $out .= "&r={$rating}"; |
| 1624 | |
| 1625 | $avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />"; |
| 1626 | } else { |
| 1627 | $avatar = "<img alt='{$safe_alt}' src='{$default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />"; |
| 1628 | } |
| 1629 | |
| 1630 | return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt); |
| 1631 | } |
| 1632 | endif; |
| 1633 | |
| 1634 | if ( !function_exists('wp_setcookie') ) : |
| 1635 | /** |
| 1636 | * Sets a cookie for a user who just logged in. |
| 1637 | * |
| 1638 | * @since 1.5 |
| 1639 | * @deprecated Use wp_set_auth_cookie() |
| 1640 | * @see wp_set_auth_cookie() |
| 1641 | * |
| 1642 | * @param string $username The user's username |
| 1643 | * @param string $password Optional. The user's password |
| 1644 | * @param bool $already_md5 Optional. Whether the password has already been through MD5 |
| 1645 | * @param string $home Optional. Will be used instead of COOKIEPATH if set |