Only show 'About this version' menu item to logged in users.

git-svn-id: https://develop.svn.wordpress.org/trunk@18777 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2011-09-26 08:40:31 +00:00
parent a7767fbcec
commit f8f9a7c6d7
1 changed files with 10 additions and 8 deletions

View File

@ -81,13 +81,15 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) {
),
) );
// Add "About This Version" link
$wp_admin_bar->add_menu( array(
'parent' => 'wp-logo',
'id' => 'about',
'title' => __('About This Version'),
'href' => admin_url('about.php'),
) );
if ( is_user_logged_in() ) {
// Add "About This Version" link
$wp_admin_bar->add_menu( array(
'parent' => 'wp-logo',
'id' => 'about',
'title' => __('About This Version'),
'href' => admin_url('about.php'),
) );
}
// Add codex link
$wp_admin_bar->add_menu( array(
@ -692,4 +694,4 @@ function _get_admin_bar_pref( $context = 'front', $user = 0 ) {
return 'true' === $pref;
}
?>
?>