LLMS_Forms::parse_blocks( string $content )

Parse the post_content of a form into a list of WP_Block arrays.

Description Description

This method parses the blocks, loads block data from any reusable blocks, and cascades visibility attributes onto a block’s innerBlocks.

Top ↑

Parameters Parameters


(string) (Required) Post content HTML.

Top ↑

Return Return

(array[]) Array of parsed block arrays.

Top ↑

Source Source

File: includes/forms/class-llms-forms.php

	 * @param string $content Post content HTML.
	 * @return array[] Array of parsed block arrays.
	public function parse_blocks( $content ) {

		$blocks = parse_blocks( $content );

		$blocks = $this->load_reusable_blocks( $blocks );

		$blocks = $this->cascade_visibility_attrs( $blocks );

Top ↑

Changelog Changelog

Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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