-
+ DFE64B42C54CC4F4C1028000F4367B6044CEC2ABDAE986BF037F4D8462D1F6827AFA4E88A5856E2A128E7D9CD8812B530C9A8EE00B1DDC25C83124EDF67FA749
mp-wp/wp-admin/plugin-install.php
(0 . 0)(1 . 74)
54960 <?php
54961 /**
54962 * Install plugin administration panel.
54963 *
54964 * @package WordPress
54965 * @subpackage Administration
54966 */
54967
54968 /** WordPress Administration Bootstrap */
54969 require_once('admin.php');
54970
54971 if ( ! current_user_can('install_plugins') )
54972 wp_die(__('You do not have sufficient permissions to install plugins on this blog.'));
54973
54974 include(ABSPATH . 'wp-admin/includes/plugin-install.php');
54975
54976 $title = __('Install Plugins');
54977 $parent_file = 'plugins.php';
54978
54979 wp_reset_vars( array('tab', 'paged') );
54980 wp_enqueue_style( 'plugin-install' );
54981 wp_enqueue_script( 'plugin-install' );
54982 add_thickbox();
54983
54984 //These are the tabs which are shown on the page,
54985 $tabs = array();
54986 $tabs['dashboard'] = __('Start Page'); //TODO: Better name?
54987 if ( 'search' == $tab )
54988 $tabs['search'] = __('Search Results');
54989 $tabs['featured'] = __('Featured');
54990 $tabs['popular'] = __('Popular');
54991 $tabs['new'] = __('Newest');
54992 $tabs['updated'] = __('Recently Updated');
54993
54994 $nonmenu_tabs = array('install', 'plugin-information', 'upload'); //Valid actions to perform which do not have a Menu item.
54995
54996 $tabs = apply_filters('install_plugins_tabs', $tabs );
54997 $nonmenu_tabs = apply_filters('install_plugins_nonmenu_tabs', $nonmenu_tabs);
54998
54999 //If a non-valid menu tab has been selected, And its not a non-menu action.
55000 if( empty($tab) || ( ! isset($tabs[ $tab ]) && ! in_array($tab, (array)$nonmenu_tabs) ) ) {
55001 $tab_actions = array_keys($tabs);
55002 $tab = $tab_actions[0];
55003 }
55004 if( empty($paged) )
55005 $paged = 1;
55006
55007 $body_id = $tab;
55008
55009 do_action('install_plugins_pre_' . $tab); //Used to override the general interface, Eg, install or plugin information.
55010
55011 include('admin-header.php');
55012 ?>
55013 <div class="wrap">
55014 <?php screen_icon(); ?>
55015 <h2><?php echo wp_specialchars( $title ); ?></h2>
55016
55017 <ul class="subsubsub">
55018 <?php
55019 $display_tabs = array();
55020 foreach ( (array)$tabs as $action => $text ) {
55021 $sep = ( end($tabs) != $text ) ? ' | ' : '';
55022 $class = ( $action == $tab ) ? ' class="current"' : '';
55023 $href = admin_url('plugin-install.php?tab='. $action);
55024 echo "\t\t<li><a href='$href'$class>$text</a>$sep</li>\n";
55025 }
55026 ?>
55027 </ul>
55028 <br class="clear" />
55029 <?php do_action('install_plugins_' . $tab, $paged); ?>
55030 </div>
55031 <?php
55032 include('admin-footer.php');
55033 ?>