Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Generator::create_lesson( array $raw, int $order, int $section_id, int $course_id, int $fallback_author_id = null )
Create a new lesson
Parameters Parameters
- $raw
-
(array) (Required) Raw lesson data.
- $order
-
(int) (Required) Lesson order within the section (starts at 1).
- $section_id
-
(int) (Required) WP Post ID of the lesson's parent section.
- $course_id
-
(int) (Required) WP Post ID of the lesson's parent course.
- $fallback_author_id
-
(int) (Optional) author ID to use as a fallback if no raw author data supplied for the lesson.
Default value: null
Return Return
(int|WP_Error) WP_Post ID of the created lesson on success and an error object on failure.
Source Source
File: includes/class.llms.generator.php
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.3.3 | Use an empty string in favor of null for empty post_content and post_excerpt fields. |
3.30.2 | Added hooks. |
3.3.0 | Introduced. |