Ticket #18724: 18724_jk.patch
File 18724_jk.patch, 6.5 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/plugin-install.php
86 86 <h4><?php _e('Search') ?></h4> 87 87 <p class="install-help"><?php _e('Search for plugins by keyword, author, or tag.') ?></p> 88 88 <?php install_search_form(); ?> 89 89 <br class="clear" /> 90 90 <h4><?php _e('Popular tags') ?></h4> 91 91 <p class="install-help"><?php _e('You may also browse based on the most popular tags in the Plugin Directory:') ?></p> 92 92 <?php … … 114 114 /** 115 115 * Display search form for searching plugins. 116 116 * 117 * @param object $list_table. The WP_List_Table to use to generate pagination 118 * for the search form. Defaults to null, meaning no pagination will be 119 * generated by default. 120 * 117 121 * @since 2.7.0 118 122 */ 119 function install_search_form( ){123 function install_search_form( $list_table = null ){ 120 124 $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; 121 125 $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; 122 126 123 127 ?><form id="search-plugins" method="get" action=""> 124 128 <input type="hidden" name="tab" value="search" /> 125 <select name="type" id="typeselector"> 126 <option value="term"<?php selected('term', $type) ?>><?php _e('Term'); ?></option> 127 <option value="author"<?php selected('author', $type) ?>><?php _e('Author'); ?></option> 128 <option value="tag"<?php selected('tag', $type) ?>><?php _ex('Tag', 'Plugin Installer'); ?></option> 129 </select> 130 <input type="text" name="s" value="<?php echo esc_attr($term) ?>" /> 131 <label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label> 132 <?php submit_button( __( 'Search Plugins' ), 'button', 'plugin-search-input', false ); ?> 129 <div class="alignleft actions"> 130 <select name="type" id="typeselector"> 131 <option value="term"<?php selected('term', $type) ?>><?php _e('Term'); ?></option> 132 <option value="author"<?php selected('author', $type) ?>><?php _e('Author'); ?></option> 133 <option value="tag"<?php selected('tag', $type) ?>><?php _ex('Tag', 'Plugin Installer'); ?></option> 134 </select> 135 <input type="text" name="s" value="<?php echo esc_attr($term) ?>" /> 136 <label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label> 137 <?php submit_button( __( 'Search Plugins' ), 'button', 'plugin-search-input', false ); ?> 138 </div> 139 <?php 140 if ( isset( $list_table ) ) { 141 $list_table->pagination( 'top' ); 142 } 143 ?> 133 144 </form><?php 134 145 } 135 146 -
wp-admin/includes/class-wp-plugin-install-list-table.php
113 113 function display_tablenav( $which ) { 114 114 if ( 'top' == $which ) { ?> 115 115 <div class="tablenav top"> 116 <div class="alignleft actions"> 117 <?php do_action( 'install_plugins_table_header' ); ?> 118 </div> 119 <?php $this->pagination( $which ); ?> 116 <?php do_action( 'install_plugins_table_header', $this ); ?> 120 117 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" /> 121 118 <br class="clear" /> 122 119 </div> -
wp-admin/includes/class-wp-theme-install-list-table.php
130 130 131 131 // wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); 132 132 ?> 133 <div class="tablenav top themes"> 134 <div class="alignleft actions"> 135 <?php do_action( 'install_themes_table_header' ); ?> 136 </div> 137 <?php $this->pagination( 'top' ); ?> 133 <div class="tablenav top themes"> 134 <?php do_action( 'install_themes_table_header', $this ); ?> 138 135 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" /> 139 136 <br class="clear" /> 140 137 </div> -
wp-admin/includes/theme-install.php
47 47 /** 48 48 * Display search form for searching themes. 49 49 * 50 * @param object $list_table. The WP_List_Table to use to generate pagination 51 * for the search form. Defaults to null, meaning no pagination will be 52 * generated by default. 53 * 50 54 * @since 2.8.0 51 55 */ 52 function install_theme_search_form( ) {56 function install_theme_search_form( $list_table = null ) { 53 57 $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : ''; 54 58 $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; 55 59 ?> 56 60 <p class="install-help"><?php _e('Search for themes by keyword, author, or tag.') ?></p> 57 58 61 <form id="search-themes" method="get" action=""> 59 62 <input type="hidden" name="tab" value="search" /> 60 <select name="type" id="typeselector"> 61 <option value="term" <?php selected('term', $type) ?>><?php _e('Term'); ?></option> 62 <option value="author" <?php selected('author', $type) ?>><?php _e('Author'); ?></option> 63 <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option> 64 </select> 65 <input type="text" name="s" size="30" value="<?php echo esc_attr($term) ?>" /> 66 <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?> 63 <div class="alignleft actions"> 64 <select name="type" id="typeselector"> 65 <option value="term" <?php selected('term', $type) ?>><?php _e('Term'); ?></option> 66 <option value="author" <?php selected('author', $type) ?>><?php _e('Author'); ?></option> 67 <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option> 68 </select> 69 <input type="text" name="s" size="30" value="<?php echo esc_attr($term) ?>" /> 70 <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?> 71 </div> 72 <?php 73 if ( isset( $list_table ) ) { 74 $list_table->pagination( 'top' ); 75 } 76 ?> 67 77 </form> 68 78 <?php 69 79 } … … 76 86 function install_themes_dashboard() { 77 87 install_theme_search_form(); 78 88 ?> 89 <br class="clear" /> 79 90 <h4><?php _e('Feature Filter') ?></h4> 80 91 <form method="post" action="<?php echo self_admin_url( 'theme-install.php?tab=search' ); ?>"> 81 92 <p class="install-help"><?php _e('Find a theme based on specific features') ?></p>