Changeset 20592
- Timestamp:
- 04/25/2012 07:37:19 PM (13 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-plugin-install-list-table.php
r19712 r20592 63 63 } 64 64 65 add_action( 'install_plugins_table_header', 'install_search_form' );65 add_action( 'install_plugins_table_header', 'install_search_form', 10, 0 ); 66 66 break; 67 67 -
trunk/wp-admin/includes/class-wp-theme-install-list-table.php
r20414 r20592 79 79 } 80 80 81 add_action( 'install_themes_table_header', 'install_theme_search_form' );81 add_action( 'install_themes_table_header', 'install_theme_search_form', 10, 0 ); 82 82 break; 83 83 -
trunk/wp-admin/includes/plugin-install.php
r20490 r20592 85 85 86 86 <h4><?php _e('Search') ?></h4> 87 <p class="install-help"><?php _e('Search for plugins by keyword, author, or tag.') ?></p> 88 <?php install_search_form(); ?> 87 <?php install_search_form( false ); ?> 89 88 90 89 <h4><?php _e('Popular tags') ?></h4> … … 117 116 * @since 2.7.0 118 117 */ 119 function install_search_form( ){118 function install_search_form( $type_selector = true ) { 120 119 $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; 121 120 $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; … … 123 122 ?><form id="search-plugins" method="get" action=""> 124 123 <input type="hidden" name="tab" value="search" /> 124 <?php if ( $type_selector ) : ?> 125 125 <select name="type" id="typeselector"> 126 126 <option value="term"<?php selected('term', $type) ?>><?php _e('Keyword'); ?></option> … … 128 128 <option value="tag"<?php selected('tag', $type) ?>><?php _ex('Tag', 'Plugin Installer'); ?></option> 129 129 </select> 130 <?php endif; ?> 130 131 <input type="search" name="s" value="<?php echo esc_attr($term) ?>" /> 131 132 <label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label> -
trunk/wp-admin/includes/theme-install.php
r20333 r20592 50 50 * @since 2.8.0 51 51 */ 52 function install_theme_search_form( ) {52 function install_theme_search_form( $type_selector = true ) { 53 53 $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : ''; 54 54 $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; 55 if ( ! $type_selector ) 56 echo '<p class="install-help">' . __( 'Search for themes by keyword.' ) . '</p>'; 55 57 ?> 56 <p class="install-help"><?php _e('Search for themes by keyword, author, or tag.') ?></p>57 58 58 <form id="search-themes" method="get" action=""> 59 59 <input type="hidden" name="tab" value="search" /> 60 <?php if ( $type_selector ) : ?> 60 61 <select name="type" id="typeselector"> 61 62 <option value="term" <?php selected('term', $type) ?>><?php _e('Keyword'); ?></option> … … 63 64 <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option> 64 65 </select> 66 <?php endif; ?> 65 67 <input type="search" name="s" size="30" value="<?php echo esc_attr($term) ?>" /> 66 68 <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?> … … 75 77 */ 76 78 function install_themes_dashboard() { 77 install_theme_search_form( );79 install_theme_search_form( false ); 78 80 ?> 79 81 <h4><?php _e('Feature Filter') ?></h4> 80 <p class="install-help"><?php _e( 'Find a theme based on specific features')?></p>82 <p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p> 81 83 82 84 <form method="get" action="">
Note: See TracChangeset
for help on using the changeset viewer.