LLMS_Post_Model::to_array_extra( array $arr )
Add “extra” data to the post array during export/serialization
Description Description
This method adds two arrays of data, "blocks" and "images".
The "blocks" array is an array of reusable blocks used in the post’s content. During an import these blocks will be imported into the site.
The "images" array is an array of image element source URLs found in the post’s content. During an import these images will be imported into the new site via media sideloading.
Parameters Parameters
- $arr
-
(array) (Required) Post array from
toArray()
.
Return Return
(array[])
Source Source
File: includes/abstracts/abstract.llms.post.model.php
protected function to_array_extra( $arr ) { $arr['_extras'] = array( 'blocks' => empty( $arr['content'] ) ? array() : $this->to_array_extra_blocks( $arr['content'] ), 'images' => empty( $arr['content'] ) ? array() : $this->to_array_extra_images( $arr['content'] ), ); return $arr; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |