[wp-trac] [WordPress Trac] #27118: WP_Customize_Image_Control should return attachment ID instead of image URL

WordPress Trac noreply at wordpress.org
Fri Nov 14 15:48:19 UTC 2014


#27118: WP_Customize_Image_Control should return attachment ID instead of image URL
-------------------------+------------------------
 Reporter:  silb3r       |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Customize    |     Version:  3.8.1
 Severity:  normal       |  Resolution:  duplicate
 Keywords:               |     Focuses:
-------------------------+------------------------
Changes (by celloexpressions):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Future Release =>


Comment:

 Sadly, we can't do this for back compat purposes. The proposed
 `WP_Customize_Media_Control` (#29215) would allow us to essentially
 duplicate the functionality of the new `WP_Customize_Upload_Control` (and
 by extension the image control) but store the attachment id or other data
 rather than the file url directly. Also worth noting that core currently
 has to use `attachment_url_to_postid()` to facilitate this, and that
 workaround could be an option in themes and plugins as well. Let's move
 this discussion to #29215.

 Related: #21483.

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


More information about the wp-trac mailing list