dozent_is_instructor_approved( int $instructor_id )


Parameters

$instructor_id

(int) (Required) instructor ID will be current user ID if leave it blank


Return

(mixed|void) Determine if an user is approved instructor


Source

File: includes/core-functions.php

	function dozent_is_instructor_approved( $instructor_id = 0 )
	{
		$instructor_id = dozent_get_user_id( $instructor_id );

		$is_approved_instructor = false;
		if ($instructor_id) {

			$is_instructor = dozent_is_instructor( $instructor_id ) ;

			if ( dozent_is_instructor( $instructor_id ) ) {
				$instructor_status = dozent_instructor_status($instructor_id);

				if ($instructor_status->status === 'approved') {
					$is_approved_instructor = true;
				}

			}

		}

		return apply_filters('dozent_is_instructor_approved', $is_approved_instructor, $instructor_id);
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.