[wp-trac] [WordPress Trac] #39439: Should wp_insert_attachment() update GUID (was: Attachment update and GUID)

WordPress Trac noreply at wordpress.org
Mon Jan 2 17:16:15 UTC 2017


#39439: Should wp_insert_attachment() update GUID
-------------------------------+------------------------------
 Reporter:  jlambe             |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  dev-feedback       |     Focuses:
-------------------------------+------------------------------
Changes (by MattyRob):

 * keywords:  close => dev-feedback
 * type:  defect (bug) => enhancement


Comment:

 @jlambe

 Having looked at the core code wp_insert_attachment() calls
 wp_insert_post(). This latter function is specifically written to create a
 GUID but use any existing GUID in preference so it's not going to be a
 simple patch.

 Perhaps we need a core developer to give an opinion.

 My personal opinion is that this is straying into a risky area and that
 GUIDs should not really be changed, the code I use simply moves them about
 in the database.

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


More information about the wp-trac mailing list