Browse: Home / Functions /


learndash_upload_assignment_init( int $post_id,  string $fname,  string $file_uploaded_name = '' )

Handles an assignment uploading process after the file was loaded.

Description #

Updates assignment post meta with assignment data, creates a new assignment post, redirects to the needed page.

Parameters #


(int) (Required) Post ID.


(string) (Required) Assignment file name.


(string) (Optional) Assignment file uploaded name. Optional.

Default value: ''

Return #


Source #

File: includes/ld-assignment-uploads.php

Changelog #

Version Description
4.10.3 Assignments have a learndash_version meta field to help distinguish between old and new assignments. Added the $file_uploaded_name parameter.
2.1.0 Introduced.