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 or membership for LLMS_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


Top ↑

Return Return

(LLMS_Post_Model)


Top ↑

Source Source

File: includes/abstracts/llms-abstract-generator-posts.php


			

Top ↑

Changelog 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.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.