LLMS_Forms::render_field_block( string $html, array $block )

Render form field blocks.


Parameters Parameters

$html

(string) (Required) Block HTML.

$block

(array) (Required) Array of block information.


Top ↑

Return Return

(string)


Top ↑

Source Source

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

	 * @param array  $block Array of block information.
	 * @return string
	 */
	public function render_field_block( $html, $block ) {

		// Return HTML for any non llms/form-field blocks.
		if ( false === strpos( $block['blockName'] ?? '', 'llms/form-field-' ) ) {
			return $html;
		}

		if ( ! empty( $block['innerBlocks'] ) ) {

			$inner_blocks = array_map( 'render_block', $block['innerBlocks'] );
			return implode( "\n", $inner_blocks );

		}

		$attrs = $this->block_to_field_settings( $block );



Top ↑

Changelog Changelog

Changelog
Version Description
5.9.0 Pass an empty string to strpos() instead of null.
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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