Skip to main content

GF_Blocks

Handles management of Gravity Forms editor blocks.

Since: 2.4.10 (Class GF_Blocks)

Source: includes/blocks/class-gf-blocks.php:15

Details​

  • Kind: class
  • Namespace: (global)

Methods​

MethodDescription
register()Register a block type.
get()Get instance of block.
get_all_types()Returns an array of registered block types.

Method Reference​

register()​

public static function register( $block )

Register a block type.

Parameters​

NameTypeDefaultDescription
$blockGF_BlockBlock class.

Returns​

Since: 2.4.10

Source: includes/blocks/class-gf-blocks.php:34

get()​

public static function get( $block_type )

Get instance of block.

Parameters​

NameTypeDefaultDescription
$block_typestringBlock type.

Returns​

Since: 2.4.10

Source: includes/blocks/class-gf-blocks.php:70

get_all_types()​

public static function get_all_types()

Returns an array of registered block types.

Returns​

  • array

Since: 2.4.18

Source: includes/blocks/class-gf-blocks.php:83