WP_Widget_Calendar::__construct() WordPress Method

The WP_Widget_Calendar::__construct() function creates a new calendar widget. The calendar widget is a small calendar that displays the current month and allows the user to select a specific date. The calendar widget is useful for selecting a date for an event or task. The calendar widget is located in the WordPress admin panel under the "Widgets" section.

WP_Widget_Calendar::__construct() #

Sets up a new Calendar widget instance.


Source

File: wp-includes/widgets/class-wp-widget-calendar.php

	public function __construct() {
		$widget_ops = array(
			'classname'                   => 'widget_calendar',
			'description'                 => __( 'A calendar of your site’s posts.' ),
			'customize_selective_refresh' => true,
			'show_instance_in_rest'       => true,
		);
		parent::__construct( 'calendar', __( 'Calendar' ), $widget_ops );
	}


Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.