PHP Cross Reference of WordPress Subversion HEAD |
| [ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] |
[Summary view] [Print] [Text view]
1 <?php 2 if ( defined('ABSPATH') ) 3 require_once( ABSPATH . 'wp-config.php'); 4 else 5 require_once('../wp-config.php'); 6 7 if ( get_option('db_version') != $wp_db_version ) { 8 wp_redirect(get_option('siteurl') . '/wp-admin/upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI']))); 9 exit; 10 } 11 12 require_once (ABSPATH . 'wp-admin/includes/admin.php'); 13 14 auth_redirect(); 15 16 nocache_headers(); 17 18 update_category_cache(); 19 20 wp_get_current_user(); 21 22 $posts_per_page = get_option('posts_per_page'); 23 $what_to_show = get_option('what_to_show'); 24 $date_format = get_option('date_format'); 25 $time_format = get_option('time_format'); 26 27 wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback')); 28 29 wp_enqueue_script( 'fat' ); 30 31 $editing = false; 32 33 if (isset($_GET['page'])) { 34 $plugin_page = stripslashes($_GET['page']); 35 $plugin_page = plugin_basename($plugin_page); 36 } 37 38 require (ABSPATH . 'wp-admin/menu.php'); 39 40 // Handle plugin admin pages. 41 if (isset($plugin_page)) { 42 $page_hook = get_plugin_page_hook($plugin_page, $pagenow); 43 44 if ( $page_hook ) { 45 do_action('load-' . $page_hook); 46 if (! isset($_GET['noheader'])) 47 require_once (ABSPATH . 'wp-admin/admin-header.php'); 48 49 do_action($page_hook); 50 } else { 51 if ( validate_file($plugin_page) ) { 52 wp_die(__('Invalid plugin page')); 53 } 54 55 if (! file_exists(ABSPATH . PLUGINDIR . "/$plugin_page")) 56 wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); 57 58 do_action('load-' . $plugin_page); 59 60 if (! isset($_GET['noheader'])) 61 require_once (ABSPATH . 'wp-admin/admin-header.php'); 62 63 include(ABSPATH . PLUGINDIR . "/$plugin_page"); 64 } 65 66 include (ABSPATH . 'wp-admin/admin-footer.php'); 67 68 exit(); 69 } else if (isset($_GET['import'])) { 70 71 $importer = $_GET['import']; 72 73 if ( ! current_user_can('import') ) 74 wp_die(__('You are not allowed to import.')); 75 76 if ( validate_file($importer) ) { 77 wp_die(__('Invalid importer.')); 78 } 79 80 // Allow plugins to define importers as well 81 if (! is_callable($wp_importers[$importer][2])) 82 { 83 if (! file_exists(ABSPATH . "wp-admin/import/$importer.php")) 84 { 85 wp_die(__('Cannot load importer.')); 86 } 87 include(ABSPATH . "wp-admin/import/$importer.php"); 88 } 89 90 $parent_file = 'edit.php'; 91 $submenu_file = 'import.php'; 92 $title = __('Import'); 93 94 if (! isset($_GET['noheader'])) 95 require_once (ABSPATH . 'wp-admin/admin-header.php'); 96 97 require_once (ABSPATH . 'wp-admin/includes/upgrade.php'); 98 99 define('WP_IMPORTING', true); 100 101 call_user_func($wp_importers[$importer][2]); 102 103 include (ABSPATH . 'wp-admin/admin-footer.php'); 104 105 exit(); 106 } else { 107 do_action("load-$pagenow"); 108 } 109 110 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs | Cross-referenced by PHPXref 0.6 and RedAlt |