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_Post_Model::create( string $title = '' )
Create a new post of the Instantiated Model This can be called by instantiating an instance with “new” as the value passed to the constructor
Description Description
Parameters Parameters
- $title
-
(string) (Optional) Title to create the post with.
Default value: ''
Return Return
(int) WP Post ID of the new Post on success or 0 on error.
Source Source
File: includes/abstracts/abstract.llms.post.model.php
private function create( $title = '' ) { return wp_insert_post( wp_slash( apply_filters( 'llms_new_' . $this->model_post_type, $this->get_creation_args( $title ) ) ), true ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.30.3 | Use wp_slash() for the post title. |
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: