GravityView  2.5
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Data Fields
gventry Class Reference

If this file is called directly, abort. More...

Inheritance diagram for gventry:
Shortcode

Public Member Functions

 callback ( $atts, $content='', $tag='')
 Process and output the [gventry] shortcode. More...
 
- Public Member Functions inherited from Shortcode
 callback ( $atts, $content='', $tag='')
 The WordPress Shortcode API callback for this shortcode. More...
 

Data Fields

 $name = 'gventry'
 
- Data Fields inherited from Shortcode
 $atts
 
 $content
 
 $name
 

Additional Inherited Members

- Static Public Member Functions inherited from Shortcode
static add ( $name=null)
 Register this shortcode class with the WordPress Shortcode API. More...
 
static parse ( $content)
 Parse a string of content and figure out which ones there are. More...
 
static remove ()
 Unregister this shortcode. More...
 

Detailed Description

If this file is called directly, abort.

The [gventry] shortcode.

Definition at line 12 of file class-gv-shortcode-gventry.php.

Member Function Documentation

◆ callback()

callback (   $atts,
  $content = '',
  $tag = '' 
)

Process and output the [gventry] shortcode.

Parameters
array$passed_attsThe attributes passed.
string$contentThe content inside the shortcode.
string$tagThe shortcode tag.
Returns
string|null The output.
Runs Filter:
gravityview/shortcodes/gventry/atts Filter the [gventry] shortcode attributes.
Parameters
array$attsThe initial attributes.
Since
2.0

Since we're using shorthand initialization we have to reverse the order parameters here.

Reverse existing sorts.

Otherwise, sort by date_created.

If a sort already exists, reverse it.

Otherwise, sort by date_created

This View has no data source. There's nothing to show really. ...apart from a nice message if the user can do anything about it.

Private, pending, draft, etc.

Unapproved entries.

Based on code in our unit-tests. Mocks old context, etc.

Runs Filter:
gravityview/shortcodes/gventry/edit/success Modify the edit entry success message in [gventry].
Since
develop
Parameters
[in,out]string$messageThe message.
\GV\View$viewThe View.
\GV\Entry$entryThe entry.
array$attsThe attributes.

Remove the back link.

Runs Filter:
gravityview/shortcodes/gventry/output Filter the [gventry] output.
Parameters
string$outputThe output.
\GV\View | null$viewThe View detected or null.
\GV\Entry | null$entryThe Entry or null.
Since
2.0

Definition at line 27 of file class-gv-shortcode-gventry.php.

References Shortcode\$atts, $entries, $entry, GV\$form, $form_id, $output, $template, Entry_Sort\ASC, GF_Entry\by_id(), Internal_Field\by_id(), Entry\by_id(), View\by_id(), Entry_Sort\DESC, GravityView_Edit_Entry\get_nonce_key(), GVCommon\get_template_settings(), GravityView_Edit_Entry\getInstance(), GravityView_View_Data\getInstance(), GravityView_View\getInstance(), gravityview(), gv_map_deep(), GVCommon\has_cap(), GravityView_Entry_Approval_Status\is_approved(), GravityView_Entry_Approval\meta_key, Entry_Sort\NUMERIC, and Entry_Sort\RAND.

Field Documentation

◆ $name

$name = 'gventry'

Definition at line 16 of file class-gv-shortcode-gventry.php.


The documentation for this class was generated from the following file: