LLMS_Abstract_Generator_Posts::set_metadata( LLMS_Post_Model $post, array $raw )
Set all metadata for a given post object
Description Description
This method will only set metadata for registered LLMS_Post_Model properties.
Parameters Parameters
- $post
-
(LLMS_Post_Model) (Required) An LLMS post object.
- $raw
-
(array) (Required) Array of raw data.
Return Return
(void)
Source Source
File: includes/abstracts/llms-abstract-generator-posts.php
protected function set_metadata( $post, $raw ) { // Set all metadata. foreach ( array_keys( $post->get_properties() ) as $key ) { if ( isset( $raw[ $key ] ) ) { $post->set( $key, $raw[ $key ] ); } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |