[wp-trac] [WordPress Trac] #13038: Add action hooks to QuickPress dashboard widget

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 17 17:28:05 UTC 2010


#13038: Add action hooks to QuickPress dashboard widget
----------------------------+-----------------------------------------------
 Reporter:  t31os_          |       Owner:            
     Type:  enhancement     |      Status:  new       
 Priority:  normal          |   Milestone:  Unassigned
Component:  Administration  |     Version:  3.0       
 Severity:  normal          |    Keywords:            
----------------------------+-----------------------------------------------
 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).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13038>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list