Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Form_Templates::get_block_data( string $field_id, boolean $confirm = true )
Retrieve data for a given field by id
Parameters Parameters
- $field_id
-
(string) (Required) The field's identifier as found in the block schema list returned by LLMS_Form_Templates::get_reusable_block_schema().
- $confirm
-
(boolean) (Optional) If
trueand the schema includes a confirmation field, will convert the field to a confirm group.Default value: true
Return Return
(array) Returns an array containing the block data and title.
Source Source
File: includes/forms/class-llms-form-templates.php
unset( $block['title'] );
if ( $confirm && ! empty( $block['confirm'] ) ) {
$block = self::add_confirm_group( $block );
}
$block = self::prepare_blocks( array( $block ) );
return compact( 'title', 'block' );
}
/**
* Creates a WP_Block array definition for the confirmation (controlled) block in a confirm group
*
* @since 5.0.0
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |