bp_gravatar_url

  • apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' )

    Source Reference:

    • Component: BuddyPress :: bp-members
      File: /bp-members/bp-members-template.php :: Trac Source Line: 1122
      			// Set default gravatar type
      			if ( empty( $bp->grav_default->user ) )
      				$default_grav = 'wavatar';
      			else if ( 'mystery' == $bp->grav_default->user )
      				$default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg';
      			else
      				$default_grav = $bp->grav_default->user;
      
      			// Create
      			$gravatar_url    = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
      			$md5_lcase_email = md5( strtolower( bp_get_signup_email_value() ) );
      			$gravatar_img    = '<img src="' . $gravatar_url . $md5_lcase_email . '?d=' . $default_grav . '&amp;s=' . $size . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
      		}
      
      		return apply_filters( 'bp_get_signup_avatar', $gravatar_img, $args );
      	}
      
      function bp_signup_allowed() {
      	echo bp_get_signup_allowed();
      }
      
  • apply_filters( 'bp_gravatar_url', $host ) . md5( strtolower( $email ) )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-avatars.php :: Trac Source Line: 290
      		// Set host based on if using ssl
      		if ( is_ssl() )
      			$host = 'https://secure.gravatar.com/avatar/';
      		else
      			$host = 'http://www.gravatar.com/avatar/';
      
      		// Filter gravatar vars
      		$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 );
      

Comments are closed.