GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Go to the source code of this file.
Data Structures | |
class | GravityView_API |
Namespaces | |
GravityView | |
GPL2+ | |
Functions | |
gravityview_after () | |
gravityview_back_link ( $context=null) | |
Generate HTML for the back link from single entry view. More... | |
gravityview_before () | |
gravityview_convert_value_to_term_list ( $value, $taxonomy='post_tag') | |
Take a passed CSV of terms and generate a linked list of terms. More... | |
gravityview_field_output ( $passed_args, $context=null) | |
Output field based on a certain html markup. More... | |
gravityview_footer () | |
gravityview_get_context () | |
Returns the current GravityView context, or empty string if not GravityView. More... | |
gravityview_get_current_view_data ( $view_id=0) | |
Get data for a specific view. More... | |
gravityview_get_current_views () | |
Get all views processed so far for the current page load. More... | |
gravityview_get_field_value ( $entry, $field_id, $display_value) | |
Handle getting values for complex Gravity Forms fields. More... | |
gravityview_get_files_array ( $value, $gv_class='', $context=null) | |
Return an array of files prepared for output. More... | |
gravityview_get_map_link ( $address, $atts=array()) | |
Generate a mapping link from an address. More... | |
gravityview_get_the_term_list ( $post_id, $link=true, $taxonomy='post_tag') | |
Get the links for post_tags and post_category output based on post ID. More... | |
gravityview_get_view_id () | |
Get the current View ID being rendered. More... | |
gravityview_header () | |
gv_class ( $field, $form=NULL, $entry=array()) | |
gv_container_class ( $passed_css_class='', $echo=true, $context=null) | |
Generate a CSS class to be added to the wrapper of a View. More... | |
gv_directory_link ( $post=NULL, $add_pagination=true, $context=null) | |
gv_entry_link ( $entry, $post_id=NULL) | |
gv_get_query_args () | |
Returns query parameters from $_GET with reserved internal GravityView keys removed. More... | |
gv_label ( $field, $entry=NULL) | |
gv_no_results ( $wpautop=true, $context=null) | |
gv_value ( $entry, $field) | |
gravityview_after | ( | ) |
gravityview/template/after
Append content to the view. \GV\Template_Context | $gravityview | The $gravityview object available in templates. |
gravityview_after
Append content to the View container <div>
int | $view_id | The ID of the View being displayed |
Definition at line 1274 of file class-api.php.
References $args, and gravityview_get_view_id().
gravityview_back_link | ( | $context = null | ) |
Generate HTML for the back link from single entry view.
\GV\Template_Context | $context | The context this link is being displayed from. |
gravityview_go_back_url
Modify the back link URL string | $href | Existing label URL |
gravityview/template/links/back/url
Modify the back link URL string | $href | Existing label URL |
Definition at line 953 of file class-api.php.
References $gravityview_view, $href, $label, $link, $view_id, GravityView_View\getInstance(), gravityview_get_link(), and gv_directory_link().
gravityview_before | ( | ) |
gravityview/template/before
Append content to the view. object | $gravityview | The $gravityview object available in templates. |
gravityview/template/before
Prepend content to the view. \GV\Template_Context | $gravityview | The $gravityview object available in templates. |
gravityview_before
Prepend content to the View container <div>
int | $view_id | The ID of the View being displayed |
Definition at line 1187 of file class-api.php.
References $args, and gravityview_get_view_id().
gravityview_convert_value_to_term_list | ( | $value, | |
$taxonomy = 'post_tag' |
|||
) |
Take a passed CSV of terms and generate a linked list of terms.
Gravity Forms passes categories as "Name:ID" so we handle that using the ID, which is more accurate than checking the name, which is more likely to change.
string | $value | Existing value |
string | $taxonomy | Type of term (post_tag or category ) |
Definition at line 1060 of file class-api.php.
References $output, $value, and gravityview_get_link().
gravityview_field_output | ( | $passed_args, | |
$context = null |
|||
) |
Output field based on a certain html markup.
markup - string to be used on a sprintf statement. Use: {{label}} - field label {{value}} - entry field value {{class}} - field class
wpautop - true will filter the value using wpautop function
array | $passed_args | Associative array with field data. field and form are required. |
gravityview/field_output/args
Modify the args before generation begins array | $args | Associative array; field and form is required. |
array | $passed_args | Original associative array with field data. field and form are required. |
\GV\Template_Context | $context | The context. |
gravityview/template/field_output/context
Modify the context before generation begins. \GV\Template_Context | $context | The context. |
array | $args | The sanitized arguments, these should not be trusted any longer. |
array | $passed_args | The passed arguments, these should not be trusted any longer. |
Create the content variables for replacing.
gravityview/field_output/pre_html
Allow Pre filtering of the HTML string | $markup | The HTML for the markup |
array | $args | All args for the field output |
\GV\Template_Context | $context | The context. |
gravityview/field_output/open_tag
Modify the opening tags for the template content placeholders string | $open_tag | Open tag for template content placeholders. Default: {{ |
\GV\Template_Context | $context | The context. |
gravityview/field_output/close_tag
Modify the closing tags for the template content placeholders string | $close_tag | Close tag for template content placeholders. Default: }} |
\GV\Template_Context | $context | The context. |
Loop through each of the tags to replace and replace both {{tag}}
and {{ tag }}
with the values
gravityview/field_output/context/{$tag}
Allow users to filter content on context
string | $value | The content to be shown instead of the {{tag}} placeholder |
array | $args | Arguments passed to the function |
\GV\Template_Context | $context | The context. |
gravityview_field_output
Modify field HTML output string | $html | Existing HTML output |
array | $args | Arguments passed to the function |
\GV\Template_Context | $context | The context. |
gravityview/field_output/html
Modify field HTML output string | $html | Existing HTML output |
array | $args | Arguments passed to the function |
\GV\Template_Context | $context | The context. |
Definition at line 1452 of file class-api.php.
References $args, $entry, $field, GV\$form, $value, GravityView_API\field_html_attr_id(), GravityView_API\field_width(), Utils\get(), gravityview(), gv_class(), gv_label(), and gv_value().
Referenced by GravityView_View\renderZone(), View_Table_Template\the_columns(), Entry_Table_Template\the_entry(), Entry_List_Template\the_field(), View_List_Template\the_field(), and View_Table_Template\the_field().
gravityview_footer | ( | ) |
gravityview/template/footer
Append content to the view. object | $gravityview | The $gravityview object available in templates. |
gravityview/template/footer
Prepend outside of the view container \GV\Template_Context | $gravityview | The $gravityview object available in templates. |
gravityview_after
Display content after a View. Used to render footer widget areas. Rendered outside the View container <div>
int | $view_id | The ID of the View being displayed |
Definition at line 1245 of file class-api.php.
References $args, and gravityview_get_view_id().
gravityview_get_context | ( | ) |
Returns the current GravityView context, or empty string if not GravityView.
GravityView_View $gravityview_view
gravityview_is_edit_entry
Whether we're currently on the Edit Entry screen boolean | $is_edit_entry |
Definition at line 1330 of file class-api.php.
References gravityview().
Referenced by GravityView_Plugin_Hooks_Gravity_Forms_Signature\edit_entry_field_input(), GravityView_Field_FileUpload\get_files_array(), GVCommon\matches_operation(), and GravityView_View\render_widget_hooks().
gravityview_get_current_view_data | ( | $view_id = 0 | ) |
Get data for a specific view.
id
, view_id
, form_id
, template_id
, atts
, fields
, widgets
, form
keys. Definition at line 1166 of file class-api.php.
References $view_id, and GravityView_frontend\getInstance().
Referenced by GravityView_Field_Sequence\replace_merge_tag().
gravityview_get_current_views | ( | ) |
Get all views processed so far for the current page load.
id
, view_id
, form_id
, template_id
, atts
, fields
, widgets
, form
keys. Definition at line 1134 of file class-api.php.
References GravityView_frontend\getInstance(), and gravityview().
gravityview_get_field_value | ( | $entry, | |
$field_id, | |||
$display_value | |||
) |
Handle getting values for complex Gravity Forms fields.
If the field is complex, like a product, the field ID, for example, 11, won't exist. Instead, it will be 11.1, 11.2, and 11.3. This handles being passed 11 and 11.2 with the same function.
array | $entry | GF entry array |
string | $field_id | [description] |
string | $display_value | The value generated by Gravity Forms |
Definition at line 1034 of file class-api.php.
References $display_value, $entry, and $field_id.
gravityview_get_files_array | ( | $value, | |
$gv_class = '' , |
|||
$context = null |
|||
) |
Return an array of files prepared for output.
Wrapper for GravityView_Field_FileUpload::get_files_array()
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 break html
=> The file output HTML formatted
string | $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 |
\GV\Template_Context | $context | The context |
file_path
and html
keys (see comments above) "GRAVITYVIEW_DIR" "../"
Definition at line 1375 of file class-api.php.
References $value, GravityView_Field_FileUpload\get_files_array(), and GRAVITYVIEW_DIR.
gravityview_get_map_link | ( | $address, | |
$atts = array() |
|||
) |
Generate a mapping link from an address.
The address should be plain text with new line (\n
) or <br />
line breaks separating sections
string | $address | Address |
gravityview_map_link
Modify the map link generated. You can use a different mapping service, for example. string | $link | Map link |
string | $address | Address to generate link for |
string | $url | URL generated by the function |
Definition at line 1406 of file class-api.php.
References $link, $link_text, $url, and gravityview_get_link().
gravityview_get_the_term_list | ( | $post_id, | |
$link = true , |
|||
$taxonomy = 'post_tag' |
|||
) |
Get the links for post_tags and post_category output based on post ID.
int | $post_id | The ID of the post |
boolean | $link | Add links or no? |
string | $taxonomy | Taxonomy of term to fetch. |
Definition at line 1115 of file class-api.php.
gravityview_get_view_id | ( | ) |
Get the current View ID being rendered.
GravityView_View $gravityview_view
0
if GravityView_View
doesn't exist, like in the admin, or no View is set. Definition at line 1308 of file class-api.php.
References GravityView_View\getInstance().
Referenced by GravityView_API\entry_link(), GravityView_Delete_Entry\get_delete_link(), gravityview_after(), gravityview_before(), gravityview_footer(), gravityview_header(), and Renderer\maybe_print_notices().
gravityview_header | ( | ) |
gravityview/template/header
Append content to the view. object | $gravityview | The $gravityview object available in templates. |
gravityview/template/header
Prepend content to the view container \GV\Template_Context | $gravityview | The $gravityview object available in templates. |
gravityview_header
Prepend content to the View container <div>
int | $view_id | The ID of the View being displayed |
Definition at line 1216 of file class-api.php.
References $args, and gravityview_get_view_id().
gv_class | ( | $field, | |
$form = NULL , |
|||
$entry = array() |
|||
) |
Definition at line 840 of file class-api.php.
References $entry, $field, GV\$form, and GravityView_API\field_class().
Referenced by gravityview_field_output().
gv_container_class | ( | $passed_css_class = '' , |
|
$echo = true , |
|||
$context = null |
|||
) |
Generate a CSS class to be added to the wrapper
string | $passed_css_class | Default: gv-container gv-container-{view id} . If View is hidden until search, adds hidden |
boolean | $echo | Whether to echo the output. Default: true |
\GV\Template_Context | $context | The template context. |
gravityview/render/container/class
Modify the CSS class to be added to the wrapper string | $css_class | Default: gv-container gv-container-{view id} . If View is hidden until search, adds hidden . If the View has no results, adds gv-container-no-results |
\GV\Template_Context | $context | The context. |
Definition at line 857 of file class-api.php.
References $view_id, and GravityView_View\getInstance().
gv_directory_link | ( | $post = NULL , |
|
$add_pagination = true , |
|||
$context = null |
|||
) |
Definition at line 934 of file class-api.php.
References $post, and GravityView_API\directory_link().
Referenced by gravityview_back_link(), and GravityView_Widget_Page_Links\render_frontend().
gv_entry_link | ( | $entry, | |
$post_id = NULL |
|||
) |
Definition at line 938 of file class-api.php.
References $entry, and GravityView_API\entry_link().
Referenced by GravityView_Edit_Entry\get_edit_link().
gv_get_query_args | ( | ) |
Returns query parameters from $_GET with reserved internal GravityView keys removed.
stripslashes_deep() $_GET is passed through stripslashes_deep(). urldecode_deep() $_GET is passed through urldecode_deep().
Important: The return value of gv_get_query_args() is not escaped by default. Output should be late-escaped with esc_url() or similar to help prevent vulnerability to cross-site scripting (XSS) attacks.
gravityview/api/reserved_query_args
Modify the URL arguments that should not be used because they are internal to GravityView array | $reserved_args | Array of URL query keys that should not be used except internally. |
Definition at line 793 of file class-api.php.
Referenced by GravityView_API\entry_link(), and GravityView_Delete_Entry\get_delete_link().
gv_label | ( | $field, | |
$entry = NULL |
|||
) |
Definition at line 836 of file class-api.php.
References $entry, $field, and GravityView_API\field_label().
Referenced by gravityview_field_output().
gv_no_results | ( | $wpautop = true , |
|
$context = null |
|||
) |
Definition at line 942 of file class-api.php.
References GravityView_API\no_results().
Referenced by GravityView_Entry_List\__construct().
gv_value | ( | $entry, | |
$field | |||
) |
gravityview_empty_value
What to display when a field is empty string | $value | (empty string) |
Definition at line 919 of file class-api.php.
References $entry, $field, $value, and GravityView_API\field_value().
Referenced by gravityview_field_output().