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

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

Inheritance diagram for Shortcode:
gravityview gventry gvfield gvlogic

Public Member Functions

 callback ( $atts, $content='', $tag='')
 The WordPress Shortcode API callback for this shortcode. More...
 

Static Public Member Functions

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...
 

Data Fields

 $atts
 
 $content
 
 $name
 

Static Private Attributes

static $shortcodes
 

Detailed Description

If this file is called directly, abort.

The base class.

Contains some unitility methods, base class for all GV Shortcodes.

Definition at line 14 of file class-gv-shortcode.php.

Member Function Documentation

◆ add()

static add (   $name = null)
static

Register this shortcode class with the WordPress Shortcode API.

Definition at line 59 of file class-gv-shortcode.php.

References $name, and gravityview().

◆ callback()

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

The WordPress Shortcode API callback for this shortcode.

Parameters
array$attsThe attributes passed.
string$contentThe content inside the shortcode.
string$tagThe tag.
Returns
string The output.

Definition at line 44 of file class-gv-shortcode.php.

References gravityview().

◆ parse()

static parse (   $content)
static

Parse a string of content and figure out which ones there are.

Only registered shortcodes (via add_shortcode) will show up. Returned order is not guaranteed.

Parameters
string$contentSome post content to search through.

The matches contains:

1 - An extra [ to allow for escaping shortcodes with double [[]] 2 - The shortcode name 3 - The shortcode argument list 4 - The self closing / 5 - The content of a shortcode when it wraps some content. 6 - An extra ] to allow for escaping shortcodes with double [[]]

This is a registered GravityView shortcode.

This is some generic shortcode.

Merge inner shortcodes.

Definition at line 100 of file class-gv-shortcode.php.

References $content.

Referenced by Legacy_Context\load(), and GravityView_View_Data\maybe_get_view_id().

◆ remove()

static remove ( )
static

Unregister this shortcode.

Definition at line 82 of file class-gv-shortcode.php.

Field Documentation

◆ $atts

$atts

◆ $content

$content

Definition at line 33 of file class-gv-shortcode.php.

Referenced by gvlogic\callback(), and gvlogic\get_output().

◆ $name

$name

Definition at line 28 of file class-gv-shortcode.php.

◆ $shortcodes

$shortcodes
staticprivate

Definition at line 18 of file class-gv-shortcode.php.


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