Ticket #21593: 21593.patch
File 21593.patch, 1.6 KB (added by , 13 years ago) |
---|
-
wp-includes/taxonomy.php
328 328 ); 329 329 $args = wp_parse_args($args, $defaults); 330 330 331 $taxonomy = sanitize_key( $taxonomy ); 332 333 if ( strlen( $taxonomy ) > 32 ) 334 return new WP_Error( 'taxonomy_too_long', __( 'Taxonomies cannot exceed 32 characters in length' ) ); 335 331 336 if ( false !== $args['query_var'] && !empty($wp) ) { 332 337 if ( true === $args['query_var'] ) 333 338 $args['query_var'] = $taxonomy; … … 380 385 $wp_taxonomies[$taxonomy] = (object) $args; 381 386 382 387 // register callback handling for metabox 383 388 add_filter('wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term'); 384 389 385 390 do_action( 'registered_taxonomy', $taxonomy, $object_type, $args ); 386 391 } -
wp-includes/post.php
989 989 $args = (object) $args; 990 990 991 991 $post_type = sanitize_key($post_type); 992 $args->name = $post_type;993 992 994 993 if ( strlen( $post_type ) > 20 ) 995 994 return new WP_Error( 'post_type_too_long', __( 'Post types cannot exceed 20 characters in length' ) ); 996 995 996 $args->name = $post_type; 997 997 998 // If not set, default to the setting for public. 998 999 if ( null === $args->publicly_queryable ) 999 1000 $args->publicly_queryable = $args->public;