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

$content

(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 array   $attrs      LLMS_Form_Field settings array for the field.
	 * @param array   $block      WP_Block settings array.
	 * @param array[] $block_list The list of WP Block array `$block` comes from.
	 * @return array
	 */
	public function prepare_field_for_free_enroll_form( $attrs, $block, $block_list ) {

		if ( ! $this->is_block_visible_in_list( $block, $block_list ) ) {
			return array();
		}


Top ↑

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