Ticket #15353: search_box.15353.diff
| File search_box.15353.diff, 11.5 KB (added by scribu, 2 years ago) |
|---|
-
wp-admin/users.php
357 357 358 358 <form action="" method="post"> 359 359 360 <?php if ( $wp_list_table->has_items() ) :?>360 <?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?> 361 361 362 <p class="search-box">363 <label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label>364 <input type="text" id="user-search-input" name="s" value="<?php echo esc_attr($usersearch); ?>" />365 <?php submit_button( __( 'Search Users' ), 'button', 'submit', false ); ?>366 </p>367 368 <?php endif; ?>369 370 362 <?php $wp_list_table->display(); ?> 371 363 </form> 372 364 -
wp-admin/edit-comments.php
220 220 221 221 <form id="comments-form" action="" method="post"> 222 222 223 <?php if ( $wp_list_table->has_items() ) :?>223 <?php $wp_list_table->search_box( __( 'Search Comments' ), 'comment' ); ?> 224 224 225 <p class="search-box">226 <label class="screen-reader-text" for="comment-search-input"><?php _e( 'Search Comments' ); ?>:</label>227 <input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />228 <?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>229 </p>230 231 <?php endif; ?>232 233 225 <?php if ( $post_id ) : ?> 234 226 <input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" /> 235 227 <?php endif; ?> -
wp-admin/includes/class-wp-list-table.php
179 179 } 180 180 181 181 /** 182 * Display the search box. 183 * 184 * @since 3.1.0 185 * @access public 186 * 187 * @param string $text The search button text 188 * @param string $input_id The search input id 189 */ 190 function search_box( $text, $input_id ) { 191 if ( empty( $_REQUEST['s'] ) && !$this->has_items() ) 192 return; 193 194 $input_id = $input_id . '-search-input'; 195 196 ?> 197 <p class="search-box"> 198 <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label> 199 <input type="text" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" /> 200 <?php submit_button( $text, 'button', 'submit', false ); ?> 201 </p> 202 <?php 203 } 204 205 /** 182 206 * Get an associative array ( id => link ) with the list 183 207 * of views available on this table. 184 208 * -
wp-admin/edit-tags.php
237 237 <form class="search-form" action="" method="get"> 238 238 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> 239 239 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> 240 <p class="search-box"> 241 <label class="screen-reader-text" for="tag-search-input"><?php echo $tax->labels->search_items; ?>:</label> 242 <input type="text" id="tag-search-input" name="s" value="<?php _admin_search_query(); ?>" /> 243 <?php submit_button( $tax->labels->search_items, 'button', 'search-items', false ); ?> 244 </p> 240 241 <?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?> 242 245 243 </form> 246 244 <br class="clear" /> 247 245 -
wp-admin/upload.php
206 206 207 207 <form id="posts-filter" action="" method="post"> 208 208 209 <?php if ( $wp_list_table->has_items() ) :?>209 <?php $wp_list_table->search_box( __( 'Search Media' ), 'media' ); ?> 210 210 211 <p class="search-box">212 <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label>213 <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />214 <?php submit_button( __( 'Search Media' ), 'button', 'submit', false ); ?>215 </p>216 217 <?php endif; ?>218 219 211 <?php $wp_list_table->display(); ?> 220 212 221 213 <div id="ajax-response"></div> -
wp-admin/network/users.php
79 79 <?php $wp_list_table->views(); ?> 80 80 81 81 <form action="" method="get" class="search-form"> 82 <p class="search-box"> 83 <input type="text" name="s" value="<?php echo esc_attr( $usersearch ); ?>" class="search-input" id="user-search-input" /> 84 <?php submit_button( __( 'Search Users' ), 'button', 'post-query-submit', false ); ?> 85 </p> 82 <?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?> 86 83 </form> 87 84 88 85 <form id="form-user-list" action='edit.php?action=allusers' method='post'> … … 90 87 </form> 91 88 </div> 92 89 93 <?php require_once( '../admin-footer.php' ); ?> 94 No newline at end of file 90 <?php require_once( '../admin-footer.php' ); ?> -
wp-admin/network/site-users.php
211 211 endif; ?> 212 212 213 213 <form class="search-form" action="" method="get"> 214 <p class="search-box"> 215 <label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label> 216 <input type="text" id="user-search-input" name="s" value="<?php echo esc_attr($usersearch); ?>" /> 217 <?php submit_button( __( 'Search Users' ), 'button', 'submit', false ); ?> 218 </p> 214 <?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?> 219 215 </form> 220 216 221 217 <?php $wp_list_table->views(); ?> … … 301 297 <?php endif; ?> 302 298 </div> 303 299 <?php 304 require('../admin-footer.php'); 305 No newline at end of file 300 require('../admin-footer.php'); -
wp-admin/network/themes.php
94 94 <h2><?php echo esc_html( $title ); if ( current_user_can('install_themes') ) { ?> <a href="theme-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php } ?></h2> 95 95 96 96 <form method="get" action=""> 97 <p class="search-box"> 98 <label class="screen-reader-text" for="theme-search-input"><?php _e( 'Search Themes' ); ?>:</label> 99 <input type="text" id="theme-search-input" name="s" value="<?php _admin_search_query(); ?>" /> 100 <?php submit_button( __( 'Search Installed Themes' ), 'button', '', false ); ?> 101 </p> 97 <?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?> 102 98 </form> 103 99 104 100 <?php $wp_list_table->views(); ?> … … 113 109 </div> 114 110 115 111 <?php 116 include(ABSPATH . 'wp-admin/admin-footer.php'); 117 No newline at end of file 112 include(ABSPATH . 'wp-admin/admin-footer.php'); -
wp-admin/network/sites.php
104 104 </h2> 105 105 106 106 <form action="" method="get" id="ms-search"> 107 < p class="search-box">107 <?php $wp_list_table->search_box( __( 'Search Sites' ), 'site' ); ?> 108 108 <input type="hidden" name="action" value="blogs" /> 109 <input type="text" name="s" value="<?php echo esc_attr( $s ); ?>" />110 <?php submit_button( __( 'Search Sites' ), 'button', 'submit', false ); ?>111 </p>112 109 </form> 113 110 114 111 <form id="form-site-list" action="edit.php?action=allblogs" method="post"> -
wp-admin/network/site-themes.php
152 152 <p><?php _e( 'Network enabled themes are not shown on this screen.' ) ?></p> 153 153 154 154 <form method="get" action=""> 155 <p class="search-box"> 156 <label class="screen-reader-text" for="theme-search-input"><?php _e( 'Search Themes' ); ?>:</label> 157 <input type="text" id="theme-search-input" name="s" value="<?php _admin_search_query(); ?>" /> 158 <?php submit_button( __( 'Search Installed Themes' ), 'button', '', false ); ?> 159 </p> 155 <?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?> 160 156 </form> 161 157 162 158 <?php $wp_list_table->views(); ?> … … 170 166 </form> 171 167 172 168 </div> 173 <?php include(ABSPATH . 'wp-admin/admin-footer.php'); ?> 174 No newline at end of file 169 <?php include(ABSPATH . 'wp-admin/admin-footer.php'); ?> -
wp-admin/plugins.php
377 377 378 378 <form method="post" action=""> 379 379 380 <?php if ( $wp_list_table->has_items() ) :?>380 <?php $wp_list_table->search_box( __( 'Search Plugins' ), 'plugin' ); ?> 381 381 382 <p class="search-box">383 <label class="screen-reader-text" for="plugin-search-input"><?php _e( 'Search Plugins' ); ?>:</label>384 <input type="text" id="plugin-search-input" name="s" value="<?php _admin_search_query(); ?>" />385 <?php submit_button( __( 'Search Installed Plugins' ), 'button', '', false ); ?>386 </p>387 388 <?php endif; ?>389 390 382 <input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" /> 391 383 <input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" /> 392 384 -
wp-admin/edit.php
242 242 243 243 <form id="posts-filter" action="" method="get"> 244 244 245 <?php if ( $wp_list_table->has_items() ) :?>245 <?php $wp_list_table->search_box( $post_type_object->labels->search_items, 'post' ); ?> 246 246 247 <p class="search-box">248 <label class="screen-reader-text" for="post-search-input"><?php echo $post_type_object->labels->search_items; ?>:</label>249 <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />250 <?php submit_button( $post_type_object->labels->search_items, 'button', 'submit', false ); ?>251 </p>252 253 <?php endif; ?>254 255 247 <input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" /> 256 248 <input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" /> 257 249 -
wp-admin/link-manager.php
76 76 77 77 <form id="posts-filter" action="" method="post"> 78 78 79 <?php if ( $wp_list_table->has_items() ) :?>79 <?php $wp_list_table->search_box( __( 'Search Links' ), 'link' ); ?> 80 80 81 <p class="search-box">82 <label class="screen-reader-text" for="link-search-input"><?php _e( 'Search Links' ); ?>:</label>83 <input type="text" id="link-search-input" name="s" value="<?php _admin_search_query(); ?>" />84 <?php submit_button( __( 'Search Links' ), 'button', '', false ); ?>85 </p>86 87 <?php endif; ?>88 89 81 <?php $wp_list_table->display(); ?> 90 82 91 83 <div id="ajax-response"></div> -
wp-admin/themes.php
146 146 147 147 <h3><?php _e('Available Themes'); ?></h3> 148 148 149 <?php if ( $wp_list_table->has_items() ) : ?>149 <?php if ( !empty( $_REQUEST['s'] ) || $wp_list_table->has_items() ) : ?> 150 150 151 151 <form class="search-form filter-form" action="" method="get"> 152 152
