WordPress 3.0 beta 1 documentation kindly provided to you by Hay Kranen
| [ Index ] |
PHP Cross Reference of WordPress 3.0 beta 1 |
|
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Install theme administration panel. 4 * 5 * @package WordPress 6 * @subpackage Administration 7 */ 8 9 /** WordPress Administration Bootstrap */ 10 require_once ('admin.php'); 11 12 if ( ! current_user_can('install_themes') ) 13 wp_die(__('You do not have sufficient permissions to install themes on this blog.')); 14 15 include (ABSPATH . 'wp-admin/includes/theme-install.php'); 16 17 $title = __('Install Themes'); 18 $parent_file = 'themes.php'; 19 $submenu_file = 'themes.php'; 20 21 wp_reset_vars( array('tab', 'paged') ); 22 wp_enqueue_style( 'theme-install' ); 23 wp_enqueue_script( 'theme-install' ); 24 25 add_thickbox(); 26 wp_enqueue_script( 'theme-preview' ); 27 28 //These are the tabs which are shown on the page, 29 $tabs = array(); 30 $tabs['dashboard'] = __('Search'); 31 if ( 'search' == $tab ) 32 $tabs['search'] = __('Search Results'); 33 $tabs['upload'] = __('Upload'); 34 $tabs['featured'] = _x('Featured','Theme Installer'); 35 //$tabs['popular'] = _x('Popular','Theme Installer'); 36 $tabs['new'] = _x('Newest','Theme Installer'); 37 $tabs['updated'] = _x('Recently Updated','Theme Installer'); 38 39 $nonmenu_tabs = array('theme-information'); //Valid actions to perform which do not have a Menu item. 40 41 $tabs = apply_filters('install_themes_tabs', $tabs ); 42 $nonmenu_tabs = apply_filters('install_themes_nonmenu_tabs', $nonmenu_tabs); 43 44 //If a non-valid menu tab has been selected, And its not a non-menu action. 45 if ( empty($tab) || ( ! isset($tabs[ $tab ]) && ! in_array($tab, (array)$nonmenu_tabs) ) ) { 46 $tab_actions = array_keys($tabs); 47 $tab = $tab_actions[0]; 48 } 49 if ( empty($paged) ) 50 $paged = 1; 51 52 $body_id = $tab; 53 54 do_action('install_themes_pre_' . $tab); //Used to override the general interface, Eg, install or theme information. 55 56 add_contextual_help($current_screen, plugins_search_help()); 57 58 include ('admin-header.php'); 59 ?> 60 <div class="wrap"> 61 <?php screen_icon(); ?> 62 <h2><a href="themes.php" class="menu-tabs menu-tab-inactive"><?php echo esc_html_x('Manage Themes', 'theme'); ?></a><a href="theme-install.php" class="menu-tabs"><?php echo esc_html( $title ); ?></a></h2> 63 64 <ul class="subsubsub"> 65 <?php 66 $display_tabs = array(); 67 foreach ( (array)$tabs as $action => $text ) { 68 $sep = ( end($tabs) != $text ) ? ' | ' : ''; 69 $class = ( $action == $tab ) ? ' class="current"' : ''; 70 $href = admin_url('theme-install.php?tab='. $action); 71 echo "\t\t<li><a href='$href'$class>$text</a>$sep</li>\n"; 72 } 73 ?> 74 </ul> 75 <br class="clear" /> 76 <?php do_action('install_themes_' . $tab, $paged); ?> 77 </div> 78 <?php 79 include ('admin-footer.php');
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Apr 5 14:26:09 2010 | Cross-referenced by PHPXref 0.7 |