LLMS_Abstract_Generator_Posts::create_post( string $type, array $raw = array(), int $author_id = null )
Generate a new LLMS_Post_Mdel
Description Description
Parameters Parameters
- $type
-
(Required) The LLMS_Post_Model post type type. For example "course" for an
LLMS_Course
ormembership
forLLMS_Membership
. - $raw
-
(Optional) Array of raw, used to create the post.
Default value: array()
- $author_id
-
(Optional) Fallback author ID, used when now author data can be found in
$raw
.Default value: null
Return Return
Source Source
File: includes/abstracts/llms-abstract-generator-posts.php
Changelog Changelog
Version | Description |
---|---|
4.7.1 | Set the post's excerpt during the initial insert instead of during metadata updates after creation. |
4.7.0 | Introduced. |