dozent_course_is_protected( null $course = null )
Determine if a course is protected
Description
The course is publicly accessible. Anyone can access its content without the need to be logged-in or enrolled.
Example usage:
$is_protected_course = dozent_course_is_protected( $course );
See also
Parameters
- $course
-
(null) (Optional)
Default value: null
Return
(mixed|void)
Source
File: includes/conditional-functions.php
function dozent_course_is_protected( $course = null ) { $is_protected = dozent_get_course_price_type( $course ) === 'protected'; /** * Filter the return value of dozent_course_is_protected(); function * * The course is free. Anyone can access its content by log-in into the site. * * @since DozentLMS 1.0.0 * * @param bool $is_protected Determine if the course is protected * @param int|object $course Post object */ return apply_filters( 'dozent_course_is_protected', $is_protected, $course ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |