[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
Mon Jan 26 00:10:30 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             |  Resolution:
 Keywords:  has-patch close    |     Focuses:
-------------------------------+------------------------------
Changes (by toscho):

 * keywords:  has-patch => has-patch close


Comment:

 Do we really have to catch every possible edge case?

 Besides that, there is now too much code duplication, because you
 suggested the same thing for #31135. If we really do this, the code should
 be separated to a function like `wp_str_min_max( $str, $min, $max,
 $encoding )` or something similar.

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


More information about the wp-trac mailing list