+if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) )
+ $taxnow = $_REQUEST['taxonomy'];
+else
+ $taxnow = '';
+
+if ( WP_NETWORK_ADMIN )
+ require(ABSPATH . 'wp-admin/network/menu.php');
+elseif ( WP_USER_ADMIN )
+ require(ABSPATH . 'wp-admin/user/menu.php');
+else
+ require(ABSPATH . 'wp-admin/menu.php');
+
+if ( current_user_can( 'manage_options' ) ) {
+ wp_raise_memory_limit( 'admin' );
+}
+
+/**
+ * Fires as an admin screen or script is being initialized.
+ *
+ * Note, this does not just run on user-facing admin screens.
+ * It runs on admin-ajax.php and admin-post.php as well.
+ *
+ * This is roughly analogous to the more general {@see 'init'} hook, which fires earlier.
+ *
+ * @since 2.5.0
+ */
+do_action( 'admin_init' );
+
+if ( isset($plugin_page) ) {
+ if ( !empty($typenow) )
+ $the_parent = $pagenow . '?post_type=' . $typenow;
+ else
+ $the_parent = $pagenow;
+ if ( ! $page_hook = get_plugin_page_hook($plugin_page, $the_parent) ) {
+ $page_hook = get_plugin_page_hook($plugin_page, $plugin_page);
+
+ // Back-compat for plugins using add_management_page().
+ if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) {
+ // There could be plugin specific params on the URL, so we need the whole query string
+ if ( !empty($_SERVER[ 'QUERY_STRING' ]) )
+ $query_string = $_SERVER[ 'QUERY_STRING' ];
+ else
+ $query_string = 'page=' . $plugin_page;
+ wp_redirect( admin_url('tools.php?' . $query_string) );
+ exit;
+ }
+ }
+ unset($the_parent);
+}
+
+$hook_suffix = '';
+if ( isset( $page_hook ) ) {
+ $hook_suffix = $page_hook;
+} elseif ( isset( $plugin_page ) ) {
+ $hook_suffix = $plugin_page;
+} elseif ( isset( $pagenow ) ) {
+ $hook_suffix = $pagenow;
+}
+
+set_current_screen();