diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
index 5496528f5d..27a2cee8b2 100644
--- a/wp-admin/includes/dashboard.php
+++ b/wp-admin/includes/dashboard.php
@@ -634,8 +634,10 @@ function wp_dashboard_incoming_links_output() {
echo "
\n";
- $count = 0;
- foreach ( $rss->get_items() as $item ) {
+ if ( !isset($items) )
+ $items = 10;
+
+ foreach ( $rss->get_items(0, $items) as $item ) {
$publisher = '';
$site_link = '';
$link = '';
diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php
index 4afb9ffe97..9b14af63d0 100644
--- a/wp-admin/includes/plugin.php
+++ b/wp-admin/includes/plugin.php
@@ -585,7 +585,7 @@ function uninstall_plugin($plugin) {
//
function add_menu_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '' ) {
- global $menu, $admin_page_hooks, $_registered_pages;
+ global $menu, $admin_page_hooks;
$file = plugin_basename( $file );
@@ -602,13 +602,11 @@ function add_menu_page( $page_title, $menu_title, $access_level, $file, $functio
$menu[] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
- $_registered_pages[$hookname] = true;
-
return $hookname;
}
function add_object_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') {
- global $menu, $admin_page_hooks, $_wp_last_object_menu, $_registered_pages;
+ global $menu, $admin_page_hooks, $_wp_last_object_menu;
$file = plugin_basename( $file );
@@ -625,13 +623,11 @@ function add_object_page( $page_title, $menu_title, $access_level, $file, $funct
$menu[$_wp_last_object_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
- $_registered_pages[$hookname] = true;
-
return $hookname;
}
function add_utility_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') {
- global $menu, $admin_page_hooks, $_wp_last_utility_menu, $_registered_pages;
+ global $menu, $admin_page_hooks, $_wp_last_utility_menu;
$file = plugin_basename( $file );
@@ -650,8 +646,6 @@ function add_utility_page( $page_title, $menu_title, $access_level, $file, $func
$menu[$_wp_last_utility_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
- $_registered_pages[$hookname] = true;
-
return $hookname;
}
@@ -660,7 +654,6 @@ function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $fi
global $menu;
global $_wp_real_parent_file;
global $_wp_submenu_nopriv;
- global $_registered_pages;
$file = plugin_basename( $file );
@@ -690,8 +683,6 @@ function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $fi
if (!empty ( $function ) && !empty ( $hookname ))
add_action( $hookname, $function );
- $_registered_pages[$hookname] = true;
-
return $hookname;
}
@@ -928,21 +919,14 @@ function user_can_access_admin_page() {
global $_wp_menu_nopriv;
global $_wp_submenu_nopriv;
global $plugin_page;
- global $_registered_pages;
$parent = get_admin_page_parent();
if ( !isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$parent][$pagenow] ) )
return false;
- if ( isset( $plugin_page ) ) {
- if ( isset( $_wp_submenu_nopriv[$parent][$plugin_page] ) )
- return false;
-
- $hookname = get_plugin_page_hookname($plugin_page, $parent);
- if ( !isset($_registered_pages[$hookname]) )
- return false;
- }
+ if ( isset( $plugin_page ) && isset( $_wp_submenu_nopriv[$parent][$plugin_page] ) )
+ return false;
if ( empty( $parent) ) {
if ( isset( $_wp_menu_nopriv[$pagenow] ) )