learndash_assignment_upload_user_check

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 #

File: includes/ld-assignment-uploads.php


Examples #

 <?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
);