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 | |
add_shortcode () | |
Add $this->shortcode_name shortcode to output self::render_frontend() More... | |
as_configuration () | |
Return an array of the old format. More... | |
assign_widget_options ( $options=array(), $template='', $widget='') | |
Assign template specific widget options. More... | |
get_setting ( $key) | |
Get a setting by the setting key. More... | |
get_settings () | |
Get the widget settings. More... | |
get_widget_id () | |
Get the Widget ID. More... | |
is_registered () | |
Whether this Widget's been registered already or not. More... | |
maybe_do_shortcode ( $text, $widget=null) | |
Do shortcode if the Widget's shortcode exists. More... | |
pre_render_frontend () | |
General validations when rendering the widget. More... | |
register_widget ( $widgets) | |
Register widget to become available in admin. More... | |
render_frontend ( $widget_args, $content='', $context='') | |
Frontend logic. More... | |
render_shortcode ( $atts, $content='', $context='') | |
Shortcode. More... | |
Static Public Member Functions | |
static | from_configuration ( $configuration) |
Create the needed widget from a configuration array. More... | |
static | get_default_widget_areas () |
Default widget areas. More... | |
static | registered () |
Return all registered widgets. More... | |
Data Fields | |
$configuration | |
$icon | |
$position = '' | |
$UID = '' | |
Protected Member Functions | |
get_default_settings () | |
Define general widget settings. More... | |
Protected Attributes | |
$defaults = array() | |
$settings = array() | |
$shortcode_name | |
$widget_description = '' | |
$widget_id = '' | |
$widget_label = '' | |
$widget_subtitle = '' | |
Private Attributes | |
$widget_options = array() | |
If this file is called directly, abort.
The class.
An interface that most GravityView widgets would want to adhere to and inherit from.
Definition at line 14 of file class-gv-widget.php.
add_shortcode | ( | ) |
Add $this->shortcode_name shortcode to output self::render_frontend()
Definition at line 326 of file class-gv-widget.php.
References $post, and gravityview().
as_configuration | ( | ) |
Return an array of the old format.
'id' => string
Definition at line 476 of file class-gv-widget.php.
assign_widget_options | ( | $options = array() , |
|
$template = '' , |
|||
$widget = '' |
|||
) |
Assign template specific widget options.
protected
array | $options | (default: array()) |
string | $template | (default: '') |
Definition at line 297 of file class-gv-widget.php.
References $settings.
|
static |
Create the needed widget from a configuration array.
array | $configuration | The configuration array. |
Definition at line 444 of file class-gv-widget.php.
References $class.
|
protected |
Define general widget settings.
gravityview/widget/enable_custom_class
Enable custom CSS class settings for widgets boolean | $enable_custom_class | False by default. Return true if you want to enable. |
\GV\Widget | $this | Current instance of . |
Definition at line 157 of file class-gv-widget.php.
References $settings.
|
static |
Default widget areas.
Usually overridden by the selected template.
gravityview_widget_active_areas
Array of zones available for widgets to be dropped into array | $default_areas | Definition for default widget areas |
gravityview/widget/active_areas
Array of zones available for widgets to be dropped into array | $default_areas | Definition for default widget areas |
Definition at line 219 of file class-gv-widget.php.
Referenced by GravityView_Ajax\get_preset_fields_config(), GravityView_View\render_widget_hooks(), and GravityView_Admin_Views\render_widgets_active_areas().
get_setting | ( | $key | ) |
Get a setting by the setting key.
string | $key | Key for the setting |
Definition at line 208 of file class-gv-widget.php.
get_settings | ( | ) |
Get the widget settings.
Definition at line 195 of file class-gv-widget.php.
References $settings.
get_widget_id | ( | ) |
is_registered | ( | ) |
Whether this Widget's been registered already or not.
Definition at line 513 of file class-gv-widget.php.
References gravityview().
Referenced by Page_Size\__construct(), GravityView_Widget_Poll\__construct(), and GravityView_Widget_Search\__construct().
maybe_do_shortcode | ( | $text, | |
$widget = null |
|||
) |
Do shortcode if the Widget's shortcode exists.
string | $text | Widget text to check |
null| |
Definition at line 314 of file class-gv-widget.php.
pre_render_frontend | ( | ) |
General validations when rendering the widget.
Always call this from your render_frontend()
override!
Assume shown regardless of hide_until_search setting.
gravityview/widget/hide_until_searched/allowlist
Some widgets have got to stay shown. string[] | $allowlist The widget IDs that have to be shown by default. |
gravityview/widget/hide_until_searched
Modify whether to hide content until search boolean | $hide_until_searched | Hide until search? |
\GV\Widget | $this | Widget instance |
Definition at line 377 of file class-gv-widget.php.
References gravityview().
Referenced by GravityView_Widget_Page_Links\render_frontend(), GravityView_Widget_Pagination_Info\render_frontend(), GravityView_Widget_Custom_Content\render_frontend(), Page_Size\render_frontend(), and GravityView_Widget_Gravity_Forms\render_frontend().
register_widget | ( | $widgets | ) |
Register widget to become available in admin.
And for lookup.
array | $widgets | Usually just empty. Used to gather them all up. |
Definition at line 271 of file class-gv-widget.php.
|
static |
Return all registered widgets.
gravityview_register_directory_widgets
Get the list of registered widgets. Each item is used to instantiate a GravityView_Admin_View_Widget object array | $registered_widgets | Empty array |
gravityview/widgets/register
Each item is used to instantiate a GravityView_Admin_View_Widget object array | $registered_widgets | Empty array |
Definition at line 490 of file class-gv-widget.php.
Referenced by GravityView_Admin_Views\render_active_areas(), and GravityView_Admin_Views\render_available_widgets().
render_frontend | ( | $widget_args, | |
$content = '' , |
|||
$context = '' |
|||
) |
Frontend logic.
Override in child class.
array | $widget_args | The Widget shortcode args. |
string | $content | The content. |
string | \GV\Template_Context | $context | The context, if available. |
Definition at line 367 of file class-gv-widget.php.
render_shortcode | ( | $atts, | |
$content = '' , |
|||
$context = '' |
|||
) |
array | $atts | The Widget shortcode args. |
string | $content | The content. |
string | \GV\Template_Context | $context | The context, if available. |
Definition at line 428 of file class-gv-widget.php.
References $content.
$configuration |
Definition at line 88 of file class-gv-widget.php.
|
protected |
Definition at line 45 of file class-gv-widget.php.
$icon |
Definition at line 101 of file class-gv-widget.php.
$position = '' |
Definition at line 71 of file class-gv-widget.php.
|
protected |
Definition at line 51 of file class-gv-widget.php.
Referenced by GravityView_Widget_Page_Links\__construct(), GravityView_Widget_Gravity_Forms\__construct(), GravityView_Widget_Pagination_Info\__construct(), GravityView_Widget_Custom_Content\__construct(), Page_Size\__construct(), GravityView_Widget_Poll\__construct(), GravityView_Widget_Search\__construct(), GravityView_Widget_Poll\get_frontend_settings(), Page_Size\render_frontend(), and GravityView_Widget_Poll\render_frontend().
|
protected |
Definition at line 57 of file class-gv-widget.php.
$UID = '' |
Definition at line 79 of file class-gv-widget.php.
|
protected |
Definition at line 26 of file class-gv-widget.php.
|
protected |
Definition at line 39 of file class-gv-widget.php.
|
protected |
Definition at line 20 of file class-gv-widget.php.
|
private |
Definition at line 63 of file class-gv-widget.php.
|
protected |
Definition at line 33 of file class-gv-widget.php.