WordPress.org

Make WordPress Core

Changeset 9144


Ignore:
Timestamp:
10/14/08 00:01:51 (6 years ago)
Author:
ryan
Message:

Plugin install updates from DD32. see #6015

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/plugin-install.php

    r9032 r9144  
    2323add_thickbox(); 
    2424 
    25 //These are the tabs which are shown on the page, Note that 'install' and 'plugin-information' are valid hooks, but not shown here due to not requiring the header 
    26 $tabs = array( 
    27             'search'    => __('Search Plugins'), 
    28             'upload'    => __('Upload a Plugin'), 
    29             'featured'  => __('Featured Plugins'), 
    30             'popular'   => __('Popular Plugins'), 
    31             'new'       => __('Newest Plugins'), 
    32             'updated'   => __('Recently Updated Plugins') 
    33         ); 
     25//These are the tabs which are shown on the page, 
     26$tabs = array(); 
     27$tabs['dashboard'] = __('Start Page'); //TODO: Better name? 
     28if ( 'search' == $tab ) 
     29    $tabs['search'] = __('Search Results'); 
     30$tabs['featured'] = __('Featured'); 
     31$tabs['popular']  = __('Popular'); 
     32$tabs['new']      = __('Newest'); 
     33$tabs['updated']  = __('Recently Updated'); 
     34 
     35$nonmenu_tabs = array('install', 'plugin-information', 'upload'); //Valid actions to perform which do not have a Menu item. 
    3436 
    3537$tabs = apply_filters('install_plugins_tabs', $tabs ); 
     38$nonmenu_tabs = apply_filters('install_plugins_nonmenu_tabs', $nonmenu_tabs); 
    3639 
    37 if( empty($tab) || ( ! isset($tabs[ $tab ]) && ! in_array($tab, array('install', 'plugin-information')) ) ){ 
     40//If a non-valid menu tab has been selected, And its not a non-menu action. 
     41if( empty($tab) || ( ! isset($tabs[ $tab ]) && ! in_array($tab, (array)$nonmenu_tabs) ) ) { 
    3842    $tab_actions = array_keys($tabs); 
    3943    $tab = $tab_actions[0]; 
     
    4448$body_id = $tab; 
    4549 
    46 do_action('install_plugins_pre_' . $tab); 
     50do_action('install_plugins_pre_' . $tab); //Used to override the general interface, Eg, install or plugin information. 
    4751 
    4852include('admin-header.php'); 
     
    6064?> 
    6165    </ul> 
     66    <br class="clear" /> 
    6267    <?php do_action('install_plugins_' . $tab, $paged); ?> 
    6368</div> 
Note: See TracChangeset for help on using the changeset viewer.