[wp-trac] [WordPress Trac] #20900: Throw an error in `get_default_post_to_edit` if the specified post type is not defined.

WordPress Trac noreply at wordpress.org
Fri Feb 21 17:08:18 UTC 2014


#20900: Throw an error in `get_default_post_to_edit` if the specified post type is
not defined.
-------------------------------+------------------------------
 Reporter:  georgestephanis    |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  minor              |  Resolution:
 Keywords:  has-patch close    |     Focuses:
-------------------------------+------------------------------
Changes (by ocean90):

 * keywords:  has-patch 2nd-opinion => has-patch close


Comment:

 I don't think we need a check on API level.

 We have checks on post-new.php and edit.php which prevents user errors. As
 a developer you should know your post type. Also existing stuff could rely
 on this, which would break by such a change.

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


More information about the wp-trac mailing list