dozent_course_expirable( int $course_ID )
Check if any course is expirable
Description
You can check if any course is expirable by this function The course may be has subscription model, or instructor set the expiration. If any course has forever access to the student, it will return false, otherwise it will return true.
Example usage:
if( dozent_course_expirable() ){
//code goes here.
}
if( dozent_course_expirable( $course_ID ) ){
//code goes here.
}
Note: You can filter the return result. Filter hook
dozent_course_expirable
See also
Parameters
- $course_ID
-
(int) (Required)
Return
(mixed|void)
Source
File: includes/conditional-functions.php
function dozent_course_expirable( $course_ID = 0 ){ $course_ID = dozent_get_post_id( $course_ID ); $expirable = false; /** * TODO: Implement course expire condition, subscription end condition */ /** * Filter the result which returns dozent_course_expirable(); * * @since DozentLMS 1.0.0 * * @see dozent_course_expirable(); * * @param bool $expirable Expirable * @param int $course_ID Course ID */ return apply_filters( 'dozent_course_expirable', $expirable, $course_ID ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |