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 | |
add_view ( $view_id, $atts=NULL) | |
Add a view to the views array. More... | |
get_fields ( $view_id) | |
Get the visible fields for a View gravityview_get_directory_fields() Fetch the configured fields for a View GravityView_View_Data::filter_fields() Only show visible fields. More... | |
get_id_from_atts ( $atts) | |
Retrieves view ID from an array. More... | |
get_view ( $view_id, $atts=NULL) | |
get_views () | |
has_multiple_views () | |
maybe_get_view_id ( $passed_post=null) | |
Figure out what the View ID is for a variable, if any. More... | |
parse_post_content ( $content) | |
Parse content to determine if there is a GV shortcode to allow for enqueing necessary files in the head. More... | |
view_exists ( $view_id) | |
Determines if a post, identified by the specified ID, exist within the WordPress database. More... | |
Static Public Member Functions | |
static | get_default_arg ( $key, $with_details=false) |
Get a specific default setting. More... | |
static | get_default_args ( $with_details=false, $group=NULL) |
Retrieve the default args for shortcode and theme function. More... | |
static | getInstance ( $passed_post=NULL) |
static | is_valid_embed_id ( $post_id='', $view_id='', $empty_is_valid=false) |
Checks if the passed post id has the passed View id embedded. More... | |
Data Fields | |
$views = array() | |
Static Public Attributes | |
static | $instance = NULL |
Private Member Functions | |
__construct ( $passed_post=NULL) | |
If this file is called directly, abort.
Definition at line 8 of file class-data.php.
|
private |
null | $passed_post |
Definition at line 18 of file class-data.php.
References $view_id, and maybe_get_view_id().
add_view | ( | $view_id, | |
$atts = NULL |
|||
) |
Add a view to the views array.
int | array | $view_id | View ID or array of View IDs |
array | string | $atts | Combine other attributes (eg. from shortcode) with the view settings (optional) |
Definition at line 201 of file class-data.php.
References $view_id, and GV\Mocks\GravityView_View_Data_add_view().
|
static |
Get a specific default setting.
string | $key | The key of the setting array item |
boolean | $with_details | Include details |
Definition at line 351 of file class-data.php.
References $args, and View_Settings\defaults().
|
static |
Retrieve the default args for shortcode and theme function.
boolean | $with_details | True: Return array with full default settings information, including description, name, etc. False: Return an array with only key => value pairs. |
string | $group | Only fetch |
string | $label | Setting label shown in admin |
string | $type | Gravity Forms field type |
string | $group | The field group the setting is associated with. Default: "default" |
mixed | $value | The default value for the setting |
string | $tooltip | Tooltip displayed for the setting |
boolean | $show_in_shortcode | Whether to show the setting in the shortcode configuration modal |
array | $options | Array of values to use when generating select, multiselect, radio, or checkboxes fields |
boolean | $full_width | True: Display the input and label together when rendering. False: Display label and input in separate columns when rendering. |
Definition at line 381 of file class-data.php.
get_fields | ( | $view_id | ) |
Get the visible fields for a View gravityview_get_directory_fields() Fetch the configured fields for a View GravityView_View_Data::filter_fields() Only show visible fields.
int | $view_id | View ID |
gravityview_get_directory_fields()
Definition at line 216 of file class-data.php.
References $view_id, and View\by_id().
get_id_from_atts | ( | $atts | ) |
Retrieves view ID from an array.
array | $atts |
Definition at line 231 of file class-data.php.
References $settings, $view_id, and View_Settings\with_defaults().
Referenced by maybe_get_view_id().
get_view | ( | $view_id, | |
$atts = NULL |
|||
) |
Emulate this weird side-effect below...
Definition at line 149 of file class-data.php.
References $view_id, and View\by_id().
get_views | ( | ) |
Definition at line 135 of file class-data.php.
|
static |
Definition at line 122 of file class-data.php.
Referenced by GravityView_Admin_Bar\add_floaty_icon(), GravityView_Admin_Bar\add_hooks(), GVCommon\calculate_get_entries_criteria(), gravityview\callback(), GravityView_frontend\detect_views_in_block_content(), GravityView_API\entry_link(), Legacy_Context\freeze(), get_gravityview(), GravityView_Edit_Entry_Render\init(), Legacy_Context\load(), GravityView_frontend\parse_content(), GravityView_Theme_Hooks_Ultimate_Member\parse_um_profile_post_content(), oEmbed\render_frontend(), Blocks\render_shortcode(), and Legacy_Context\thaw().
has_multiple_views | ( | ) |
|
static |
Checks if the passed post id has the passed View id embedded.
Returns
string | $post_id | Post ID where the View is embedded |
string | $view_id | View ID |
string | $empty_is_valid | If either $post_id or $view_id is empty consider valid. Default: false. |
Definition at line 286 of file class-data.php.
References $post, $view_id, $views, View_Collection\from_post(), and gravityview_get_link().
Referenced by GravityView_Search_WP_Widget\update(), and GravityView_Recent_Entries_Widget\update().
maybe_get_view_id | ( | $passed_post = null | ) |
Figure out what the View ID is for a variable, if any.
Can be:
gravityview
post type or not)view_id
or id
key(s) setWP_Post|WP_Post[]|array|string|int|null | $passed_post See method description |
And as a side-effect... add each view to the global scope.
And as a side-effect... add each view to the global scope.
Definition at line 59 of file class-data.php.
References $post, $views, View\exists(), View_Collection\from_post(), get_id_from_atts(), and Shortcode\parse().
Referenced by __construct().
parse_post_content | ( | $content | ) |
Parse content to determine if there is a GV shortcode to allow for enqueing necessary files in the head.
gravityview_has_shortcode_r() Check whether shortcode exists (recursively) shortcode_parse_atts() Parse each GV shortcode gravityview_get_template_settings() Get the settings for the View ID
string | $content | $post->post_content content |
The original function outputs the ID even though it wasn't added by ::add_view() Wether this is a bug or not remains a mystery. But we need to emulate this behavior until better times.
Definition at line 252 of file class-data.php.
References $content.
view_exists | ( | $view_id | ) |
Determines if a post, identified by the specified ID, exist within the WordPress database.
int | $view_id | The ID of the post to check |
Definition at line 185 of file class-data.php.
References $view_id.
|
static |
Definition at line 10 of file class-data.php.
Referenced by oEmbed\render_frontend(), and Legacy_Context\reset().
$views = array() |
Definition at line 12 of file class-data.php.
Referenced by is_valid_embed_id(), and maybe_get_view_id().