PHP Class PodsWidgetSingle, pods

Inheritance: extends WP_Widget
Show file Open project: pods-framework/pods

Public Methods

Method Description
__construct ( string $id_base = 'pods_widget_single', string $name = 'Pods - Single Item', array $widget_options = [], array $control_options = [] ) Register the widget
form ( $instance ) Widget Form
update ( $new_instance, $old_instance ) Updates the new instance of widget arguments
widget ( $args, $instance ) Output of widget

Method Details

__construct() public method

Register the widget
Since: 2.5.4 Note: params are totally ignored. Included for the sake of strict standards.
public __construct ( string $id_base = 'pods_widget_single', string $name = 'Pods - Single Item', array $widget_options = [], array $control_options = [] )
$id_base string Optional Base ID for the widget, lowercase and unique. If left empty, a portion of the widget's class name will be used Has to be unique.
$name string Name for the widget displayed on the configuration page.
$widget_options array Optional. Widget options. See {@see \wp_register_sidebar_widget()} for information on accepted arguments. Default empty array.
$control_options array Optional. Widget control options. See {@see \wp_register_widget_control()} for information on accepted arguments. Default empty array.

form() public method

Widget Form
public form ( $instance )

update() public method

Updates the new instance of widget arguments
public update ( $new_instance, $old_instance )

widget() public method

Output of widget
public widget ( $args, $instance )