[wp-trac] [WordPress Trac] #27335: wp_insert_post() inserts posts of unregistered post types

WordPress Trac noreply at wordpress.org
Sun Mar 9 22:40:56 UTC 2014


#27335: wp_insert_post() inserts posts of unregistered post types
-------------------------------+------------------------------
 Reporter:  brocheafoin        |       Owner:
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  3.8.1
 Severity:  normal             |  Resolution:  maybelater
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Changes (by brocheafoin):

 * status:  new => closed
 * resolution:   => maybelater


Comment:

 @danielbachhuber: I'm writing a plugin that inserts a bunch of posts and I
 made a typo in my wp_insert_post() call. No posts were showing up, yet no
 errors either. Found the posts in the DB with my typo'ed post types. It's
 really a developer-only bug.

 @nacin: I figured this had to have been discussed already, but I couldn't
 find it either.

 > wp_insert_post() is a low-level API (it's also a high-level API; yes,
 it's a problem)

 I guess that's the main issue. And it's a can of worms probably best left
 unopened. I'm closing.

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


More information about the wp-trac mailing list