apply_filters( 'ld_course_access_from', int $access_from, int $course_id, int $user_id )
Filters the amount of time when a lesson becomes available to the user.
Description #
Parameters #
- $access_from
-
(int) The timestamp of when the lesson wil become available to user.
- $course_id
-
(int) Course ID.
- $user_id
-
(int) User ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for ld_course_access_from filter.
*/
add_filter(
'ld_course_access_from',
function( $access_from, $course_id, $user_id ) {
// May add any custom logic using $access_from, $course_id, $user_id.
// Always return $access_from.
return $access_from;
},
10,
3
);
Changelog #
| Version | Description |
|---|---|
| 3.0.7 | Introduced. |