+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' ) ) {
+ /**
+ * Filter the maximum memory limit available for administration screens.
+ *
+ * This only applies to administrators, who may require more memory for tasks like updates.
+ * Memory limits when processing images (uploaded or edited by users of any role) are
+ * handled separately.
+ *
+ * The WP_MAX_MEMORY_LIMIT constant specifically defines the maximum memory limit available
+ * when in the administration back-end. The default is 256M, or 256 megabytes of memory.
+ *
+ * @since 3.0.0
+ *
+ * @param string 'WP_MAX_MEMORY_LIMIT' The maximum WordPress memory limit. Default 256M.
+ */
+ @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
+}
+
+/**
+ * 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 analgous to the more general '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) ) {