[wp-trac] [WordPress Trac] #16005: When trying to remove an item from the admin bar, a blank spot is added in lieu of it
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 7 23:12:50 UTC 2011
#16005: When trying to remove an item from the admin bar, a blank spot is added in
lieu of it
----------------------------+---------------------
Reporter: sorich87 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.1
Component: Administration | Version: 3.1
Severity: normal | Resolution: fixed
Keywords: has-patch |
----------------------------+---------------------
Comment (by kpdesign):
Replying to [comment:13 sorich87]:
> The ID of these items is not "dashboard" but
"blog-{$blog->userblog_id}-d". See /wp-includes/admin-bar.php, line 137.
[[BR]]
Are you referring to /wp-includes/admin-bar.php, line 122?
{{{
$wp_admin_bar->add_menu( array( 'parent' => 'blog-' .
$blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-d', 'title'
=> __( 'Dashboard' ), 'href' => get_admin_url($blog->userblog_id) ) );
}}}
I tried the following code in my function to remove those menu links,
based on the id in the above code, without any success - those links still
show for a subscriber:
{{{
$wp_admin_bar->remove_menu('blog-'.$blog->userblog_id.'-d');
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16005#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list