diff --git wp-includes/post.php wp-includes/post.php
index 9194c78..f25a1ca 100644
|
|
|
function register_post_type( $post_type, $args = array() ) { |
| 1243 | 1243 | $post_type = sanitize_key( $post_type ); |
| 1244 | 1244 | $args->name = $post_type; |
| 1245 | 1245 | |
| 1246 | | if ( strlen( $post_type ) > 20 ) |
| | 1246 | if ( strlen( $post_type ) > 20 ) { |
| | 1247 | _doing_it_wrong( __FUNCTION__, __( 'Post types cannot exceed 20 characters in length' ), 4.0 ); |
| 1247 | 1248 | return new WP_Error( 'post_type_too_long', __( 'Post types cannot exceed 20 characters in length' ) ); |
| | 1249 | } |
| 1248 | 1250 | |
| 1249 | 1251 | // If not set, default to the setting for public. |
| 1250 | 1252 | if ( null === $args->publicly_queryable ) |