Greets:
Has a request to do a Global Dashboard drop down just like they have over at wp.com. I copied over a portion of the "Display your blogs if you're signed in" that we use on teh home page. Copied below.
If anyone's bored this weekend, care to take a shot on editing it to display the blog's names instead of the URL?
Thanks,
-drmike
Open up /wp-admin/admin-header.php and add in the following after the
</span></h1>
line and before the
</div>
:
<?php
$blogs = get_blogs_of_user($current_user->ID);
echo "<form name="jump">n";
echo "<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">n";
if ( ! empty($blogs) ) foreach ( $blogs as $blog ) {
echo "<option value='http://" . $blog->domain . $blog->path . "wp-admin/'>" . $blog->domain . $blog->path . "</option>n";
}
echo "</select>n";
echo "</form>n";
?>
Do note that those lone 'n's in there are slash-n's to make a new line within the html. That and the internal quotes need to be slash-quotes. I think everything else is right.
this would integrate with admin bar plugin?
It wouldn't. Global Dashboard is on the wp-admin side.
I realized on my walk home that night that even wp.com doesn't display the Blog Title, just the machine name of the blog.
lunabyte
Member
Posted 17 years ago #
I put something "similar" to this in a widget. If the user is logged in, it displays all their blogs by title (title links to blog), and then a dashboard link in paranthesis behind it.
Going to tack on the same list to the end of the right column of the dashboard someday soon as well.
Not sure if it will help anything, but it might make it more convenient for a few people.
I use a similar feature in our admin bar. Need some polishing work still.
Agreed. That's why I have in there: "If anyone's bored this weekend, care to take a shot on editing it to display the blog's names instead of the URL?" :)
lunabyte
Member
Posted 17 years ago #
I "wish" I would have been bored this weekend. lol
gumdrop
Member
Posted 17 years ago #