GravityView_Social_Register_Field
Handle registering the social field in GravityView
Source: includes/class-gravityview-social-register-field.php:6
Details
- Kind:
class - Namespace:
(global)
Methods
| Method | Description |
|---|---|
add_default_field() | Add Sharing Field as a default field, outside those set in the Gravity Form form |
add_field_to_blocklist() | Prevent users from being able to edit the field |
field_options_from_template_options() | Remaps the current gk/gravityview/template/options hook to the legacy field options callback. |
add_template_path() | Include this extension templates path |
Method Reference
add_default_field()
function add_default_field( $entry_default_fields, $form=[], $zone='' )
Add Sharing Field as a default field, outside those set in the Gravity Form form
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry_default_fields | array | Existing fields | |
$form | string | array | [] | form_ID or form object |
$zone | string | '' | Either 'single', 'directory', 'header', 'footer' |
Source: includes/class-gravityview-social-register-field.php:58
add_field_to_blocklist()
function add_field_to_blocklist( $fields, $context=NULL )
Prevent users from being able to edit the field
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$fields | array | Array of field types not editable by users | |
$context | NULL |
Source: includes/class-gravityview-social-register-field.php:78
field_options_from_template_options()
public function field_options_from_template_options( $field_options, $field_type, $template_id, $context, $grouped, $form_id, $field_id, $input_type )
Remaps the current gk/gravityview/template/options hook to the legacy field options callback.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$field_options | array | The field options. | |
$field_type | string | The field type (widget or field). | |
$template_id | string | The template ID. | |
$context | string | The context. | |
$grouped | bool | Whether the options should be grouped. | |
$form_id | int | The form ID. | |
$field_id | string | GF Field ID. | |
$input_type | string | The input type. |
Returns
array— The filtered options.
Since: TBD
Source: includes/class-gravityview-social-register-field.php:113
add_template_path()
function add_template_path( $file_paths )
Include this extension templates path
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$file_paths | array | List of template paths ordered |
Source: includes/class-gravityview-social-register-field.php:162