bp_core_fetch_avatar

  • apply_filters( 'bp_core_fetch_avatar', '<img src="' . $avatar_url . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, 

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-avatars.php :: Trac Source Line: 243
      		// Close the avatar directory
      		closedir( $av_dir );
      
      		// If we found a locally uploaded avatar
      		if ( isset( $avatar_url ) ) {
      
      			// Return it wrapped in an <img> element
      			if ( true === $html ) {
      				return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $avatar_url . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
      
      			// ...or only the URL
      			} else {
      				return apply_filters( 'bp_core_fetch_avatar_url', $avatar_url );
      			}
      		}
      	}
      
      	// If no avatars could be found, try to display a gravatar
      
  • apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $h

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-avatars.php :: Trac Source Line: 298
      		$email    = apply_filters( 'bp_core_gravatar_email', $email, $item_id, $object );
      		$gravatar = apply_filters( 'bp_gravatar_url', $host ) . md5( strtolower( $email ) ) . '?d=' . $default_grav . '&amp;s=' . $grav_size;
      
      	} else {
      		// No avatar was found, and we've been told not to use a gravatar.
      		$gravatar = apply_filters( "bp_core_default_avatar_$object", BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg', $params );
      	}
      
      	if ( true === $html )
      		return apply_filters( 'bp_core_fetch_avatar', '<img src="' . $gravatar . '" alt="' . esc_attr( $alt ) . '" class="' . esc_attr( $class ) . '"' . $css_id . $html_width . $html_height . $title . ' />', $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
      	else
      		return apply_filters( 'bp_core_fetch_avatar_url', $gravatar );
      }
      
      /**
       * Delete an existing avatar
       *
       * Accepted values for $args are:
       *  item_id - item id which relates to the object type.
       *  object - the objetc type user, group, blog, etc.
      

Comments are closed.