diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-includes/widgets/class-wp-widget-archives.php --- a/wp/wp-includes/widgets/class-wp-widget-archives.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-includes/widgets/class-wp-widget-archives.php Tue Dec 15 13:49:49 2020 +0100 @@ -40,13 +40,14 @@ * @param array $instance Settings for the current Archives widget instance. */ public function widget( $args, $instance ) { - $title = ! empty( $instance['title'] ) ? $instance['title'] : __( 'Archives' ); + $default_title = __( 'Archives' ); + $title = ! empty( $instance['title'] ) ? $instance['title'] : $default_title; /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); - $c = ! empty( $instance['count'] ) ? '1' : '0'; - $d = ! empty( $instance['dropdown'] ) ? '1' : '0'; + $count = ! empty( $instance['count'] ) ? '1' : '0'; + $dropdown = ! empty( $instance['dropdown'] ) ? '1' : '0'; echo $args['before_widget']; @@ -54,7 +55,7 @@ echo $args['before_title'] . $title . $args['after_title']; } - if ( $d ) { + if ( $dropdown ) { $dropdown_id = "{$this->id_base}-dropdown-{$this->number}"; ?> @@ -76,7 +77,7 @@ array( 'type' => 'monthly', 'format' => 'option', - 'show_post_count' => $c, + 'show_post_count' => $count, ), $instance ); @@ -98,6 +99,8 @@ $label = __( 'Select Post' ); break; } + + $type_attr = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"'; ?> @@ -105,7 +108,7 @@ - - - - + + + '; + } } echo $args['after_widget']; @@ -195,11 +215,16 @@ ) ); ?> -

+

+ + +

- id="get_field_id( 'dropdown' ); ?>" name="get_field_name( 'dropdown' ); ?>" /> + id="get_field_id( 'dropdown' ); ?>" name="get_field_name( 'dropdown' ); ?>" /> +
- id="get_field_id( 'count' ); ?>" name="get_field_name( 'count' ); ?>" /> + id="get_field_id( 'count' ); ?>" name="get_field_name( 'count' ); ?>" /> +