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::get_block_tree( array $block, array[] $block_list )

Returns a filtered version of $block_list containing only the passed $block and its parents.


Parameters Parameters

$block

(array) (Required) Parsed block array.

$block_list

(array[]) (Required) The list of WP Block array $block comes from.


Top ↑

Return Return

(array[]) Filtered version of $block_list containing only the passed $block and its parents. Or an empty array if $block cannot be found within $block_list.


Top ↑

Source Source

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

					// Re-index.
					$_block['innerContent'] = array_values( $_block['innerContent'] );
				}

				return array( $_block );
			}
		}

		return array();
	}

	/**
	 * Installation function to install core forms.
	 *
	 * @since 5.0.0
	 *
	 * @param bool $recreate Whether or not to recreate an existing form. This is passed to `LLMS_Forms::create()`.
	 * @return WP_Post[] Array of created posts. Array key is the location id and array value is the WP_Post object.
	 */
	public function install( $recreate = false ) {

		$installed = array();

		foreach ( array_keys( $this->get_locations() ) as $location ) {
			$installed[ $location ] = $this->create( $location, $recreate );
		}

		return $installed;
	}

	/**
	 * Determines if a location is a valid & registered form location
	 *
	 * @since 5.0.0

Top ↑

Changelog Changelog

Changelog
Version Description
5.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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