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_Forms::prepare_field_for_free_enroll_form( array $attrs, array $block, array[] $block_list )
Modifies a field for usage in the “free enrollment” checkout form
Description Description
If the block is not visible (according to LLMS block-level visibility settings) it will return an empty array (signaling the field to be removed).
Otherwise the block will be converted to a hidden field.
This method is a filter callback and is intended for internal use only.
Backwards incompatible changes and/or method removal may occur without notice.
Parameters Parameters
- $attrs
-
(array) (Required) LLMS_Form_Field settings array for the field.
- $block
-
(array) (Required) WP_Block settings array.
- $block_list
-
(array[]) (Required) The list of WP Block array
$block
comes from.
Return Return
(array)
Source Source
File: includes/forms/class-llms-forms.php
* @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(); } $attrs['type'] = 'hidden';
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.1.0 | Added $block_list param. |
5.0.0 | Introduced. |