LLMS_Generator_Courses::create_access_plan( array $raw, int $course_id, int $fallback_author_id = null )
Create a new access plan
Description Description
Parameters Parameters
- $raw
-
(Required) Raw Access Plan Data.
- $course_id
-
(Required) WP Post ID of a LLMS Course to assign the access plan to.
- $fallback_author_id
-
(Optional) WP User ID to use for the access plan author if no author is supplied in the raw data. Default is
null
. When not supplied the fall back will be on the current user ID.Default value: null
Return Return
(int)
Source Source
File: includes/class-llms-generator-courses.php
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Sideload images attached to the post, use create_post() from abstract, add hooks. |
4.3.3 | Use an empty string in favor of null for an empty post_content field. |
3.7.3 | Unknown. |
3.3.0 | Introduced. |