Browse: Home / Hooks /

learndash_assignment_check_upload

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.

$uploadfiles

(array) Array of uploaded files.

$post_id

(int) Assignment Post ID.

$post_settings

(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 #

Changelog
Version Description
3.4.0 Introduced.