WP_Widget_Archives::__construct()publicWP 2.8.0

Sets up a new Archives widget instance.

Method of the class: WP_Widget_Archives{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Widget_Archives = new WP_Widget_Archives();
$WP_Widget_Archives->__construct();

Changelog

Since 2.8.0 Introduced.

WP_Widget_Archives::__construct() code WP 6.1.1

public function __construct() {
	$widget_ops = array(
		'classname'                   => 'widget_archive',
		'description'                 => __( 'A monthly archive of your site’s Posts.' ),
		'customize_selective_refresh' => true,
		'show_instance_in_rest'       => true,
	);
	parent::__construct( 'archives', __( 'Archives' ), $widget_ops );
}