GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Public Member Functions | |
__construct () | |
field_options ( $field_options, $template_id, $field_id, $context, $input_type, $form_id) | |
get_field_input ( $form, $field_value, $entry, $field) | |
Trick the GF fileupload field to render with the proper HTML ID to enable the plupload JS to work properly. More... | |
Public Member Functions inherited from GravityView_Field | |
__construct () | |
GravityView_Field constructor. More... | |
_filter_gform_custom_merge_tags ( $custom_merge_tags=array(), $form_id=0, $fields=array(), $element_id='') | |
Add custom merge tags to merge tag options. More... | |
_filter_gform_replace_merge_tags ( $text, $form=array(), $entry=array(), $url_encode=false, $esc_html=false) | |
Match the merge tag in replacement text for the field. More... | |
_filter_sortable_fields ( $not_sortable) | |
Use field settings to modify whether a field is sortable. More... | |
add_entry_meta ( $entry_meta) | |
Add the custom entry meta key to make it searchable and sortable. More... | |
add_field_support ( $key, &$field_options) | |
add_sortable_field ( $fields) | |
Add the field to the Filter & Sort available fields. More... | |
as_array () | |
Returns the field as an array to be used in field pickers. More... | |
field_options ( $field_options, $template_id, $field_id, $context, $input_type, $form_id) | |
Tap in here to modify field options. More... | |
replace_merge_tag ( $matches=array(), $text='', $form=array(), $entry=array(), $url_encode=false, $esc_html=false) | |
Run GravityView filters when using GFCommon::replace_variables() More... | |
set_default_search_label ( $label='', $gf_field=null, $field=array()) | |
Allow setting a default search label for search fields based on the field type. More... | |
Static Public Member Functions | |
static | get_files_array ( $value, $gv_class, $context=null) |
Return an array of files prepared for output. More... | |
Data Fields | |
$_gf_field_class_name = 'GF_Field_FileUpload' | |
$group = 'advanced' | |
$icon = 'dashicons-upload' | |
$is_searchable = true | |
$name = 'fileupload' | |
$search_operators = array( 'contains' ) | |
Data Fields inherited from GravityView_Field | |
$_gf_field_class_name | |
$contexts = array( 'single', 'multiple', 'edit', 'export' ) | |
$default_search_label | |
$description | |
$entry_meta_is_default_column = false | |
$entry_meta_key = null | |
$entry_meta_update_callback = null | |
$group | |
standard , advanced , post , pricing , meta , gravityview , or add-ons More... | |
$icon = 'dashicons-admin-generic' | |
$is_numeric | |
boolean Is field content number-based? More... | |
$is_searchable = true | |
$is_sortable = true | |
boolean Can the field be sorted in search? More... | |
$label | |
$name | |
$search_operators | |
Static Private Member Functions | |
static | get_file_info ( $file_path, $field, $field_settings, $context, $index) |
Prepares information about the file. More... | |
static | replace_insecure_wp_shortcode_output ( $rendered='', $insecure_file_path='', $secure_file_path='') |
Replaces insecure file paths with secure file paths for WordPress media shortcode output. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from GravityView_Field | |
custom_merge_tags ( $form=array(), $fields=array()) | |
Add custom Merge Tags to Merge Tag options, if custom Merge Tags exist. More... | |
is_choice_value_enabled () | |
Check whether the enableChoiceValue flag is set for a GF field. More... | |
Protected Attributes inherited from GravityView_Field | |
$_custom_merge_tag = false | |
$_field_id = '' | |
$_field_options = array() | |
Definition at line 8 of file class-gravityview-field-fileupload.php.
__construct | ( | ) |
Definition at line 22 of file class-gravityview-field-fileupload.php.
field_options | ( | $field_options, | |
$template_id, | |||
$field_id, | |||
$context, | |||
$input_type, | |||
$form_id | |||
) |
Definition at line 27 of file class-gravityview-field-fileupload.php.
References $field, $field_id, $form_id, and GF_Field\by_id().
get_field_input | ( | $form, | |
$field_value, | |||
$entry, | |||
$field | |||
) |
Trick the GF fileupload field to render with the proper HTML ID to enable the plupload JS to work properly.
array | $form | The Form Object currently being processed. |
string | array | $value | The field value. From default/dynamic population, $_POST, or a resumed incomplete submission. |
null | array | $entry | Null or the Entry Object currently being edited. |
GF_Field_FileUpload | $field | Gravity Forms field |
Definition at line 80 of file class-gravityview-field-fileupload.php.
References $entry, $field, $field_value, and GV\$form.
|
staticprivate |
Prepares information about the file.
string | $file_path | The file path as returned from Gravity Forms. |
GF_Field_FileUpload | $field | The file upload field. |
array | $field_settings | GravityView settings for the field { |
\GV\Template_Context | $context | |
int | $index | The index of the current file in the array of files. |
gravityview/fields/fileupload/extension
Modify the file extension before it's used in display logic string | $extension | The extension of the file, as parsed by pathinfo() . |
string | $file_path | Path to the file uploaded by Gravity Forms. |
gravityview/fields/fileupload/file_path
Modify the file path before generating a link to it string | $file_path | Path to the file uploaded by Gravity Forms |
array | $field_settings | Array of GravityView field settings |
\GV\Template_Context | $context | The context. |
int | $index | The current index of the $file_paths array being processed |
Definition at line 428 of file class-gravityview-field-fileupload.php.
References $field, and $field_settings.
|
static |
Return an array of files prepared for output.
Processes files by file type and generates unique output for each. Returns array for each file, with the following keys:
file_path
=> The file path of the file, with a line breakhtml
=> The file output HTML formattedstring | $value | Field value passed by Gravity Forms. String of file URL, or serialized string of file URL array |
string | $gv_class | Field class to add to the output HTML |
A compatibility array that's required by some of the deprecated filters.
GF_Field_FileUpload $field
gravityview_audio_settings
Modify the settings passed to the wp_video_shortcode()
function array | $audio_settings | Array with src and class keys |
\GV\Template_Context | $context | The context. |
Generate the audio shortcode
gravityview_video_settings
Modify the settings passed to the wp_video_shortcode()
function array | $video_settings | Array with src and class keys |
\GV\Template_Context | $context | The context. |
Generate the video shortcode
Modify the default image attributes for uploaded images
array | $image_atts |
gravityview/fields/fileupload/disable_link
Filter to alter the default behaviour of wrapping images (or image names) with a link to the content object bool | $disable_wrapped_link | whether to wrap the content with a link to the content object. |
array | $field_compat | Current GravityView field array |
\GV\Template_Context | $context | The context. |
Modify the link text (defaults to the file name)
string | $content | The existing anchor content. Could be <img> tag, audio/video embed or the file name |
array | $field_compat | Current GravityView field array |
\GV\Template_Context | $context | The context. |
gravityview/fields/fileupload/link_atts
Modify the link attributes for a file upload field array | string | $link_atts | Array or attributes string |
array | $field_compat | Current GravityView field array |
\GV\Template_Context | $context | The context. |
array | $additional_details | Array of additional details about the file. { string $file_path URL to file. string $insecure_file_path URL to insecure file. } |
gravityview/fields/fileupload/files_array
Modify the files array array | $output_arr | Associative array of files. { string $file_path The path to the file as stored in Gravity Forms. string $content The generated output for the file. } |
array | $field_compat | Current GravityView field array. |
\GV\Template_Context | $context | The context. |
Definition at line 135 of file class-gravityview-field-fileupload.php.
References $alt, $content, $entry, $entry_slug, $field, $field_settings, $field_value, $gravityview_view, $image, $image_atts, $link_atts, $post, $value, GF_Entry\from_entry(), Utils\get(), GravityView_Image\get_image_extensions(), GravityView_View\getInstance(), gravityview(), gravityview_get_context(), and gravityview_get_link().
Referenced by gravityview_get_files_array().
|
staticprivate |
Replaces insecure file paths with secure file paths for WordPress media shortcode output.
The WordPress media shortcodes need to be passed insecure file paths so WordPress can parse the extension] that is being rendered and properly generate the code. Once that shortcode is rendered, we then replace the insecure file paths with the secure file paths used by Gravity Forms.
string | $rendered | The output of the WordPress audio/video shortcodes. |
string | $insecure_file_path | Insecure path to the file, showing the directory structure. |
string | $secure_file_path | Secure file path using Gravity Forms rewrites. |
Definition at line 104 of file class-gravityview-field-fileupload.php.
$_gf_field_class_name = 'GF_Field_FileUpload' |
Definition at line 12 of file class-gravityview-field-fileupload.php.
$group = 'advanced' |
Definition at line 18 of file class-gravityview-field-fileupload.php.
$icon = 'dashicons-upload' |
Definition at line 20 of file class-gravityview-field-fileupload.php.
$is_searchable = true |
Definition at line 14 of file class-gravityview-field-fileupload.php.
$name = 'fileupload' |
Definition at line 10 of file class-gravityview-field-fileupload.php.
$search_operators = array( 'contains' ) |
Definition at line 16 of file class-gravityview-field-fileupload.php.