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.


Top ↑

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' ), ), ) );


Top ↑

Source Source

File: includes/ld-assignment-uploads.php


Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.