Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_get_avatar_data

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
3519       * Passing a non-null value in the 'url' member of the return array will
3520       * effectively short circuit get_avatar_data(), passing the value through
3521       * the {@see 'get_avatar_data'} filter and returning early.
3522       *
3523       * @since 4.2.0
3524       *
3525       * @param array             $args          Arguments passed to get_avatar_data(), after processing.
3526       * @param int|object|string $id_or_email   A user ID, email address, or comment object.
3527       */
3528      $args = apply_filters( 'pre_get_avatar_data', $args, $id_or_email );
3529
3530      if ( isset( $args['url'] ) && ! is_null( $args['url'] ) ) {
3531           /** This filter is documented in wp-includes/link-template.php */
3532           return apply_filters( 'get_avatar_data', $args, $id_or_email );
3533      }
3534
3535      $email_hash = '';
3536      $user = $email = false;
3537