Changeset 12938
- Timestamp:
- 02/03/2010 07:50:37 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r12937 r12938 710 710 * supports - An alias for calling add_post_type_support() directly. See add_post_type_support() for Documentation. Defaults to none. 711 711 * register_meta_box_cb - Provide a callback function that will be called when setting up the meta boxes for the edit form. Do remove_meta_box() and add_meta_box() calls in the callback. 712 * taxonomies - An array of taxonomy identifiers that will be registered for the post type. Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type(). 712 713 * 713 714 * @package WordPress … … 726 727 727 728 // Args prefixed with an underscore are reserved for internal use. 728 $defaults = array('label' => false, 'publicly_queryable' => null, 'exclude_from_search' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, '_show' => false, 'rewrite' => true, 'query_var' => true, 'supports' => array(), 'register_meta_box_cb' => null );729 $defaults = array('label' => false, 'publicly_queryable' => null, 'exclude_from_search' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, '_show' => false, 'rewrite' => true, 'query_var' => true, 'supports' => array(), 'register_meta_box_cb' => null, 'taxonomies' => array() ); 729 730 $args = wp_parse_args($args, $defaults); 730 731 $args = (object) $args; … … 789 790 790 791 $wp_post_types[$post_type] = $args; 792 793 foreach ( $args->taxonomies as $taxonomy ) { 794 register_taxonomy_for_object_type( $taxonomy, $post_type ); 795 } 791 796 792 797 return $args;
Note: See TracChangeset
for help on using the changeset viewer.