JayminKapish
Subscribe to jayminkapish RSS Friend Jaymin Patel on Facebook Follow Jaymin Patel on Twitter

« Go to home page

WordPress MU: accessing blogs from dropdown in admin bar

function my_blogs_listing($actions) {
global $current_user;
$blogs = get_blogs_of_user( $current_user->ID );
$actions["#"] = array("*** My Blogs ***", 'edit_dashboard');
foreach ($blogs as $blog) {
$actions["{$blog->siteurl}/wp-admin/"] = array($blog->blogname, 'level_7');
}
return $actions;
}
add_filter('favorite_actions', 'my_blogs_listing');

This code snippet (can be used as a plugin) adds list of blogs that user has access to on MU site. Blogname links to blog’s wp-admin, saving you time.


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


About

Wordpress Work

Plugins I like

Recent Posts

Wordpress News

Blogroll

Connect

I am excited about