Skip to main content

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

MethodDescription
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

NameTypeDefaultDescription
$entry_default_fieldsarrayExisting fields
$formstring | array[]form_ID or form object
$zonestring''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

NameTypeDefaultDescription
$fieldsarrayArray of field types not editable by users
$contextNULL

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

NameTypeDefaultDescription
$field_optionsarrayThe field options.
$field_typestringThe field type (widget or field).
$template_idstringThe template ID.
$contextstringThe context.
$groupedboolWhether the options should be grouped.
$form_idintThe form ID.
$field_idstringGF Field ID.
$input_typestringThe 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

NameTypeDefaultDescription
$file_pathsarrayList of template paths ordered

Source: includes/class-gravityview-social-register-field.php:162