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::prepare_block_attrs( array $block )
Prepares block attributes for a given reusable block
Description Description
This method loads a reusable block from the blocks schema and attempts to locate a user information field for the given field block from the user information fields schema.
The field is matched by the block’s "id" attribute which should match a user information field’s "name" attribute.
When a match is found, the information field data is merged into the block data and the settings are converted from field settings to block attributes.
Parameters Parameters
- $block
-
(array) (Required) A partial WP_Block array used to create a reusable block.
Return Return
(array)
Source Source
File: includes/forms/class-llms-form-templates.php
}
return $block;
}
/**
* Recursively prepare a list of blocks to ensure it can be passed into serialize_blocks() without error
*
* @since 5.0.0
*
* @param array[] $blocks Array of WP_Block definition arrays.
* @return array[]
*/
private static function prepare_blocks( $blocks ) {
foreach ( $blocks as &$block ) {
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |