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 | |
as_entry () | |
Return the backing entry object. More... | |
from_field ( $field, $fallback=null) | |
If this is a Multi_Entry filter it by Field. More... | |
get_permalink (\GV\View $view=null, \GV\Request $request=null, $track_directory=true) | |
Return the link to this entry in the supplied context. More... | |
get_slug ( $apply_filter=false, \GV\View $view=null, \GV\Request $request=null, $track_directory=true) | |
Get the entry slug. More... | |
is_multi () | |
Is this a multi-entry (joined entry). More... | |
Static Public Member Functions | |
static | add_rewrite_endpoint () |
Adds the necessary rewrites for single Entries. More... | |
static | by_id ( $entry_id) |
Construct a instance by ID. More... | |
static | get_endpoint_name () |
Return the endpoint name for a single Entry. More... | |
Data Fields | |
$ID = null | |
Static Public Attributes | |
static | $backend = null |
Protected Attributes | |
$entry | |
If this file is called directly, abort.
The base class.
Contains all entry data and some processing and logic rules.
Definition at line 14 of file class-gv-entry.php.
|
static |
Adds the necessary rewrites for single Entries.
Let's make sure the endpoint array is not polluted.
Definition at line 42 of file class-gv-entry.php.
Referenced by GravityView_Post_Types\init_rewrite().
as_entry | ( | ) |
Return the backing entry object.
Definition at line 91 of file class-gv-entry.php.
References $entry.
|
static |
Construct a instance by ID.
int | string | $entry_id | The internal entry ID. |
Definition at line 82 of file class-gv-entry.php.
from_field | ( | $field, | |
$fallback = null |
|||
) |
If this is a Multi_Entry filter it by Field.
\GV\Field | $field | The field to filter by. |
int | $fallback | A fallback form_id if the field supplied is invalid. |
Definition at line 251 of file class-gv-entry.php.
References $field.
|
static |
Return the endpoint name for a single Entry.
Also used as the query_var for the time being.
gravityview_directory_endpoint
Change the slug used for single entries string | $endpoint | Slug to use when accessing single entry. Default: entry |
Definition at line 63 of file class-gv-entry.php.
Referenced by gravityview\callback(), GravityView_API\entry_link(), oEmbed\get_entry_regex(), Entry\get_permalink(), Views_Route\get_sub_item_permissions_check(), and GravityView_frontend\is_single_entry().
get_permalink | ( | \GV\View | $view = null , |
\GV\Request | $request = null , |
||
$track_directory = true |
|||
) |
Return the link to this entry in the supplied context.
\GV\View | null | $view | The View context. |
\GV\Request | $request | The Request (current if null). |
boolean | $track_directory | Keep the housing directory arguments intact (used for breadcrumbs, for example). Default: true. |
This is not a regular view.
Must be an embed of some sort.
Fallback to regular view base.
gravityview_directory_link
Modify the URL to the View "directory" context string | $link | URL to the View's "directory" context (Multiple Entries screen) |
int | $post_id | ID of the post to link to. If the View is embedded, it is the post or page ID |
Assemble the permalink.
Make sure the $directory_link doesn't contain any query otherwise it will break when adding the entry slug.
gravityview/entry/permalink
The permalink of this entry. string | $permalink | The permalink. |
\GV\Entry | $entry | The entry we're retrieving it for. |
\GV\View | null | $view | The view context. |
\GV\Request | $request | The request context. |
Definition at line 107 of file class-gv-entry.php.
References $args, $entry_slug, $post, $view_id, Entry\get_endpoint_name(), and gravityview().
get_slug | ( | $apply_filter = false , |
|
\GV\View | $view = null , |
||
\GV\Request | $request = null , |
||
$track_directory = true |
|||
) |
Get the entry slug.
gravityview/entry/slug
Modify the entry URL slug as needed. string | $entry_slug | The slug, sanitized with sanitize_title() |
null | \GV\Entry | $this | The entry object. |
null | \GV\View | $view | The view object. |
null | \GV\Request | $request | The request. |
bool | $track_directory | Whether the directory is tracked. |
Definition at line 208 of file class-gv-entry.php.
References $entry_slug, and GravityView_API\get_entry_slug().
is_multi | ( | ) |
Is this a multi-entry (joined entry).
Definition at line 237 of file class-gv-entry.php.
|
static |
Definition at line 21 of file class-gv-entry.php.
|
protected |
Definition at line 34 of file class-gv-entry.php.
$ID = null |
Definition at line 29 of file class-gv-entry.php.