[wp-trac] [WordPress Trac] #21963: Consolidate post insertion APIs

WordPress Trac noreply at wordpress.org
Fri Jun 20 18:26:19 UTC 2014


#21963: Consolidate post insertion APIs
-------------------------------------------------+-------------------------
 Reporter:  nacin                                |       Owner:
     Type:  defect (bug)                         |  wonderboymusic
 Priority:  normal                               |      Status:  reviewing
Component:  Posts, Post Types                    |   Milestone:  4.0
 Severity:  normal                               |     Version:
 Keywords:  has-patch needs-unit-tests           |  Resolution:
  3.6-early                                      |     Focuses:
-------------------------------------------------+-------------------------

Comment (by wonderboymusic):

 In [changeset:"28788"]:
 {{{
 #!CommitTicketReference repository="" revision="28788"
 Reinstate the changes from [28579] with some adjustments:

 * Check `! empty( $postarr['file'] )` before calling
 `update_attached_file()`
 * Add a unit test: `test_update_attachment_fields()`
 * Run the same logic for empty `guid` for attachments that always ran in
 `wp_insert_post()`, as per #18310. This fixes a unit test that would have
 broken when this ticket was marked closed.
 * Updated the unit test in
 `Tests_Media::test_wp_prepare_attachment_for_js()` to account for `url` no
 longer being empty

 Props kovshenin, wonderboymusic.
 See #21963.
 }}}

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


More information about the wp-trac mailing list