apply_filters( 'learndash_assignment_upload_user_check', boolean $allow_upload, int $course_id, int $post_id )
Filters whether to allow assignment for non logged in users.
Description #
Parameters #
- $allow_upload
-
(boolean) Whether to allow assignment upload for non logged in users.
- $course_id
-
(int) Course ID.
- $post_id
-
(int) Post ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_assignment_upload_user_check filter.
*/
add_filter(
'learndash_assignment_upload_user_check',
function( $allow_upload, $course_id, $post_id ) {
// May add any custom logic using $allow_upload, $course_id, $post_id.
// Always return $allow_upload.
return $allow_upload;
},
10,
3
);