Add action hooks to QuickPress dashboard widget
|Reported by:||t31os_||Owned by:||westi|
Could we please have one or several action hooks available inside the QuickPress widget to facilitate adding in additional form elements, like a category dropdown.
This is a very simple alternative to trying to over-ride the callback, of which is hard-coded into post.php.
There are of course a few problems to be overcome by adding one or several hooks into the widget, and that would be in maintaining the tab-index of the available form fields. There's also the consideration of whether this should just be a core element and optional.
Personally i think the action hooks would be appropriate, so those that want, let's say for now a category dropdown, could hook onto the action, plonk in a category drop down named post_category and have an alternative category applied on post submission.
NOTE: Category would have to be passed as an array due to an is_array() expectation on the receiving end of the data (in wp_insert_post or wp_write_post, can't remember off the top of my head - the latter i believe)
I've been testing some hooks to see how this would work out, and the hooks are certainly trivial to add in, it's just a case of working out whether the tab-indexes should be maintained and accounted for or whether this is best written in as a core element.
I'm opening the ticket with every intention of submitting a patch for approval but i'd like to get a little feedback from you guys regarding implementation and whether you feel this should already be core, or available as an action hook.
Was a little unsure about how to tag this ticket, so feel free to update component, milestone, etc.. as appropriate.
Feedback will be most appreciated, so i am to get a better idea of what to aim for in regards to providing a patch(have played with various test samples already).
Change History (19)
- Cc aaron@… added
- Keywords has-patch added
- Milestone changed from Unassigned to 3.0
- Cc westi added
- Milestone changed from 3.0 to 3.1
- Owner set to westi
- Status changed from new to assigned