Skip to main content

GF_Block_Form

Source: includes/blocks/class-gf-block-form.php:8

Details

  • Kind: class
  • Namespace: (global)
  • Extends: GF_Block

Properties

PropertyTypeDescription
$typestringBlock type.
$script_handlestringHandle of primary block script.
$style_handlestringHandle of primary block style.

Methods

MethodDescription
get_instance()Get instance of this class.
scripts()Register scripts for block.
localize_script()Localize Form block script.
styles()Register styles for block.
render_block()Display block contents on frontend.

Method Reference

get_instance()

public static function get_instance()

Get instance of this class.

Returns

Since: 2.4.10

Source: includes/blocks/class-gf-block-form.php:64

scripts()

public function scripts()

Register scripts for block.

Returns

  • array

Since: 2.4.10

Source: includes/blocks/class-gf-block-form.php:94

localize_script()

public function localize_script( $script=[] )

Localize Form block script.

Parameters

NameTypeDefaultDescription
$scriptarray[]Script arguments.

Since: 2.4.10

Source: includes/blocks/class-gf-block-form.php:105

styles()

public function styles()

Register styles for block.

Returns

  • array

Since: 2.4.10

Source: includes/blocks/class-gf-block-form.php:130

render_block()

public function render_block( $attributes=[] )

Display block contents on frontend.

Parameters

NameTypeDefaultDescription
$attributesarray[]Block attributes.

Returns

  • string

Since: 2.4.10

Source: includes/blocks/class-gf-block-form.php:178