Skip to main content

GVCalendarWidget

Source: includes/class-calendar-widget.php:19

Details

  • Kind: class
  • Namespace: (global)
  • Extends: WP_Widget

Properties

PropertyTypeDescription
$_assets_handlestringUnique reference name for UI script

Methods

MethodDescription
__construct()GVCalendarWidget constructor.
enqueue_scripts()Register, enqueue and localize UI assets
widget()Handles outputting of the widget content
update()Handles updates to the widget content
form()Outputs the form options for the widget

Method Reference

__construct()

public function __construct()

GVCalendarWidget constructor.

See Also

  • WP_Widget::__construct

Source: includes/class-calendar-widget.php:31

enqueue_scripts()

public function enqueue_scripts( $page )

Register, enqueue and localize UI assets

Parameters

NameTypeDefaultDescription
$page

Returns

  • void

Source: includes/class-calendar-widget.php:50

widget()

function widget( $args, $instance )

Handles outputting of the widget content

Parameters

NameTypeDefaultDescription
$argsarrayArguments provided to the widget
$instancearraySaved database values for the widget

Source: includes/class-calendar-widget.php:71

update()

public function update( $new_instance, $old_instance )

Handles updates to the widget content

Parameters

NameTypeDefaultDescription
$new_instancearrayThe new instance of the widget
$old_instancearrayThe old instance of the widget

Returns

  • array — The widget instance, after changes have occurred

Source: includes/class-calendar-widget.php:92

form()

public function form( $instance )

Outputs the form options for the widget

Parameters

NameTypeDefaultDescription
$instancearrayThe widget instance

Returns

  • void

Source: includes/class-calendar-widget.php:108