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::get_reusable_block_schema( string $field_id )

Retrieves the schema definition for a default/core reusable block


Parameters Parameters

$field_id

(string) (Required) The field's identifier as found in the block schema list returned by LLMS_Form_Templates::get_reusable_block_schema().


Top ↑

Return Return

(array) The block definition schema. This is a WP_Block array definition but missing some data that is automatically populated before serialization.


Top ↑

Source Source

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

	private static function get_reusable_block_schema( $field_id ) {

		$list = require LLMS_PLUGIN_DIR . 'includes/schemas/llms-reusable-blocks.php';

		$definition = empty( $list[ $field_id ] ) ? array() : self::prepare_block_attrs( $list[ $field_id ] );

		/**
		 * Filters the result of a schema definition.
		 *
		 * This hook can be used to add definitions for custom (non-core) fields or to modify a core definition.
		 *
		 * @since 5.0.0
		 *
		 * @param array  $definition The schema definition.
		 * @param string $field_id   The field's identifier as found in the block schema list returned by LLMS_Form_Templates::get_reusable_block_schema().
		 */
		return apply_filters( 'llms_get_reusable_block_schema', $definition, $field_id );

	}


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.