Browse: Home / Hooks /


apply_filters( 'learndash_assignment_check_upload',  bool ,  array $uploadfiles,  int $post_id,  array $post_settings )

Filter to allow exteral approval of Assignment upload.

Description #

Parameters #

(bool) true True if Assignment has been approved.


(array) Array of uploaded files.


(int) Assignment Post ID.


(array) Array of Assignment Post Settings.

Return #

(bool) true if upload is approved. false if not. The external processor should set a usermeta entry 'ld_assignment_message' with the error message. This will be shown to the user. Example: update_user_meta( get_current_user_id(), 'ld_assignment_message', array( array( 'type' => 'error', 'message' => esc_html__( 'Number of allowed assignment uploads reached.', 'learndash' ), ), ) );

Source #

File: includes/ld-assignment-uploads.php

Changelog #

Version Description
3.4.0 Introduced.