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.


Top ↑

Parameters Parameters

$arr

(array) (Required) Post array from toArray().


Top ↑

Return Return

(array[])


Top ↑

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;

	}

Top ↑

Changelog 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.