Make WordPress Core

Opened 17 years ago

Closed 15 years ago

Last modified 15 years ago

#4340 closed enhancement (worksforme)

Hooks to disable various features of admin

Reported by: oaoao's profile oaoao Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:

Description

Proposal:

Hooks to disable different pieces of the administrative interface. And/or perhaps to replace them with arbitrary content.

I believe this will allow for some plugin-level control over the admin interface without a major rehaul or disrupting any existing mechanisms.

Thoughts/comments/guidance? I wanted some feedback before I bothered developing this.

Change History (9)

#1 @oaoao
17 years ago

This originally started because I wanted to remove and move some of the floating elements to the right of the main editing textarea. There doesn't seem to be a way to do this gracefully without editing the core code. display:none in CSS works for removal to some extent, but the DB/PHP work will still happen unnecessarily. I propose that a simplistic hook system to either replace or remove each element on the pages would be very helpful, lightweight, and backwards-compatible.

Googling returns lots of threads complaining about lack of admin control in WP, so I believe there is some desire out there. Templates would be better, but this seems like adequate in the meantime.

#2 follow-up: @matt
17 years ago

I think CSS is the best way to approach this. Yes there will be some unnecessary DB calls, but it'll be just as fast as WP normally is.

#3 in reply to: ↑ 2 @pixline
17 years ago

CSS is the best way and it's easily reversible, but I think that a bunch of new hooks to disable or tweak some interface (or some part of it) would make easier using WP as a CMS, reorganizing menus and logical areas according to real needs instead of WP core logic. Also, in some case, would be really nice to drop some DB calls and free memory and resources for - in my real case - a whole DB included into WP interface. +1 for hooks, +1 for WP as a development framework.

#4 in reply to: ↑ description @cpoteet
17 years ago

  • Cc cpoteet added

#5 @oaoao
17 years ago

  • Cc oaoao added

@cpoteet: No, actually customizing the components, not just the menu. But that's a nice plugin I didn't know about!

@matt & pixline: CSS has definite limitations. It's also not always as simple as burying something. Try doing display:none on the floating right pieces for example. Or what if I want to deny users from using something very specific in the admin interface? With CSS, everything is still accessible via viewing source or disabling CSS. What if I want to remove a certain js piece? I'm loading some heavy js framework and am feeling the bloat. What if I want to push some content between two pieces? One plugin author resorted to using js to push the content in. What if load order matters?

Most of this is possible to some extent, but it gets hackish quickly. I'd like my CMS work to be forwards compatible as a plugin and without having to modify the core code. One wouldn't expect theme authors to rely completely on CSS, so why on the admin side?

In addition, I think this feature would remain pretty lightweight and I can't think of a reason it would impact anything old (Said with great humility, correct me if I'm wrong)?

#6 @ffemtcj
16 years ago

  • Milestone changed from 2.5 to 2.6

#7 @gambit37
16 years ago

CSS is not the answer at all. As noted above, disabling parts of the interface using CSS will do nothing for people using a non-CSS enabled browser, or a screen reader.

#8 @DD32
15 years ago

  • Milestone 2.9 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Its possible to take over any admin page as WP is atm, Using the hook (((load-$pagenow}}} along with $_GETpage? if need be..

I know for a fact its possible to completely replace the WP admin with custom content, since i've done it a few times..

Meta boxes are used on most main pages now, So its more common to be able to add/remove boxes from admin pages..

#9 @cpoteet
15 years ago

  • Cc cpoteet removed
Note: See TracTickets for help on using tickets.