GF_Field_Image_Choice
Source: includes/fields/class-gf-field-image-choice.php:9
Details
- Kind:
class - Namespace:
(global) - Extends: GF_Field_Multiple_Choice
Methods
| Method | Description |
|---|---|
get_form_editor_field_description() | Returns the field's form editor description. |
get_form_editor_field_icon() | Returns the field's form editor icon. |
resize_images_after_import() | Trigger the resizing of images after form import. |
get_image_choice_label_visibility_setting_default() | Get the choice labels visibility setting default for the image choice field. |
get_image_choice_label_visibility_setting() | Get the choice labels visibility setting for the given image choice field. |
get_image_choice_input_visibility_setting() | Get the choice inputs visibility setting for the given image choice field. |
get_merge_tag_img_url() | Returns the image URL for a choice to display in a merge tage with the "img_url" modifier. |
Method Reference
get_form_editor_field_description()
public function get_form_editor_field_description()
Returns the field's form editor description.
Returns
string
Since: 2.5
Source: includes/fields/class-gf-field-image-choice.php:38
get_form_editor_field_icon()
public function get_form_editor_field_icon()
Returns the field's form editor icon.
This could be an icon url or a gform-icon class.
Returns
string
Since: 2.5
Source: includes/fields/class-gf-field-image-choice.php:51
resize_images_after_import()
public static function resize_images_after_import( $forms )
Trigger the resizing of images after form import.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$forms | array | The forms being imported. |
Since: 2.9.3
Source: includes/fields/class-gf-field-image-choice.php:121
get_image_choice_label_visibility_setting_default()
public static function get_image_choice_label_visibility_setting_default( $form_id )
Get the choice labels visibility setting default for the image choice field.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | |||
$field | object | The field object. |
Returns
string
Since: 2.9.0
Source: includes/fields/class-gf-field-image-choice.php:141
get_image_choice_label_visibility_setting()
public static function get_image_choice_label_visibility_setting( $field )
Get the choice labels visibility setting for the given image choice field.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$field | object | The field object. |
Returns
string
Since: 2.9.0
Source: includes/fields/class-gf-field-image-choice.php:164
get_image_choice_input_visibility_setting()
public static function get_image_choice_input_visibility_setting( $field )
Get the choice inputs visibility setting for the given image choice field.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$field | object | The field object. |
Returns
string
Since: 2.9.0
Source: includes/fields/class-gf-field-image-choice.php:177
get_merge_tag_img_url()
public function get_merge_tag_img_url( $value, $input_id, $entry, $form, $field )
Returns the image URL for a choice to display in a merge tage with the "img_url" modifier.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | The value of the merge tag. | |
$input_id | string | The ID of the input. | |
$entry | array | The entry currently being processed. | |
$form | array | The form currently being processed. | |
$field | object | The field currently being processed. |
Returns
string|array
Since: 2.9.0
Source: includes/fields/class-gf-field-image-choice.php:249