Changeset 11431 for trunk/wp-includes/default-widgets.php
- Timestamp:
- 05/22/2009 04:13:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r11427 r11431 65 65 $exclude = esc_attr( $instance['exclude'] ); 66 66 ?> 67 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>67 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> 68 68 <p> 69 <label for="<?php echo $this->get_field_id('sortby'); ?>"><?php _e( 'Sort by:' ); ?> 70 <select name="<?php echo $this->get_field_name('sortby'); ?>" id="<?php echo $this->get_field_id('sortby'); ?>" class="widefat"> 71 <option value="post_title"<?php selected( $instance['sortby'], 'post_title' ); ?>><?php _e('Page title'); ?></option> 72 <option value="menu_order"<?php selected( $instance['sortby'], 'menu_order' ); ?>><?php _e('Page order'); ?></option> 73 <option value="ID"<?php selected( $instance['sortby'], 'ID' ); ?>><?php _e( 'Page ID' ); ?></option> 74 </select> 75 </label> 69 <label for="<?php echo $this->get_field_id('sortby'); ?>"><?php _e( 'Sort by:' ); ?></label> 70 <select name="<?php echo $this->get_field_name('sortby'); ?>" id="<?php echo $this->get_field_id('sortby'); ?>" class="widefat"> 71 <option value="post_title"<?php selected( $instance['sortby'], 'post_title' ); ?>><?php _e('Page title'); ?></option> 72 <option value="menu_order"<?php selected( $instance['sortby'], 'menu_order' ); ?>><?php _e('Page order'); ?></option> 73 <option value="ID"<?php selected( $instance['sortby'], 'ID' ); ?>><?php _e( 'Page ID' ); ?></option> 74 </select> 76 75 </p> 77 76 <p> 78 <label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e( 'Exclude:' ); ?> <input type="text" value="<?php echo $exclude; ?>" name="<?php echo $this->get_field_name('exclude'); ?>" id="<?php echo $this->get_field_id('exclude'); ?>" class="widefat" /></label>77 <label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e( 'Exclude:' ); ?></label> <input type="text" value="<?php echo $exclude; ?>" name="<?php echo $this->get_field_name('exclude'); ?>" id="<?php echo $this->get_field_id('exclude'); ?>" class="widefat" /> 79 78 <br /> 80 79 <small><?php _e( 'Page IDs, separated by commas.' ); ?></small> … … 141 140 ?> 142 141 <p> 143 <label for="<?php echo $this->get_field_id('category'); ?>" >142 <label for="<?php echo $this->get_field_id('category'); ?>" class="screen-reader-text"><?php _e('Select Link Category'); ?></label> 144 143 <select class="widefat" id="<?php echo $this->get_field_id('category'); ?>" name="<?php echo $this->get_field_name('category'); ?>"> 145 144 <option value=""><?php _e('All Links'); ?></option> … … 151 150 } 152 151 ?> 153 </select></ label></p>152 </select></p> 154 153 <p> 155 <label for="<?php echo $this->get_field_id('images'); ?>"> 156 <input class="checkbox" type="checkbox" <?php checked($instance['images'], true) ?> id="<?php echo $this->get_field_id('images'); ?>" name="<?php echo $this->get_field_name('images'); ?>" /> <?php _e('Show Link Image'); ?></label><br />157 <label for="<?php echo $this->get_field_id('name'); ?>"> 158 <input class="checkbox" type="checkbox" <?php checked($instance['name'], true) ?> id="<?php echo $this->get_field_id('name'); ?>" name="<?php echo $this->get_field_name('name'); ?>" /> <?php _e('Show Link Name'); ?></label><br />159 <label for="<?php echo $this->get_field_id('description'); ?>"> 160 <input class="checkbox" type="checkbox" <?php checked($instance['description'], true) ?> id="<?php echo $this->get_field_id('description'); ?>" name="<?php echo $this->get_field_name('description'); ?>" /> <?php _e('Show Link Description'); ?></label><br />161 <label for="<?php echo $this->get_field_id('rating'); ?>"> 162 <input class="checkbox" type="checkbox" <?php checked($instance['rating'], true) ?> id="<?php echo $this->get_field_id('rating'); ?>" name="<?php echo $this->get_field_name('rating'); ?>" /> <?php _e('Show Link Rating'); ?></label>154 <label for="<?php echo $this->get_field_id('images'); ?>"><?php _e('Show Link Image'); ?></label> 155 <input class="checkbox" type="checkbox" <?php checked($instance['images'], true) ?> id="<?php echo $this->get_field_id('images'); ?>" name="<?php echo $this->get_field_name('images'); ?>" /><br /> 156 <label for="<?php echo $this->get_field_id('name'); ?>"><?php _e('Show Link Name'); ?></label> 157 <input class="checkbox" type="checkbox" <?php checked($instance['name'], true) ?> id="<?php echo $this->get_field_id('name'); ?>" name="<?php echo $this->get_field_name('name'); ?>" /><br /> 158 <label for="<?php echo $this->get_field_id('description'); ?>"><?php _e('Show Link Description'); ?></label> 159 <input class="checkbox" type="checkbox" <?php checked($instance['description'], true) ?> id="<?php echo $this->get_field_id('description'); ?>" name="<?php echo $this->get_field_name('description'); ?>" /><br /> 160 <label for="<?php echo $this->get_field_id('rating'); ?>"><?php _e('Show Link Rating'); ?></label> 161 <input class="checkbox" type="checkbox" <?php checked($instance['rating'], true) ?> id="<?php echo $this->get_field_id('rating'); ?>" name="<?php echo $this->get_field_name('rating'); ?>" /> 163 162 </p> 164 163 <?php … … 262 261 $dropdown = $instance['dropdown'] ? 'checked="checked"' : ''; 263 262 ?> 264 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>263 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p> 265 264 <p> 266 < label for="<?php echo $this->get_field_id('count'); ?>"><input class="checkbox" type="checkbox" <?php echo $count; ?> id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" /><?php _e('Show post counts'); ?></label>265 <input class="checkbox" type="checkbox" <?php echo $count; ?> id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" /> <label for="<?php echo $this->get_field_id('count'); ?>"><?php _e('Show post counts'); ?></label> 267 266 <br /> 268 < label for="<?php echo $this->get_field_id('dropdown'); ?>"><input class="checkbox" type="checkbox" <?php echo $dropdown; ?> id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>" /><?php _e('Display as a drop down'); ?></label>267 <input class="checkbox" type="checkbox" <?php echo $dropdown; ?> id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>" /> <label for="<?php echo $this->get_field_id('dropdown'); ?>"><?php _e('Display as a drop down'); ?></label> 269 268 </p> 270 269 <?php … … 317 316 $title = strip_tags($instance['title']); 318 317 ?> 319 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>318 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p> 320 319 <?php 321 320 } … … 357 356 $title = strip_tags($instance['title']); 358 357 ?> 359 <p><label for="<?php echo $this->get_field_id('title'); ?>"> 360 <?php _e('Title:'); ?> 361 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /> 362 </label></p> 358 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> 359 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p> 363 360 <?php 364 361 } … … 405 402 $text = format_to_edit($instance['text']); 406 403 ?> 407 <p><label for="<?php echo $this->get_field_id('title'); ?>"> 408 <?php _e('Title:'); ?> 409 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /> 410 </label></p> 404 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> 405 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p> 411 406 412 407 <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea> 413 408 414 <p><label for="<?php echo $this->get_field_id('filter'); ?>"> 415 <input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked($instance['filter']); ?> /> <?php _e('Automatically add paragraphs.') ?> 416 </label></p> 409 <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked($instance['filter']); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e('Automatically add paragraphs.'); ?></label></p> 417 410 <?php 418 411 } … … 495 488 $dropdown = (bool) $instance['dropdown']; 496 489 ?> 497 <p><label for="<?php echo $this->get_field_id('title'); ?>"> 498 <?php _e( 'Title:' ); ?> 499 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /> 500 </label></p> 501 502 <p><label for="<?php echo $this->get_field_id('dropdown'); ?>"> 503 <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>"<?php checked( $dropdown ); ?> /> 504 <?php _e( 'Show as dropdown' ); ?> 505 </label><br /> 506 507 <label for="<?php echo $this->get_field_id('count'); ?>"> 490 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:' ); ?></label> 491 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> 492 493 <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>"<?php checked( $dropdown ); ?> /> 494 <label for="<?php echo $this->get_field_id('dropdown'); ?>"><?php _e( 'Show as dropdown' ); ?></label><br /> 495 508 496 <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>"<?php checked( $count ); ?> /> 509 <?php _e( 'Show post counts' ); ?> 510 </label><br /> 511 512 <label for="<?php echo $this->get_field_id('hierarchical'); ?>"> 497 <label for="<?php echo $this->get_field_id('count'); ?>"><?php _e( 'Show post counts' ); ?></label><br /> 498 513 499 <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hierarchical'); ?>" name="<?php echo $this->get_field_name('hierarchical'); ?>"<?php checked( $hierarchical ); ?> /> 514 <?php _e( 'Show hierarchy' ); ?> 515 </label></p> 500 <label for="<?php echo $this->get_field_id('hierarchical'); ?>"><?php _e( 'Show hierarchy' ); ?></label></p> 516 501 <?php 517 502 } … … 597 582 $number = 5; 598 583 ?> 599 <p><label for="<?php echo $this->get_field_id('title'); ?>"> 600 <?php _e('Title:'); ?> 601 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p> 602 603 <p><label for="<?php echo $this->get_field_id('number'); ?>"> 604 <?php _e('Number of posts to show:'); ?> 605 <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3" /></label> 606 <br /><small><?php _e('(at most 15)'); ?></small></p> 584 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> 585 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> 586 587 <p><label for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of posts to show:'); ?></label> 588 <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3" /><br /> 589 <small><?php _e('(at most 15)'); ?></small></p> 607 590 <?php 608 591 } … … 683 666 $number = isset($instance['number']) ? absint($instance['number']) : 5; 684 667 ?> 685 <p><label for="<?php echo $this->get_field_id('title'); ?>"> 686 <?php _e('Title:'); ?> 687 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p> 688 689 <p><label for="<?php echo $this->get_field_id('number'); ?>"> 690 <?php _e('Number of comments to show:'); ?> 691 <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3" /></label> 692 <br /><small><?php _e('(at most 15)'); ?></small></p> 668 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> 669 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> 670 671 <p><label for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of comments to show:'); ?></label> 672 <input id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" size="3" /><br /> 673 <small><?php _e('(at most 15)'); ?></small></p> 693 674 <?php 694 675 } … … 892 873 if ( $inputs['url'] ) : 893 874 ?> 894 <p><label for="rss-url-<?php echo $number; ?>"> 895 <?php _e('Enter the RSS feed URL here:'); ?> 896 <input class="widefat" id="rss-url-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][url]" type="text" value="<?php echo $url; ?>" /> 897 </label></p> 875 <p><label for="rss-url-<?php echo $number; ?>"><?php _e('Enter the RSS feed URL here:'); ?></label> 876 <input class="widefat" id="rss-url-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][url]" type="text" value="<?php echo $url; ?>" /></p> 898 877 <?php endif; if ( $inputs['title'] ) : ?> 899 <p><label for="rss-title-<?php echo $number; ?>"> 900 <?php _e('Give the feed a title (optional):'); ?> 901 <input class="widefat" id="rss-title-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][title]" type="text" value="<?php echo $title; ?>" /> 902 </label></p> 878 <p><label for="rss-title-<?php echo $number; ?>"><?php _e('Give the feed a title (optional):'); ?></label> 879 <input class="widefat" id="rss-title-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][title]" type="text" value="<?php echo $title; ?>" /></p> 903 880 <?php endif; if ( $inputs['items'] ) : ?> 904 <p><label for="rss-items-<?php echo $number; ?>"> 905 <?php _e('How many items would you like to display?'); ?> 881 <p><label for="rss-items-<?php echo $number; ?>"><?php _e('How many items would you like to display?'); ?></label> 906 882 <select id="rss-items-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][items]"> 907 883 <?php … … 909 885 echo "<option value='$i' " . ( $items == $i ? "selected='selected'" : '' ) . ">$i</option>"; 910 886 ?> 911 </select> 912 </label></p> 887 </select></p> 913 888 <?php endif; if ( $inputs['show_summary'] ) : ?> 914 <p><label for="rss-show-summary-<?php echo $number; ?>"> 915 <input id="rss-show-summary-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][show_summary]" type="checkbox" value="1" <?php if ( $show_summary ) echo 'checked="checked"'; ?>/> 916 <?php _e('Display item content?'); ?> 917 </label></p> 889 <p><input id="rss-show-summary-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][show_summary]" type="checkbox" value="1" <?php if ( $show_summary ) echo 'checked="checked"'; ?>/> 890 <label for="rss-show-summary-<?php echo $number; ?>"><?php _e('Display item content?'); ?></label></p> 918 891 <?php endif; if ( $inputs['show_author'] ) : ?> 919 <p><label for="rss-show-author-<?php echo $number; ?>"> 920 <input id="rss-show-author-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][show_author]" type="checkbox" value="1" <?php if ( $show_author ) echo 'checked="checked"'; ?>/> 921 <?php _e('Display item author if available?'); ?> 922 </label></p> 892 <p><input id="rss-show-author-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][show_author]" type="checkbox" value="1" <?php if ( $show_author ) echo 'checked="checked"'; ?>/> 893 <label for="rss-show-author-<?php echo $number; ?>"><?php _e('Display item author if available?'); ?></label></p> 923 894 <?php endif; if ( $inputs['show_date'] ) : ?> 924 <p><label for="rss-show-date-<?php echo $number; ?>"> 925 <input id="rss-show-date-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][show_date]" type="checkbox" value="1" <?php if ( $show_date ) echo 'checked="checked"'; ?>/> 926 <?php _e('Display item date?'); ?> 927 </label></p> 895 <p><input id="rss-show-date-<?php echo $number; ?>" name="widget-rss[<?php echo $number; ?>][show_date]" type="checkbox" value="1" <?php if ( $show_date ) echo 'checked="checked"'; ?>/> 896 <label for="rss-show-date-<?php echo $number; ?>"><?php _e('Display item date?'); ?></label></p> 928 897 <?php 929 898 endif; … … 1012 981 function form( $instance ) { 1013 982 ?> 1014 <p><label for="<?php echo $this->get_field_id('title'); ?>"> 1015 <?php _e('Title:') ?> 1016 <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> 1017 </label></p> 983 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:') ?></label> 984 <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /></p> 1018 985 <?php 1019 986 }
Note: See TracChangeset
for help on using the changeset viewer.