Ticket #18650: 18650.patch
| File 18650.patch, 4.1 KB (added by , 13 years ago) |
|---|
-
wp-includes/default-widgets.php
244 244 $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives') : $instance['title'], $instance, $this->id_base); 245 245 246 246 echo $before_widget; 247 if ( $title ) 248 echo $before_title . $title . $after_title; 247 if ( $title ) { 248 echo $before_title; 249 if ( $d ) 250 echo '<label for="' . $this->id_base . '-dropdown-' . $this->number . '">' . $title . '</label>'; 251 else 252 echo $title; 253 echo $after_title; 254 } 249 255 250 256 if ( $d ) { 251 257 ?> 252 <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> 258 <select id="<?php echo $this->id_base . '-dropdown-' . $this->number; ?>" name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> 259 <option value=""><?php esc_attr_e( 'Select Month' ); ?></option> 260 <?php wp_get_archives( apply_filters( 'widget_archives_dropdown_args', array( 'type' => 'monthly', 'format' => 'option', 'show_post_count' => $c ) ) ); ?> 261 </select> 253 262 <?php 254 263 } else { 255 264 ?> 256 265 <ul> 257 <?php wp_get_archives(apply_filters('widget_archives_args', array('type' => 'monthly', 'show_post_count' => $c))); ?>266 <?php wp_get_archives( apply_filters( 'widget_archives_args', array( 'type' => 'monthly', 'show_post_count' => $c ) ) ); ?> 258 267 </ul> 259 268 <?php 260 269 } … … 313 322 <ul> 314 323 <?php wp_register(); ?> 315 324 <li><?php wp_loginout(); ?></li> 316 <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php e cho esc_attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>317 <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php e cho esc_attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>325 <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php esc_attr_e( 'Syndicate this site using RSS 2.0' ); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li> 326 <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php esc_attr_e( 'The latest comments to all posts in RSS' ); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li> 318 327 <?php echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>', 319 328 esc_url( __( 'http://wordpress.org/' ) ), 320 329 esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ), … … 454 463 $d = ! empty( $instance['dropdown'] ) ? '1' : '0'; 455 464 456 465 echo $before_widget; 457 if ( $title ) 458 echo $before_title . $title . $after_title; 466 if ( $title ) { 467 echo $before_title; 468 if ( $d ) 469 echo '<label for="' . $this->id_base . '-dropdown-' . $this->number . '">' . $title . '</label>'; 470 else 471 echo $title; 472 echo $after_title; 473 } 459 474 460 $cat_args = array( 'orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);475 $cat_args = array( 'orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h ); 461 476 462 477 if ( $d ) { 463 478 $cat_args['show_option_none'] = __('Select Category'); 464 wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args)); 479 $cat_args['id'] = $this->id_base . '-dropdown-' . $this->number; 480 wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) ); 465 481 ?> 466 482 467 483 <script type='text/javascript'> 468 484 /* <![CDATA[ */ 469 var dropdown = document.getElementById(" cat");485 var dropdown = document.getElementById("<?php echo $this->id_base . '-dropdown-' . $this->number; ?>"); 470 486 function onCatChange() { 471 487 if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { 472 488 location.href = "<?php echo home_url(); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value;