Ticket #18724: 29829.diff
| File 29829.diff, 2.3 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/includes/class-wp-plugin-install-list-table.php
273 273 return; 274 274 } 275 275 276 if ( 'top' == $which ) { ?> 276 if ( 'top' == $which ) { 277 wp_referer_field(); 278 ?> 277 279 <div class="tablenav top"> 278 280 <div class="alignleft actions"> 279 281 <?php -
src/wp-admin/includes/plugin-install.php
235 235 function display_plugins_table() { 236 236 global $wp_list_table; 237 237 238 if ( current_filter() == 'install_plugins_favorites' && empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) ) 239 return; 238 if ( current_filter() == 'install_plugins_favorites' && empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) ) { 239 return; 240 } 240 241 241 $wp_list_table->display(); 242 ?> 243 <form id="plugin-filter" action="" method="post"> 244 <?php 245 $wp_list_table->display(); 246 ?> 247 </form> 248 <?php 242 249 } 243 250 add_action( 'install_plugins_search', 'display_plugins_table' ); 244 251 add_action( 'install_plugins_popular', 'display_plugins_table' ); -
src/wp-admin/plugin-install.php
24 24 25 25 $wp_list_table = _get_list_table('WP_Plugin_Install_List_Table'); 26 26 $pagenum = $wp_list_table->get_pagenum(); 27 28 if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { 29 $location = remove_query_arg( '_wp_http_referer', wp_unslash( $_SERVER['REQUEST_URI'] ) ); 30 31 if ( ! empty( $_REQUEST['paged'] ) ) { 32 $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location ); 33 } 34 35 wp_redirect( $location ); 36 exit; 37 } 38 27 39 $wp_list_table->prepare_items(); 28 40 41 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); 42 43 if ( $pagenum > $total_pages && $total_pages > 0 ) { 44 wp_redirect( add_query_arg( 'paged', $total_pages ) ); 45 exit; 46 } 47 29 48 $title = __( 'Add Plugins' ); 30 49 $parent_file = 'plugins.php'; 31 50