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


(string) (Required) Raw post_content string.

Top ↑

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.

Top ↑

Source Source

File: includes/abstracts/abstract.llms.post.model.php


	 * Called before data is sorted and returned by $this->toArray()
	 * Extending classes should override this data if custom data should
	 * be added when object is converted to an array or json.
	 * @since 3.3.0
	 * @param array $arr Array of data to be serialized.
	 * @return array
	protected function toArrayAfter( $arr ) {
		return $arr;

	 * Add "extra" data to the post array during export/serialization
	 * 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.

Top ↑

Changelog Changelog

Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.