LLMS_Post_Model
LLMS_Post_Model abstract class
Description Description
Source Source
File: includes/abstracts/abstract.llms.post.model.php
Changelog Changelog
Version | Description |
---|---|
3.36.1 | In set_bulk() method, use WP_Error::$errors in place of WP_Error::has_errors() to support WordPress version prior to 5.1. |
3.34.0 | Refresh the whole $post property with the just updated instance of WP_Post after updating it. |
3.31.0 | Treat post_excerpt fields as HTML instead of plain text. |
3.30.3 | Use wp_slash() when creating new posts. |
3.30.2 | Add filter to allow 3rd parties to prevent a field from being added to the custom field array. |
3.30.0 | Improve handling of custom field data to toArrayCustom() . |
3.0.0 | Introduced. |
Methods Methods
- ___get — Private getter.
- __construct — Constructor
- __get — Magic Getter
- __isset — Magic Isset
- __set — Magic Setter
- _e — Wrapper for the $this->translate() that echos the result rather than returning it
- add_properties — Allow extending classes to add custom meta properties to the object
- after_create — Called immediately after creating / inserting a new post into the database
- allowed_post_tags_set — Modify allowed post tags for wp_kses for this post
- allowed_post_tags_unset — Remove modified allowed post tags for wp_kses for this post
- clone_post — Clones the Post if the post is cloneable
- create — Create a new post of the Instantiated Model
- export — Trigger an export download of the given post type
- get — Getter
- get_array — Getter for array values
- get_creation_args — An array of default arguments to pass to $this->create() when creating a new post
- get_date — Getter for date strings with optional date format conversion
- get_date_format — Retrieve the default date format for the post model
- get_default_value — Get the default value of a property
- get_embed — Get media embeds
- get_image — Retrieve URL for an image associated with the post
- get_post_properties — Retrieve an array of post properties
- get_post_type_data — Retrieve the Post's post type data object
- get_post_type_label — Retrieve a label from the post type data object's labels object
- get_price — Getter for price strings with optional formatting options
- get_properties — Retrieve an array of properties defined by the model
- get_property_defaults — Retrieve the default values for properties
- get_property_type — Get a property's data type for scrubbing
- get_status_name — Retrieve the registered Label of the post's current status
- get_terms — Get an array of terms for a given taxonomy for the post
- get_unsettable_properties — Array of properties which *cannot* be set
- is_cloneable — Determine if the associated post is exportable
- is_exportable — Determine if the associated post is exportable
- jsonSerialize — Format the object for json serialization
- scrub — Scrub field according to it's type
- scrub_field — Scrub fields according to datatype
- set — Setter
- set_bulk — Bulk setter
- set_terms — Update terms for the post for a given taxonomy
- to_array_extra — Add "extra" data to the post array during export/serialization
- to_array_extra_blocks — Add reusable blocks found in the post's content to the post's array
- to_array_extra_images — Add images found in the post's content to the post's array
- toArray — Coverts the object to an associative array
- toArrayAfter — Called before data is sorted and returned by $this->toArray()
- toArrayCustom — Called by toArray to add custom fields via get_post_meta()
- translate — Wrapper for $this-get() which allows translation of the database value before outputting on screen