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) | |
Add a to this collection. More... | |
all () | |
contains ( $view_id) | |
Check whether with an ID is already here. More... | |
get ( $view_id) | |
Get a from this list. More... | |
Public Member Functions inherited from Collection | |
add ( $value) | |
Add an object to this collection. More... | |
all () | |
Returns all the objects in this collection as an an array. More... | |
clear () | |
Clear this collection. More... | |
count () | |
Returns the count of the objects in this collection. More... | |
first () | |
Get the first added object. More... | |
last () | |
Get the last added object. More... | |
merge (\GV\Collection $collection) | |
Merge another collection into here. More... | |
Static Public Member Functions | |
static | from_content ( $content) |
Get a list of detected objects inside the supplied content. More... | |
static | from_post (\WP_Post $post) |
Get a list of objects inside the supplied . More... | |
Static Private Member Functions | |
static | merge_deep ( $views, $meta_value) |
Process meta values when stored singular (string) or multiple (array). More... | |
If this file is called directly, abort.
A collection of objects.
Definition at line 12 of file class-gv-collection-view.php.
add | ( | $view | ) |
Add a to this collection.
\GV\View | $view | The view to add to the internal array. |
Definition at line 31 of file class-gv-collection-view.php.
References gravityview().
all | ( | ) |
Definition at line 18 of file class-gv-collection-view.php.
contains | ( | $view_id | ) |
Check whether with an ID is already here.
int | $view_id | The ID of the view to check. |
Definition at line 70 of file class-gv-collection-view.php.
References $view_id.
|
static |
Get a list of detected objects inside the supplied content.
The content can have a shortcode, this is the simplest case.
string | $content | The content to look into. |
Let's find us some [gravityview] shortcodes perhaps.
Definition at line 166 of file class-gv-collection-view.php.
References $content.
Referenced by GravityView_frontend\detect_views_in_block_content().
|
static |
Get a list of objects inside the supplied .
The post can be a gravityview post, which is the simplest case. The post can contain gravityview shortcodes as well. The post meta can contain gravityview shortcodes.
\WP_Post | $post | The object to look into. |
A straight up gravityview post.
gravityview/view_collection/from_post/meta_keys
Define meta keys to parse to check for GravityView shortcode content.This is useful when using themes that store content that may contain shortcodes in custom post meta.
array | $meta_keys | Array of key values to check. If empty, do not check. Default: empty array |
\WP_Post | $post | The post that is being checked |
\GV\View_Collection | $views | The current View Collection object, passed as reference |
gravityview/data/parse/meta_keys
gravityview/view_collection/from_post/meta_keys
filter.What about inside post meta values?
Definition at line 87 of file class-gv-collection-view.php.
Referenced by GravityView_API\entry_link(), GravityView_View_Data\is_valid_embed_id(), GravityView_Edit_Entry_Locking\maybe_enqueue_scripts(), GravityView_View_Data\maybe_get_view_id(), Views_Route\prepare_entry_for_response(), and GravityView_frontend\single_entry_title().
get | ( | $view_id | ) |
Get a from this list.
int | $view_id | The ID of the view to get. |
Definition at line 51 of file class-gv-collection-view.php.
References $view_id.
|
staticprivate |
Process meta values when stored singular (string) or multiple (array).
Supports nested arrays and JSON strings.
\GV\View_Collection | $views | Existing View Collection to merge with |
string | array | $meta_value | Value to parse. Normally the value of $post->{$meta_key}. |
Definition at line 138 of file class-gv-collection-view.php.
References gv_maybe_json_decode().