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 #
- $post_id
-
(int) (Required) Post ID.
- $fname
-
(string) (Required) Assignment file name.
- $file_uploaded_name
-
(string) (Optional) Assignment file uploaded name. Optional.
Default value: ''
Return #
(void)
Source #
Changelog #
| Version | Description |
|---|---|
| 4.24.0 | Added the uploaded_file_name meta field. The assignment post titles are based on the originally uploaded file names only now, they used to be "Assignment {filename}". |
| 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. |