AnsPress_Avatar_Hook::get_avatar( string $args, integer|string $id_or_email )

Description #

Override get_avatar.

Parameters #

  • $args
    string (Required) Avatar image.
  • $id_or_email
    integer | string (Required) User id or email.

Source #

File: addons/free/avatar.php

	public static function get_avatar( $args, $id_or_email ) {
		$override = apply_filters( 'ap_pre_avatar_url', false, $args, $id_or_email );

		// Return if override is not false.
		if ( false !== $override ) {
			return $override;
		}

		$args['default'] = ap_generate_avatar( $id_or_email );

		// Set default avatar url.
		if ( ap_opt( 'avatar_force' ) ) {
			$args['url'] = ap_generate_avatar( $id_or_email );
		}

		return $args;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment