[wp-trac] [WordPress Trac] #33721: Add filter to customize result of post_exists()

WordPress Trac noreply at wordpress.org
Fri Sep 4 07:10:52 UTC 2015


#33721: Add filter to customize result of post_exists()
-------------------------+-----------------------------
 Reporter:  westonruter  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Import       |    Version:
 Severity:  normal       |   Keywords:  has-patch
  Focuses:               |
-------------------------+-----------------------------
 The logic in `post_exists()` was modified at some point to add a post_date
 param to help with disambiguating two posts that have the same title (see
 #6265). Unfortunately, if two posts have been added at the same time and
 they have the same title then only one will end up getting imported given
 the current logic in the WordPress importer. I am facing this problem
 currently.

 Some hooks were added in #21710 to make the importer more extensible, but
 I think another is needed: `wp_import_existing_post`

 This will allow the logic for mapping an importing post to an existing
 post to be customized, instead of just looking for title and post_date
 matches. For instance, a GUID could be checked instead (see
 [https://core.trac.wordpress.org/ticket/21051#comment:2 comment] on
 #21051), though this is dependent on #18315.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33721>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list