Changeset 16650
- Timestamp:
- 12/01/2010 05:13:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-includes/post.php
r15406 r16650 801 801 * @param string $post_type Name of the post type. 802 802 * @param array|string $args See above description. 803 * @return object the registered post typeobject803 * @return object|WP_Error the registered post type object, or an error object 804 804 */ 805 805 function register_post_type($post_type, $args = array()) { … … 822 822 $post_type = sanitize_user($post_type, true); 823 823 $args->name = $post_type; 824 825 if ( strlen( $post_type ) > 20 ) 826 return new WP_Error( 'post_type_too_long', __( 'Post types cannot exceed 20 characters in length' ) ); 824 827 825 828 // If not set, default to the setting for public.
Note: See TracChangeset
for help on using the changeset viewer.