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

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

Inheritance diagram for gvfield:
Shortcode

Public Member Functions

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

Data Fields

 $name = 'gvfield'
 
- 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 [gvfield] shortcode.

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

Member Function Documentation

◆ callback()

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

Process and output the [gvfield] 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/gvfield/atts Filter the [gvfield] 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.

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

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

References $args, Shortcode\$atts, $entries, $entry, $field, $form_id, $output, Entry_Sort\ASC, GF_Entry\by_id(), Internal_Field\by_id(), GF_Field\by_id(), View\by_id(), Entry_Sort\DESC, endswitch, Plugin\FEATURE_GFQUERY, 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 = 'gvfield'

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


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