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.
Return Return
(string)
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 );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.9.0 | Pass an empty string to strpos() instead of null . |
5.0.0 | Introduced. |