[wp-trac] [WordPress Trac] #38192: Linking directly into Edit Image mode breaks cropping; imageEdit.init not triggered.

WordPress Trac noreply at wordpress.org
Fri Sep 30 23:08:02 UTC 2016


#38192: Linking directly into Edit Image mode breaks cropping; imageEdit.init not
triggered.
-------------------------------------+------------------------------
 Reporter:  dougwollison             |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Editor                   |     Version:  4.6.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------------------
Changes (by jbotte):

 * keywords:   => has-patch needs-testing


Comment:

 I attached a small patch above. First patch so if things aren't up to
 snuff I appreciate feedback to help improve.

 On php page load i check for the 'image-editor' key in the $_GET array.

 If the key exists I populate $image_edit_additional_js with the JS that
 will trigger imageEdit.init();

 I then echo that js in the image-preview onload.

 Let me know if you have any questions. Please test!

 hope this helps you @dougwollison

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


More information about the wp-trac mailing list