[wp-trac] [WordPress Trac] #31134: register_post_type() should call a _doing_it_wrong() when called with an empty post type name

WordPress Trac noreply at wordpress.org
Sun Jan 25 22:34:47 UTC 2015


#31134: register_post_type() should call a _doing_it_wrong() when called with an
empty post type name
-------------------------------+-----------------------------
 Reporter:  tyxla              |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  3.0
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 If you misuse `register_post_type()` with an empty string as a first
 parameter, this will currently not throw any notice.

 Anyway, it is definitely wrong and can lead to some very weird results
 both in the administration and in the frontend.

 I suggest that a `_doing_it_wrong()` should be called to cover this case.

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


More information about the wp-trac mailing list