]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-plugin-install-list-table.php
WordPress 3.5.1
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-plugin-install-list-table.php
index 3de77c1d802d937c53875adb3bcba32d53458e1d..ca06dbedf9f078890546a4113b5b7d953ac9a4b4 100644 (file)
@@ -29,10 +29,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                $tabs['dashboard'] = __( 'Search' );
                if ( 'search' == $tab )
                        $tabs['search'] = __( 'Search Results' );
-               $tabs['upload'] = __( 'Upload' );
-               $tabs['featured'] = _x( 'Featured','Plugin Installer' );
-               $tabs['popular']  = _x( 'Popular','Plugin Installer' );
-               $tabs['new']      = _x( 'Newest','Plugin Installer' );
+               $tabs['upload']    = __( 'Upload' );
+               $tabs['featured']  = _x( 'Featured', 'Plugin Installer' );
+               $tabs['popular']   = _x( 'Popular', 'Plugin Installer' );
+               $tabs['new']       = _x( 'Newest', 'Plugin Installer' );
+               $tabs['favorites'] = _x( 'Favorites', 'Plugin Installer' );
 
                $nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item.
 
@@ -71,6 +72,17 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                                $args['browse'] = $tab;
                                break;
 
+                       case 'favorites':
+                               $user = isset( $_GET['user'] ) ? stripslashes( $_GET['user'] ) : get_user_option( 'wporg_favorites' );
+                               update_user_meta( get_current_user_id(), 'wporg_favorites', $user );
+                               if ( $user )
+                                       $args['user'] = $user;
+                               else
+                                       $args = false;
+
+                               add_action( 'install_plugins_favorites', 'install_plugins_favorites_form', 9, 0 );
+                               break;
+
                        default:
                                $args = false;
                }
@@ -115,13 +127,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
                                        <?php do_action( 'install_plugins_table_header' ); ?>
                                </div>
                                <?php $this->pagination( $which ); ?>
-                               <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
                                <br class="clear" />
                        </div>
                <?php } else { ?>
                        <div class="tablenav bottom">
                                <?php $this->pagination( $which ); ?>
-                               <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
                                <br class="clear" />
                        </div>
                <?php