diff --git a/wp-includes/version.php b/wp-includes/version.php index 2a070b31f2..17bde8f194 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34380'; +$wp_version = '4.4-alpha-34381'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-calendar.php b/wp-includes/widgets/class-wp-widget-calendar.php index 8fd7aebed0..4329bcf18a 100644 --- a/wp-includes/widgets/class-wp-widget-calendar.php +++ b/wp-includes/widgets/class-wp-widget-calendar.php @@ -7,6 +7,16 @@ * @subpackage Widgets */ class WP_Widget_Calendar extends WP_Widget { + /** + * Ensure that the ID attribute only appears in the markup once + * + * @since 4.4.0 + * + * @static + * @access private + * @var int + */ + private static $instance = 0; public function __construct() { $widget_ops = array('classname' => 'widget_calendar', 'description' => __( 'A calendar of your site’s Posts.') ); @@ -25,10 +35,16 @@ class WP_Widget_Calendar extends WP_Widget { if ( $title ) { echo $args['before_title'] . $title . $args['after_title']; } - echo '
'; + if ( 0 === self::$instance ) { + echo '
'; + } else { + echo '
'; + } get_calendar(); echo '
'; echo $args['after_widget']; + + self::$instance++; } /**