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_Data::has_username_block( array[] $blocks )
Locate a username/user login block within a list of blocks
Description Description
Checks into innerBlocks recursively.
Parameters Parameters
- $blocks
-
(array[]) (Required) Array of WP_Block definition arrays.
Return Return
(boolean) Returns true
when a username block is found, otherwise returns false
.
Source Source
File: includes/forms/class-llms-forms-data.php
private function has_username_block( $blocks ) { foreach ( $blocks as $block ) { if ( 'llms/form-field-user-login' === $block['blockName'] ) { return true; } elseif ( $block['innerBlocks'] ) { if ( $this->has_username_block( $block['innerBlocks'] ) ) { return true; } } } return false; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |