[wp-trac] [WordPress Trac] #21785: Add header image uploads with cropping to the customizer

WordPress Trac noreply at wordpress.org
Mon Mar 17 17:10:24 UTC 2014


#21785: Add header image uploads with cropping to the customizer
----------------------------+-----------------------------------------
 Reporter:  nacin           |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.9
Component:  Appearance      |     Version:  3.4
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  javascript, administration
----------------------------+-----------------------------------------

Comment (by ehg):

 > TODO: Investigate usage and backwards compatibility concerns of
 WP_Customize_Header_Image_Control class.
 I’ll get back to you soon on this - preliminary findings indicate that no
 one is using the class, but we want to search all plugins and themes for
 any usage of WP_Customize_Header_Image_Control. I’m currently checking out
 the plugins and themes repos to search for any mention of the class -
 opengrok for these repos would be useful, as the repos are rather large!
 > TODO: Restore "Suggested dimensions", remove Title/Caption/etc. Consider
 removing "Edit Image", which doesn't make sense here.
 Placing the suggested dimensions in the Attachment Details sidebar feels a
 bit wrong, as the suggested dimensions aren’t particular to a specific
 image (see https://cloudup.com/iTMNezhnAI6). The idea behind putting them
 in the Media Manager’s title was to show the dimensions no matter what
 context you’re in - the suggested dimensions can be seen when you’re
 uploading *and* selecting an image (see https://cloudup.com/iDXX9n9Busq).
 An alternative would be to just not show the dimensions in the Media
 Manager at all, and rely on them being noticed in the Header section.
 > TODO: All XHR requests need some kind of error handling, ideally.
 We’d like to make the case for a better, broader solution to error
 handling that would go beyond this ticket: adding a Customizer error
 handler that would display error messages by binding to customize(‘error’)
 events - see  https://cloudup.com/ihRG2lmDTkC . We could also use the
 proposed error handling in the Customizer to show ‘crop failed’ events
 from the Media Manager.

 > TODO: Most of that logic should not be in the customizer control, but in
 the custom header class, so we'll have to figure that out.
 See attachment:21785-move-query-logic.diff. @mcsf “took some liberty” and
 made sure `process_default_headers` could only run once. If this is wrong,
 let us know.
 > TODO: We should use a dashicon or nothing here.
 @melchoyce is on the case :)
 > TODO: doCrop et. al should be moved to the models, and out of the views.
 See attachment:21785-doCrop-move.diff

 '''Aside:'''
 @nacin - was there any reason why the unit tests weren’t committed? Do
 they need more work?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21785#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list