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::set_required_atts( array $block, boolean $required )

Modifies the required block attribute


Parameters Parameters

$block

(array) (Required) A WP_Block definition array.

$required

(boolean) (Required) Desired value of the required attribute.


Top ↑

Source Source

File: includes/forms/class-llms-form-templates.php

	private static function set_required_atts( $block, $required ) {

		if ( isset( $block['attrs']['required'] ) && 'llms/form-field-user-address-street-secondary' !== $block['blockName'] ) {
			$block['attrs']['required'] = $required;
		}

		foreach ( $block['innerBlocks'] as &$inner_block ) {
			$inner_block = self::set_required_atts( $inner_block, $required );
		}

		return $block;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.