Fixed Admin Menus — The Plugin Enhanced

Share
   Posted by: BJ Johnson in plugin, WordPress

With the release of WordPress 3.2, it's time for a plugin update. The Admin Screen layout and menus have changed a bit, many things for the better, and Ozh updated his plugin for v3.2 compatibility. My turn. Going in, my concern was how to make these new changes and not have WordPress 3.1.x users end up with screwed up menu bars. No way to know until I dived into the code of the new Admin system to figure out what had changed.

This Darn Thing...
The User Menu on the right end of the Admin Header (the Howdy menu) gave me the most trouble, due to the now collapsible Standard Admin Menu that normally occupies the left side of the screen when Ozh' Admin Drop Down Menu is not activated. When expanded, the Standard Admin Menu horizontally compresses the Admin widgets but shifts the User Menu off-screen to the right. I fought with this for quite a while; right up until I finally stepped back and re-evaluated the entire situation from a User Centered Design perspective. User Centered Design is something quite often overlooked. And it shouldn't be. Not many designers do it. Most have no idea what it is. Yet, it is the essential component of any successful design. When I donned the User Centered Design glasses, I realized that this pesky menu is in the wrong place. Yes, there are the Screen Options and Help buttons over there but one rarely uses them. All of the rest of the menus are on the left; extending toward left center. "What's that thing doing over there?" rang in my head. Let's see what's possible. One tweak to my code and problem solved. Now, everything is in one area; making workflow even more efficient.
If It's a Menu, It's Fixed
One of the nicest enhancements is that I made the new Standard Menu fixed-position in both expanded and collapsed modes. So, if you don't have Ozh' menu installed and activated, the Standard Admin Menu now stays put when you scroll. Cool. While in there, I adjusted the positioning of the upper page elements, so as to more efficiently make use of the space available. The Page Title Header on the left is moved up, so that it overlaps vertically the Screen Options and Help buttons on the right; instead of dropping below them; creating a big empty space in the middle. They never get anywhere near each other. Why not compress the space?

Once I got everything set to handle all six possible combinations of what's activated and what's deactivated—what's on and what's off—what's expanded and what's collapsed and everything looked well placed, it's time to poke the compatibility dragon. Fearing the worst, that I was going to be spending at least as much time, if not more, making my plugin work on an earlier WP version, I sent the new code up to my 3.1.4 version install and reloaded the page. "What the...? The page looked fine running the new code on the 3.1 version. My initial concern was unfounded. A couple of positioning tweaks could have been made but they aren't so jarring, so as to require users to load an older version just for that. It looked great just the way it is and users running older versions get the benefit of the new positioning.

Backwards compatible is a Good Thing™
You should upgrade your WP to the current shipping version anyway, but many people wait or don't get around to it right away. While that is going on, the plugin notifies them that there is an updated version. They're covered.
Now, the plugin does this:
All Three Admin Menu Bars Stacked, Compressed and Fixed
Ozh' Admin Drop Down Menu Activated Admin Bar On, Admin Header On • All Fixed-Position
Admin Bar Off, Two Admin Menu Bars Stacked, Compressed and Fixed
Ozh' Admin Drop Down Menu Activated Admin Bar Off, Admin Header On • All Fixed-Position
Admin Bar On, Admin Header On, Standard WordPress Admin Menu Expanded - All Three Fixed
Ozh' Admin Drop Down Menu Deactivated Admin Bar On, Admin Header On Standard WordPress Admin Menu Expanded • All Fixed-Position
Admin Bar Off, Admin Header On, Standard WordPress Admin Menu Collapsed - Both Fixed
Ozh' Admin Drop Down Menu Deactivated Admin Bar Off, Admin Header On Standard WordPress Admin Menu Collapsed • All Fixed-Position
Solved another natty problem and made it more functional. Check it out. Let me know how it works for you and if there's anything I could improve upon.

Download the latest version at The WordPress.org Plugin Directory.

I hope you enjoy it. And, as always, Thanks to Ozh for encouraging me to jump in and write this. If you have feedback, a support request or just wish to ask a question about this plugin, please enter a comment. And, if you'd like to help a real starving artist, please buy us some cat food for our Bengal and Maine Coon rescues. Thank You.

Tags: , , , , , ,

Short URL for this post: //spherical.org/s/5g
More from “The Art & Engineering of B.E.Johnson”right-filler-bar

One Response to Fixed Admin Menus — The Plugin Enhanced

  •   

    I wound that after reading your post I was more informed than when I use WordPress site. Very informative and a great benefit. I will certainly go over more of your posts. Thank you so much for the information.
    Best regards.
    Jeremiah

    July 17, 2011 at 5:36 pm
    Reply
  • Post Your Response:

    Leave a Reply

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


    Copyright © 1976-2024 The Art & Engineering of B.E.Johnson