[wp-trac] [WordPress Trac] #37887: Make attachments atomic until a Customizer session is published

WordPress Trac noreply at wordpress.org
Sat Jan 14 05:19:46 UTC 2017


#37887: Make attachments atomic until a Customizer session is published
-------------------------+-----------------------------
 Reporter:  fjarrett     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Customize    |     Version:  4.7
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:  administration
-------------------------+-----------------------------

Comment (by fjarrett):

 Yes, thanks @azaozz for weighing in with a different perspective on this.

 @westonruter - Just to toss in another idea while we're getting it all out
 there :-)

 When admins are browsing the filesystem, I think it should be clearly
 indicated which attachments belong to Customizer changesets, and should
 therefore be considered temporary.

 To help make this distinction between normal and pending attachments, the
 file names could contain the changeset UUID in a prefix, and be saved as
 hidden dot-files. And it would apply to every attachment size variation as
 well:

 {{{
 uploads/2017/01/.customize_changeset_3c5fee75-2745-4b14-b059-e947aad2964b_dog.jpg
 uploads/2017/01/.customize_changeset_3c5fee75-2745-4b14-b059
 -e947aad2964b_dog-150x150.jpg
 uploads/2017/01/cat.jpg
 uploads/2017/01/cat-150x150.jpg
 }}}

 And once the changeset is published:

 {{{
 uploads/2017/01/cat.jpg
 uploads/2017/01/cat-150x150.jpg
 uploads/2017/01/dog.jpg
 uploads/2017/01/dog-150x150.jpg
 }}}

 I think something like this would make the distinction clear to admins
 browsing the filesystem which attachments belong to Customizer changesets
 and should therefore be considered temporary.

 It's also one of those
 [https://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note
 rare situations] where it would actually be OK to modify the
 {{{posts.guid}}} since the attachments have never been live.

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


More information about the wp-trac mailing list