GF_Block_Form
Source: includes/blocks/class-gf-block-form.php:8
Details
- Kind:
class - Namespace:
(global) - Extends: GF_Block
Properties
| Property | Type | Description |
|---|---|---|
$type | string | Block type. |
$script_handle | string | Handle of primary block script. |
$style_handle | string | Handle of primary block style. |
Methods
| Method | Description |
|---|---|
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
| Name | Type | Default | Description |
|---|---|---|---|
$script | array | [] | 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
| Name | Type | Default | Description |
|---|---|---|---|
$attributes | array | [] | Block attributes. |
Returns
string
Since: 2.4.10
Source: includes/blocks/class-gf-block-form.php:178