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 ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |