apply_filters( 'learndash_assignment_check_upload', bool , array $uploadfiles , int $post_id , array $post_settings )
Filter to allow exteral approval of Assignment upload.
Description Description
Parameters Parameters
-
true True if Assignment has been approved.
- $uploadfiles
-
Array of uploaded files.
- $post_id
-
Assignment Post ID.
- $post_settings
-
Array of Assignment Post Settings.
Return 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 Source
File: includes/ld-assignment-uploads.php
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |