[wp-trac] [WordPress Trac] #28038: Only show the Edit Image option in the media modal if applicable

WordPress Trac noreply at wordpress.org
Thu May 1 03:17:51 UTC 2014


#28038: Only show the Edit Image option in the media modal if applicable
--------------------------+---------------------------------
 Reporter:  Clorith       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.9.1
Component:  Media         |     Version:  3.9
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  ui, administration
--------------------------+---------------------------------
Changes (by nacin):

 * keywords:  has-patch => needs-patch


Comment:

 This patch will break things... The other nonces are used for any kind of
 type. It's specifically only the 'edit' nonce that needs to be restricted.

 _wp_image_editor_choose() is not exactly cheap, so we should cache it
 inside that function so we're only running it once per mime type. We
 should also only run it when we're dealing with an image mime type.

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


More information about the wp-trac mailing list