![]() |
GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
If this file is called directly, abort. More...
Public Member Functions | |
| __construct () | |
| add_custom_column_content ( $column_name=null, $post_id=0) | |
| Add the Data Source information. More... | |
| add_gf_version_css_class ( $class) | |
| Allow targeting different versions of Gravity Forms using CSS selectors. More... | |
| add_post_type_columns ( $columns) | |
| Add the Data Source column to the Views page. More... | |
| add_view_dropdown () | |
| Adds dropdown selects to filter Views by connected form and layout. More... | |
| default_field_blacklist ( $array, $context) | |
| default_field_blocklist ( $array=array(), $context=NULL) | |
| List the field types without presentation properties (on a View context) More... | |
| filter_pre_get_posts (&$query) | |
| get_available_fields ( $form='', $zone=NULL) | |
| Calculate the available fields. More... | |
| get_entry_default_fields ($form, $zone) | |
| Retrieve the default fields id, label and type. More... | |
| get_registered_widgets () | |
| Get the list of registered widgets. More... | |
| register_no_conflict ( $registered) | |
| Add GravityView scripts and styles to Gravity Forms and GravityView No-Conflict modes. More... | |
| render_active_areas ( $template_id, $type, $zone, $rows, $values) | |
| Generic function to render rows and columns of active areas for widgets & fields. More... | |
| render_additional_fields ( $form_id=0, $context='single') | |
| Render html for displaying additional fields based on a Form ID. More... | |
| render_available_fields ( $form_id=0, $context='single') | |
| Render html for displaying available fields based on a Form ID. More... | |
| render_available_widgets () | |
| Render html for displaying available widgets. More... | |
| render_directory_active_areas ( $template_id='', $context='single', $post_id=0, $echo=false, $form_id=0) | |
| Render the Template Active Areas and configured active fields for a given template id and post id. More... | |
| render_field_pickers ( $context='directory', $form_ids=array()) | |
| Renders "Add Field" tooltips. More... | |
| render_label () | |
| render_widgets_active_areas ( $template_id='', $zone='', $post_id='') | |
| Render the widget active areas. More... | |
| save_postdata ( $post_id) | |
| Save View configuration. More... | |
| set_default_view_fields ( $fields=array(), $view=null, $form_id=0) | |
| Set the default fields for new Views. More... | |
| suggest_support_articles ( $localization_data=array()) | |
| When on the Add/Edit View screen, suggest most popular articles related to that. More... | |
| tooltips ( $tooltips=array()) | |
| Add tooltip text for use throughout the UI. More... | |
Static Public Member Functions | |
| static | add_scripts_and_styles ( $hook) |
| Enqueue scripts and styles at Views editor. More... | |
| static | enqueue_gravity_forms_scripts () |
| Enqueue Gravity Forms scripts, needed for Merge Tags. More... | |
| static | get_connected_form_links ( $form, $include_form_link=true) |
| Get HTML links relating to a connected form, like Edit, Entries, Settings, Preview. More... | |
| static | gform_toolbar_menu ( $menu_items=array(), $id=NULL) |
| Add a GravityView menu to the Form Toolbar with connected views. More... | |
| static | render_field_option ( $name='', $option=array(), $curr_value=null) |
| static | render_setting_row ( $key='', $current_settings=array(), $override_input=null, $name='template_settings[%s]', $id='gravityview_se_%s') |
If this file is called directly, abort.
Definition at line 19 of file class-admin-views.php.
| __construct | ( | ) |
Definition at line 23 of file class-admin-views.php.
| add_custom_column_content | ( | $column_name = null, |
|
$post_id = 0 |
|||
| ) |
Add the Data Source information.
| null | $column_name | Name of the column in the Views table. |
| int | $post_id | Post ID. |
Definition at line 433 of file class-admin-views.php.
References GV\$form, $form_id, $output, $template, $templates, gravityview(), gravityview_get_form(), gravityview_get_form_id(), gravityview_get_registered_templates(), and gravityview_get_template_id().
| add_gf_version_css_class | ( | $class | ) |
Allow targeting different versions of Gravity Forms using CSS selectors.
Adds specific version class: .gf-version-2.6.1.3 as well as point updates: .gf-minor-version-2.6.
Definition at line 79 of file class-admin-views.php.
References $class.
Referenced by GravityView_Welcome\getting_started_screen().
| add_post_type_columns | ( | $columns | ) |
Add the Data Source column to the Views page.
| array | $columns | Columns array |
Definition at line 565 of file class-admin-views.php.
References GVCommon\has_cap().
|
static |
Enqueue scripts and styles at Views editor.
| mixed | $hook |
Definition at line 1354 of file class-admin-views.php.
References gravityview(), and GRAVITYVIEW_FILE.
| add_view_dropdown | ( | ) |
Adds dropdown selects to filter Views by connected form and layout.
Definition at line 174 of file class-admin-views.php.
References $current_form, GV\$form, $forms, Utils\_GET(), gravityview_get_forms(), and gravityview_get_registered_templates().
| default_field_blacklist | ( | $array, | |
| $context | |||
| ) |
Definition at line 359 of file class-admin-views.php.
References default_field_blocklist().
| default_field_blocklist | ( | $array = array(), |
|
$context = NULL |
|||
| ) |
List the field types without presentation properties (on a View context)
| array | $array | Existing field types to add to a blocklist |
| string | null | $context | Context for the blocklist. Default: NULL. |
Definition at line 342 of file class-admin-views.php.
Referenced by default_field_blacklist().
|
static |
Enqueue Gravity Forms scripts, needed for Merge Tags.
Definition at line 1436 of file class-admin-views.php.
| filter_pre_get_posts | ( | & | $query | ) |
| WP_Query | $query |
Definition at line 127 of file class-admin-views.php.
References $form_id, and Utils\_GET().
| get_available_fields | ( | $form = '', |
|
$zone = NULL |
|||
| ) |
Calculate the available fields.
| string | array | $form | form_ID or form object |
| string | $zone | Either 'single', 'directory', 'header', 'footer' |
gravityview/admin/available_fields Modify the available fields that can be used in a View. | array | $fields | The fields. |
| string | array | $form | form_ID or form object |
| string | $zone | Either 'single', 'directory', 'header', 'footer' |
Definition at line 858 of file class-admin-views.php.
References $field, GV\$form, $gv_field, GravityView_Fields\get_all(), get_entry_default_fields(), gravityview(), gravityview_get_entry_meta(), and gravityview_get_form_fields().
Referenced by render_active_areas(), and render_available_fields().
|
static |
Get HTML links relating to a connected form, like Edit, Entries, Settings, Preview.
| array | int | $form | Gravity Forms forms array, or the form ID |
| boolean | $include_form_link | Whether to include the bold name of the form in the output |
gravityview_connected_form_links Modify the links shown in the Connected Form links | array | $links | Links to show |
| array | $form | Gravity Forms form array |
Definition at line 493 of file class-admin-views.php.
References GV\$form, $form_id, $output, gravityview_get_form(), and GVCommon\has_cap().
Referenced by GravityView_Admin_Metaboxes\get_data_source_header().
| get_entry_default_fields | ( | $form, | |
| $zone | |||
| ) |
Retrieve the default fields id, label and type.
| string | array | $form | form_ID or form object |
| string | $zone | Either 'single', 'directory', 'header', 'footer' |
gravityview_entry_default_fields Modify the default fields for each zone and context | array | $entry_default_fields | Array of fields shown by default |
| string | array | $form | form_ID or form object |
| string | $zone | Either 'single', 'directory', 'header', 'footer' |
Definition at line 827 of file class-admin-views.php.
References GV\$form, and GravityView_Fields\get_all().
Referenced by get_available_fields().
| get_registered_widgets | ( | ) |
Get the list of registered widgets.
Each item is used to instantiate a GravityView_Admin_View_Widget object
Definition at line 930 of file class-admin-views.php.
|
static |
Add a GravityView menu to the Form Toolbar with connected views.
| array | $menu_items | Menu items, as set in GFForms::top_toolbar() |
| int | $id | ID of the current Gravity form |
Definition at line 251 of file class-admin-views.php.
References $label, gravityview_get_connected_views(), and GVCommon\has_cap().
| register_no_conflict | ( | $registered | ) |
Add GravityView scripts and styles to Gravity Forms and GravityView No-Conflict modes.
| array | $registered | Existing scripts or styles that have been registered (array of the handles) |
Definition at line 1467 of file class-admin-views.php.
| render_active_areas | ( | $template_id, | |
| $type, | |||
| $zone, | |||
| $rows, | |||
| $values | |||
| ) |
Generic function to render rows and columns of active areas for widgets & fields.
| string | $template_id | The current slug of the selected View template |
| string | $type | Either 'widget' or 'field' |
| string | $zone | Either 'single', 'directory', 'edit', 'header', 'footer' |
| array | $rows | The layout structure: rows, columns and areas |
| array | $values | Saved objects |
Definition at line 946 of file class-admin-views.php.
References $field, GV\$form, $form_id, $post, endforeach, View\from_post(), get_available_fields(), gravityview(), gravityview_get_form(), gravityview_get_form_id(), gravityview_get_joined_forms(), GravityView_Ajax\pre_get_form_fields(), Widget\registered(), and GravityView_Render_Settings\render_field_options().
Referenced by render_directory_active_areas(), and render_widgets_active_areas().
| render_additional_fields | ( | $form_id = 0, |
|
$context = 'single' |
|||
| ) |
Render html for displaying additional fields based on a Form ID.
| int | string | $form_id | Gravity Forms form ID. Default: 0. |
| string | $context | (default: 'single') |
gravityview_additional_fields non-standard Fields to show at the bottom of the field picker | array | $additional_fields | Associative array of field arrays, with label_text, desc, field_id, label_type, input_type, field_options, and settings_html keys |
Definition at line 773 of file class-admin-views.php.
References GV\$form, $form_id, $settings, and GVCommon\get_form_or_form_template().
Referenced by render_available_fields().
| render_available_fields | ( | $form_id = 0, |
|
$context = 'single' |
|||
| ) |
Render html for displaying available fields based on a Form ID.
gravityview_render_available_fields action| int | string | $form_id | Gravity Forms form ID. Default: 0. |
| string | $context | (default: 'single') |
gravityview_blocklist_field_types Modify the types of fields that shouldn't be shown in a View. | array | $blocklist_field_types | Array of field types which are not proper to be shown for the $context. |
| string | $context | View context ('single', 'directory', or 'edit'). |
Definition at line 710 of file class-admin-views.php.
References GV\$form, $form_id, $output, get_available_fields(), GVCommon\get_form_or_form_template(), gravityview(), and render_additional_fields().
| render_available_widgets | ( | ) |
Render html for displaying available widgets.
Definition at line 910 of file class-admin-views.php.
References Widget\registered().
| render_directory_active_areas | ( | $template_id = '', |
|
$context = 'single', |
|||
$post_id = 0, |
|||
$echo = false, |
|||
$form_id = 0 |
|||
| ) |
Render the Template Active Areas and configured active fields for a given template id and post id.
| string | $template_id | (default: '') Template ID, like default_list, default_table, preset_business_data, etc. { |
| string | $context | (default: 'single') Context of the template. single or directory (edit not implemented but valid). |
| string | $post_id | (default: '') |
| bool | $echo | (default: false) Whether to echo the output or return it. Default: false. |
| int | $form_id | (default: 0) Main form ID for the View. Used to set default fields for a new View. |
gravityview_template_active_areas | array | $template_areas | Empty array, to be filled in by the template class |
| string | $template_id | Template ID, like default_list, default_table, preset_business_data, etc. { |
| string | $context | Current View context: directory, single, or edit (default: 'single') |
Definition at line 1238 of file class-admin-views.php.
References $form_id, $output, gravityview(), gravityview_get_directory_fields(), and render_active_areas().
|
static |
Definition at line 239 of file class-admin-views.php.
References $name, and GravityView_Render_Settings\render_field_option().
| render_field_pickers | ( | $context = 'directory', |
|
$form_ids = array() |
|||
| ) |
Renders "Add Field" tooltips.
| string | $context | "directory", "single", or "edit" |
| array | $form_ids | (default: array) Array of form IDs |
Definition at line 1186 of file class-admin-views.php.
References $form_id, $post, View\get_joined_forms(), and gravityview_get_form_id().
| render_label | ( | ) |
Definition at line 696 of file class-admin-views.php.
|
static |
Definition at line 230 of file class-admin-views.php.
References $current_settings, $name, and GravityView_Render_Settings\render_setting_row().
| render_widgets_active_areas | ( | $template_id = '', |
|
$zone = '', |
|||
$post_id = '' |
|||
| ) |
Render the widget active areas.
| string | $template_id | The current slug of the selected View template |
| string | $zone | Either 'header' or 'footer' |
| string | $post_id | Current Post ID (view) |
gravityview/view/widgets/default Modify the default widgets for new Views | array | $widgets | A Widget configuration array |
| string | $zone | The widget zone that's being requested |
| int | $post_id | The auto-draft post ID |
Definition at line 1108 of file class-admin-views.php.
References $output, Widget\get_default_widget_areas(), gravityview_get_directory_widgets(), and render_active_areas().
| save_postdata | ( | $post_id | ) |
Save View configuration.
| int | $post_id | Currently saved Post ID |
gravityview_view_saved After a View has been saved in the admin | int | $post_id | ID of the View that has been saved |
| array | $statii | Array of statuses of the post meta saving processes. If saving worked, each key should be mapped to a value of the post ID (directory_widgets => 124). If failed (or didn't change), the value will be false. |
Definition at line 600 of file class-admin-views.php.
References $form_id, _gravityview_process_posted_fields(), gravityview(), gravityview_set_directory_widgets(), and GVCommon\has_cap().
| set_default_view_fields | ( | $fields = array(), |
|
$view = null, |
|||
$form_id = 0 |
|||
| ) |
Set the default fields for new Views.
Definition at line 1290 of file class-admin-views.php.
References $column_id, GV\$form, $form_id, $gv_field, GF_Form\by_id(), and GravityView_Fields\get_instance().
| suggest_support_articles | ( | $localization_data = array() | ) |
When on the Add/Edit View screen, suggest most popular articles related to that.
| array | $localization_data | Data to be passed to the Support Port JS |
Definition at line 103 of file class-admin-views.php.
References gravityview().
| tooltips | ( | $tooltips = array() | ) |
Add tooltip text for use throughout the UI.
| array | $tooltips | Array of Gravity Forms tooltips |
gravityview_tooltips The tooltips GravityView adds to the Gravity Forms tooltip array | array | $gv_tooltips | Associative array with unique keys containing array of title and value keys, as expected by gform_tooltips filter |
gravityview/metaboxes/tooltips The tooltips GravityView adds to the Gravity Forms tooltip array | array | $gv_tooltips | Associative array with unique keys containing array of title and value keys, as expected by gform_tooltips filter |
Definition at line 369 of file class-admin-views.php.
References $title, and View_Settings\defaults().