LLMS_Post_Model::to_array_extra_blocks( string $content )
Add reusable blocks found in the post’s content to the post’s array
Parameters Parameters
- $content
-
(string) (Required) Raw
post_contentstring.
Return Return
(array[]) Array of reusable block information arrays. The array key is the WP_Post ID of the reusable block.
- 'title'
(string) Reusable block title. - 'content'
(string) Reusable block content.
Source Source
File: includes/abstracts/abstract.llms.post.model.php
'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;
}
/**
* Add reusable blocks found in the post's content to the post's array
*
* @since 4.7.0
*
* @param string $content Raw `post_content` string.
* @return array[] {
* Array of reusable block information arrays. The array key is the WP_Post ID of the reusable block.
*
* @type string $title Reusable block title.
* @type string $content Reusable block content.
* }
*/
protected function to_array_extra_blocks( $content ) {
$blocks = array();
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |