Changeset 16670
- Timestamp:
- 12/01/2010 08:43:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r16667 r16670 885 885 * @param string $post_type Name of the post type. 886 886 * @param array|string $args See above description. 887 * @return object the registered post typeobject887 * @return object|WP_Error the registered post type object, or an error object 888 888 */ 889 889 function register_post_type($post_type, $args = array()) { … … 908 908 $post_type = sanitize_key($post_type); 909 909 $args->name = $post_type; 910 911 if ( strlen( $post_type ) > 20 ) 912 return new WP_Error( 'post_type_too_long', __( 'Post types cannot exceed 20 characters in length' ) ); 910 913 911 914 // If not set, default to the setting for public.
Note: See TracChangeset
for help on using the changeset viewer.