GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
GravityView_Widget Class Reference

Main GravityView widget class. More...

Inheritance diagram for GravityView_Widget:
GravityView_Widget_Custom_Content GravityView_Widget_Custom_Content GravityView_Widget_Page_Links GravityView_Widget_Page_Links GravityView_Widget_Pagination_Info GravityView_Widget_Pagination_Info GravityView_Widget_Poll GravityView_Widget_Poll GravityView_Widget_Search

Public Member Functions

 add_shortcode ($run_on_singular=true)
 Add $this->shortcode_name shortcode to output self::render_frontend() More...
 
 assign_widget_options ($options=array(), $template= '', $widget= '')
 Assign template specific field options. More...
 
 get_setting ($key)
 Get a setting by the setting key. More...
 
 get_settings ()
 Get the widget settings. More...
 
 get_widget_id ()
 
 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= '')
 

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
 

Detailed Description

Main GravityView widget class.

Definition at line 6 of file class-gravityview-widget.php.

Member Function Documentation

add_shortcode (   $run_on_singular = true)

Add $this->shortcode_name shortcode to output self::render_frontend()

Definition at line 176 of file class-gravityview-widget.php.

References $post, has_gravityview_shortcode(), GravityView_Plugin\is_admin(), and GravityView_frontend\is_single_entry().

assign_widget_options (   $options = array(),
  $template = '',
  $widget = '' 
)

Assign template specific field options.

protected

Parameters
array$options(default: array())
string$template(default: '')
Returns
array

Definition at line 225 of file class-gravityview-widget.php.

get_default_settings ( )
protected

Define general widget settings.

Since
1.5.4
Returns
array $settings Default settings
Runs Filter:
gravityview/widget/enable_custom_class Enable custom CSS class settings for widgets
Parameters
boolean$enable_custom_classFalse by default. Return true if you want to enable.
GravityView_Widget$thisCurrent instance of GravityView_Widget

Definition at line 93 of file class-gravityview-widget.php.

References $settings.

get_setting (   $key)

Get a setting by the setting key.

Parameters
string$keyKey for the setting
Returns
mixed|null Value of the setting; NULL if not set

Definition at line 139 of file class-gravityview-widget.php.

get_settings ( )

Get the widget settings.

Returns
array|null Settings array; NULL if not set

Definition at line 130 of file class-gravityview-widget.php.

get_widget_id ( )
Returns
string

Definition at line 122 of file class-gravityview-widget.php.

References $widget_id.

maybe_do_shortcode (   $text,
  $widget = NULL 
)

Do shortcode if the Widget's shortcode exists.

Parameters
string$textWidget text to check
null|WP_WidgetEmpty if not called by WP_Widget, or a WP_Widget instance
Returns
string Widget text

Definition at line 155 of file class-gravityview-widget.php.

pre_render_frontend ( )

General validations when rendering the widget.

Returns
boolean True: render frontend; False: don't render frontend
Runs Filter:
gravityview/widget/hide_until_searched Modify whether to hide content until search
Parameters
boolean$hide_until_searchedHide until search?
GravityView_Widget$thisWidget instance

Definition at line 251 of file class-gravityview-widget.php.

References $gravityview_view, and GravityView_View\getInstance().

Referenced by GravityView_Widget_Page_Links\render_frontend(), GravityView_Widget_Pagination_Info\render_frontend(), GravityView_Widget_Custom_Content\render_frontend(), and render_frontend().

register_widget (   $widgets)

Register widget to become available in admin.

Parameters
array$widgets
Returns
array $widgets

Definition at line 208 of file class-gravityview-widget.php.

References $widget_id.

render_frontend (   $widget_args,
  $content = '',
  $context = '' 
)

Frontend logic.

Returns
void

Definition at line 240 of file class-gravityview-widget.php.

References pre_render_frontend().

Referenced by GravityView_Widget_Search\has_date_field(), and render_shortcode().

render_shortcode (   $atts,
  $content = '',
  $context = '' 
)

Definition at line 164 of file class-gravityview-widget.php.

References $content, and render_frontend().

Field Documentation

$defaults = array()
protected

Definition at line 37 of file class-gravityview-widget.php.

$settings = array()
protected
$shortcode_name
protected

Definition at line 49 of file class-gravityview-widget.php.

$widget_description = ''
protected

Definition at line 18 of file class-gravityview-widget.php.

$widget_id = ''
protected

Definition at line 31 of file class-gravityview-widget.php.

Referenced by get_widget_id(), and register_widget().

$widget_label = ''
protected

Definition at line 12 of file class-gravityview-widget.php.

$widget_options
private

Definition at line 52 of file class-gravityview-widget.php.

$widget_subtitle = ''
protected

Definition at line 25 of file class-gravityview-widget.php.


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