Simple WP-Admin

Okay, this is one that people talk about a bit on the WPMU forums, but don't seem to have done.

I would like to provide my users with a very simple admin interface.

I would like to pick exactly what they see, without destroying my 'power user' view for myself. If I don't want my users having access to comments options, RSS options, themes, or whatever else, I would love to be able to set that up.

My users don't need to see the same (or almost the same) admin interface as me. I wish I didn't have to spend days fixing this issue, but without a plugin it looks like I'll need to. This is something that Drupal does nicely that WPMU (and WP) seems really complex on.

As an added bonus I'd love to be able to carry over the same theme as the rest of my site, but this may just be a custom theming job.

  • Andrew
    • Champion of Loops

    Nah, what i'd do is make a drop in replacement for wp-admin/menu.php and then a plugin to allow the admin to customize the menu.

    I'd have to release a new menu.php for every new version of wpmu but that's only a few times a year.


  • Andrew
    • Champion of Loops


    Sorry for the delay.

    While doing a bit of research for such a feature I discovered that a plugin already exists. It's called "Custom Admin Menu".

    So unless there is a serious flaw or problem with the existing plugin I won't be coding a new one.


  • Luke
    • The Crimson Coder

    Hey Andrew, that plugin intrigued me so I took a peek at it.

    It "works" with MU, but only to the extent that each user would have to customize their own menus.

    Granted, that could easily be corrected by changing xxx_option to xxx_site_option, but then you run into the problem of: Not every users option menu will be the same due to plugins and such varying by user.

    I think the intent of the OP's question was to have a unified menu across all blogs, but this particular plugin isn't capable of that.

    Not saying it can't be done, but for MU (unless you want each blog to be able to rearrange as they see fit, and not as the site admin wants) I don't think this alternative is a good choice.

    Also, it breaks any dropdown plugin as well.

    I suppose an "ideal" system would allow for customizing the main WP menu items, and then let plugins tack onto them as needed.

    Unfortunately, while the idea of this is plugin capability is good, it's going to be a more complex solution. While anything is possible, I'm not sure it would be feasible without hacking up menu.php a good deal as you previously mentioned.

  • Luke
    • The Crimson Coder

    Oh, I'll also note that some users seemed to be having trouble with the drag/drop and other functionality as well.

    I'll confirm that I couldn't get it to drag anything around in FF, yet neither firebug nor FF reported any script errors.

  • jman
    • Flash Drive

    Luke -- you are correct. My intention was a plugin that would enable a simplification of wp-admin for all users, allowing the admin to choose what is shown and what is not.

    I was hoping such a plugin was going to be released 3 weeks ago — at this point I guess I'll just have to hack menu.php to pieces myself.

  • Luke
    • The Crimson Coder

    "Most" of menu.php wouldn't be too bad to muck with.

    Most are hard coded array indexes, so no biggie there.

    You "could" even do something like making variables for each array index (like $menu[1] would be $menu[$menu_name]), and then make a list at the top of the file of all those variables and their values.

    Would at lease make it a tick easier to know what your overall order is.

    Same with the sub_menu stuff as well.

    To be honest, I've considered moving all menus from the top to the left hand side.

    The only downside to that is that WP takes up so much real estate to begin with. In an earlier incarnation of one of my sites, I did do this. It worked OK, but there were some pages that had to be hacked up. I've got dropdown menus for the top, but you can only have so much going across it as main tabs before it gets funky.

    And if the window size is less than about 900, it tarts putting things on a second row even with just the default stuff.

    Too bad IE doesn't recognize min-width in css. :slight_frown:

    I'd rather there be a horizontal scroll bar for that small fraction of users than have it jumble up.

    I'm going to have to think on this one for a bit.

  • jman
    • Flash Drive

    Hi Luke -- Thanks for all your help. Maybe you should post this over on the mu forums, as it doesn't look like the wpmudev premium folks are going to be attacking this problem. I would very much like to get a dialog going around ways to theme and customized wp-admin.

  • Luke
    • The Crimson Coder

    Well, you really only have a few options to theme it.

    1) hack it all to hell.

    2) modify the css, and hope internet explorer can handle it.

    3) a combination of the 2.

    WP-Admin just wasn't "designed" to be mucked with. If you're using WP, and the only one in the back, you can "kind of" control what goes on with a plugin, but "most" of those weren't compatible with IE. Tiger Admin comes to mind.

    I can't say that it's ever going to change, either.

    Look at the work of the shuttle project, and trying to get the admin area fixed up. It's been how long?

    The simplest, and coolest IMHO, would be to be able to have templates and themes for the admin area. Similar to how you have themes and templates for the front, drop it in, activate it, and call it a day.

    But, the admin area isn't written to handle anything close to it.

    While (mostly) there's a decent job of separating presentation and data in the front, the back is a train wreck.

    "Most" administration tasks could be turned into functions which would serve purpose as template tags, but it would take quite a bit to do it.

    Essentially, the entire back end would have to be reorganized, and not a file would go untouched. Thus far, WP has been unwilling to do that to any extent. They did put a new look on the login page (courtesy of the shuttle project), and a few other minor (very minor at that) tweaks, but other than that, it's virtually remained mostly the same since its inception.

    It seems that their philosophy is that the back is for an admin, so why bother?

    To me, a product should be a pleasing visual experience all the way through. Not only that, but consistent as well.

    If I use "theme x" on my blog, it would be great if the admin pages used the same thing, for example.

    Even if the templates were implemented in a "cheesy" fashion. You know what I'm talking about, where you just add in 1 tag like admin_dashboard() in a div. With calls to header, footer, and sidebar(s).

    That's still better than nothing, and at least the css could be "controlled".

    They could add in a hard coded login permalink, like /login/, that is automatically recognized and pulls in the login.php template. Again, at least the css could be played with.

    How cool would that be, even in a simple, cheesy form?

    Taking it further, once that is done, it could be further broken out into template tags, and an admin could modify the layout and content between certain template tags.

    To be honest, it's a big undertaking. And the longer they shy away from it, the more the snowball effect occurs and the more work it becomes to do it right.

    As for whether or not Andrew is willing to tackle the menus (in any fashion), I can't say. I can't speak for him.

    He did say though:

    "So unless there is a serious flaw or problem with the existing plugin I won't be coding a new one."

    Not that I'm holding him to that, mind you, but as we've uncovered, there is definitely issues with that plugin in an MU environment. I couldn't even get FF to move a menu item around, for what it's worth, and I even tried it on WP.

    I know Andrews schedule is pretty much like mine, and if it were me I can't say I'd put a high priority on it. Although that's me and not necessarily Andrew, I'm just throwing an example out.

    If you wanted to exclude certain menu items, you could always unset certain parts of the menu array, and hook into the admin head somewhere before the menu items are output.

    Then, if you wanted to move certain sub-menu items, you could set a new array value (under the top menu key that you want it under) which is equal to the "old" sub-menu key. Then, unset the old sub-menu key.

    That sounds complicated, but it isn't bad really. Although I can't say that it would actually work.

    As a note, there is an action hook in menu.php as well.

    Or, you could just edit menu.php to your liking. Just make sure you note what you change, so you can repeat it.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.