learndash_assignment_force_delete

apply_filters( 'learndash_assignment_force_delete',  boolean $force_delete,  int $assignment_id,  WP_POST $assignment_post )

Filters whether to force delete the assignment or not.


Description #


Parameters #

$force_delete

(boolean) Whether to force delete assignment or not.

$assignment_id

(int) Assignment ID.

$assignment_post

(WP_POST) Assignment post object.


Source #

File: includes/ld-assignment-uploads.php


Examples #

 <?php
/**
 * Example usage for learndash_assignment_force_delete filter.
 */
add_filter(
	'learndash_assignment_force_delete',
	function( $force_delete, $assignment_id, $assignment_post ) {
		// May add any custom logic using $force_delete, $assignment_id, $assignment_post.

		// Always return $force_delete.
		return $force_delete;
	},
	10,
	3
);