- <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> <option value=""><?php echo esc_attr(__('Select Month')); ?></option> <?php wp_get_archives(apply_filters('widget_archives_dropdown_args', array('type' => 'monthly', 'format' => 'option', 'show_post_count' => $c))); ?> </select>
+ <label class="screen-reader-text" for="<?php echo esc_attr( $dropdown_id ); ?>"><?php echo $title; ?></label>
+ <select id="<?php echo esc_attr( $dropdown_id ); ?>" name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
+ <?php
+ /**
+ * Filter the arguments for the Archives widget drop-down.
+ *
+ * @since 2.8.0
+ *
+ * @see wp_get_archives()
+ *
+ * @param array $args An array of Archives widget drop-down arguments.
+ */
+ $dropdown_args = apply_filters( 'widget_archives_dropdown_args', array(
+ 'type' => 'monthly',
+ 'format' => 'option',
+ 'show_post_count' => $c
+ ) );
+
+ switch ( $dropdown_args['type'] ) {
+ case 'yearly':
+ $label = __( 'Select Year' );
+ break;
+ case 'monthly':
+ $label = __( 'Select Month' );
+ break;
+ case 'daily':
+ $label = __( 'Select Day' );
+ break;
+ case 'weekly':
+ $label = __( 'Select Week' );
+ break;
+ default:
+ $label = __( 'Select Post' );
+ break;
+ }
+ ?>
+
+ <option value=""><?php echo esc_attr( $label ); ?></option>
+ <?php wp_get_archives( $dropdown_args ); ?>
+
+ </select>