PHP Class Google_Translate_Widget, jetpack

Inheritance: extends WP_Widget
Show file Open project: automattic/jetpack Class Usage Examples

Public Properties

Property Type Description
$instance

Public Methods

Method Description
__construct ( ) Register widget with WordPress.
enqueue_scripts ( ) Enqueue frontend JS scripts.
form ( array $instance ) Widget form in the dashboard.
update ( array $new_instance, array $old_instance ) : array Sanitize widget form values as they are saved.
widget ( array $args, array $instance ) Display the Widget.

Method Details

__construct() public method

Register widget with WordPress.
public __construct ( )

enqueue_scripts() public method

Enqueue frontend JS scripts.
public enqueue_scripts ( )

form() public method

Widget form in the dashboard.
See also: WP_Widget::form()
public form ( array $instance )
$instance array Previously saved values from database.

update() public method

Sanitize widget form values as they are saved.
See also: WP_Widget::update()
public update ( array $new_instance, array $old_instance ) : array
$new_instance array Values just sent to be saved.
$old_instance array Previously saved values from database.
return array $instance Updated safe values to be saved.

widget() public method

Display the Widget.
See also: WP_Widget::widget()
public widget ( array $args, array $instance )
$args array Display arguments.
$instance array The settings for the particular instance of the widget.

Property Details

$instance static public property

static public $instance