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 | |
callback ( $passed_atts, $content='', $tag='') | |
Process and output the [gravityview] shortcode. More... | |
Public Member Functions inherited from Shortcode | |
callback ( $atts, $content='', $tag='') | |
The WordPress Shortcode API callback for this shortcode. More... | |
Data Fields | |
$name = 'gravityview' | |
Data Fields inherited from Shortcode | |
$atts | |
$content | |
$name | |
Static Public Attributes | |
static | $callstack = array() |
A stack of calls to track nested shortcodes. More... | |
Private Member Functions | |
detail ( $view, $entries, $atts) | |
Output view details. More... | |
parse_and_sanitize_atts ( $passed_atts) | |
Validate attributes passed to the [gravityview] shortcode. More... | |
Static Private Member Functions | |
static | _return ( $value) |
Pop the callstack and return the value. More... | |
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... | |
If this file is called directly, abort.
The [gravityview] shortcode.
Definition at line 12 of file class-gv-shortcode-gravityview.php.
|
staticprivate |
Pop the callstack and return the value.
Definition at line 361 of file class-gv-shortcode-gravityview.php.
References $value.
callback | ( | $passed_atts, | |
$content = '' , |
|||
$tag = '' |
|||
) |
Process and output the [gravityview] shortcode.
array | $passed_atts | The attributes passed. |
string | $content | The content inside the shortcode. |
string | $tag | The shortcode tag. |
gravityview/shortcode/before-processing
Runs before the GV shortcode is processed; can be used to load additional scripts/styles\GV\View | $view | GV View |
\WP_Post | $post | Associated WP post |
When this shortcode is embedded inside a View we can only display it as a directory. There's no other way. Try to detect that we're not embedded to allow edit and single contexts.
Remove Widgets on a nested embedded View.
Check permissions.
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.
View details.
Editing a single entry.
When editing an entry don't render multiple views.
Viewing a single entry.
When viewing an entry don't render multiple views.
Just this view.
Definition at line 32 of file class-gv-shortcode-gravityview.php.
References Shortcode\$atts, $entries, $entry, $post, $view_id, Utils\_GET(), View\by_id(), GVCommon\check_entry_display(), gravityview\detail(), Entry\get_endpoint_name(), GravityView_View_Data\getInstance(), gravityview(), GVCommon\has_cap(), GravityView_Entry_Approval_Status\is_approved(), GravityView_Entry_Approval\meta_key, and gravityview\parse_and_sanitize_atts().
|
private |
Output view details.
\GV\View | $view | The View. |
\GV\Entry_Collection | $entries | The calculated entries. |
array | $atts | The shortcode attributes (with defaults). |
gravityview/shortcode/detail/{$detail}
Filter the detail output returned from [gravityview detail="$detail"]
string[in,out] | $output Existing output |
\GV\View | $view | The view. |
\GV\Entry_Collection | $entries | The entries. |
array | $atts | The shortcode atts with defaults. |
Definition at line 325 of file class-gv-shortcode-gravityview.php.
References Shortcode\$atts, $entries, $output, and endswitch.
Referenced by gravityview\callback().
|
private |
Validate attributes passed to the [gravityview] shortcode.
Supports {get} Merge Tags values.
Attributes passed to the shortcode are compared to registered attributes {
Then, {get} merge tags are replaced with their $_GET values, if passed
Then, attributes are sanitized based on the type of setting (number, checkbox, select, radio, text)
array | $passed_atts | Attribute pairs defined to render the View |
Make sure number fields are numeric. Also, convert mixed number strings to numbers
Only allow values that are defined in the settings
Definition at line 256 of file class-gv-shortcode-gravityview.php.
References Shortcode\$atts, View_Settings\defaults(), Utils\get(), gv_empty(), and GravityView_Merge_Tags\replace_variables().
Referenced by gravityview\callback().
|
static |
A stack of calls to track nested shortcodes.
Definition at line 21 of file class-gv-shortcode-gravityview.php.
$name = 'gravityview' |
Definition at line 16 of file class-gv-shortcode-gravityview.php.