dozent_get_profile_photo_id( int|string|stdClass|WP_User $id )

Get the user profile photo ID


Description

Leave empty parameter to get profile photo from the current user ID.

Example usage:

dozent_get_profile_photo_id();

Parameters

$id

(int|string|stdClass|WP_User) (Required) User's ID, a WP_User object, or a user object from the DB.


Return

(mixed|void)


Source

File: includes/user-functions.php

	function dozent_get_profile_photo_id( $id = 0 ) {

		if ( ! $id ) {
			$user = wp_get_current_user();
		} else {
			$user = new WP_User( $id );
		}

		$photo_id = get_user_meta( $user->ID, '_dozent_profile_photo', true );

		/**
		 * Filter the profile photo id returned by dozent_get_profile_photo_id();
		 *
		 * @since DozentLMS 1.0.0
		 */

		return apply_filters( 'dozent_get_profile_photo_id', $photo_id, $user );
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.