Changeset 13101 for trunk/wp-includes/post.php
- Timestamp:
- 02/13/2010 08:56:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r13075 r13101 17 17 function create_initial_post_types() { 18 18 register_post_type( 'post', array( 'label' => __('Posts'), 19 'singular_label' => __('Post'), 19 20 'public' => true, 20 21 'show_ui' => false, … … 29 30 30 31 register_post_type( 'page', array( 'label' => __('Pages'), 32 'singular_label' => __('Page'), 31 33 'public' => true, 32 34 'show_ui' => false, … … 52 54 53 55 register_post_type( 'revision', array( 'label' => __('Revisions'), 56 'singular_label' => __('Revision'), 54 57 'public' => false, 55 58 '_builtin' => true, … … 713 716 * Optional $args contents: 714 717 * 715 * label - A descriptive name for the post type marked for translation. Defaults to $post_type. 718 * label - A (plural) descriptive name for the post type marked for translation. Defaults to $post_type. 719 * singular_label - A (singular) descriptive name for the post type marked for translation. Defaults to $label. 716 720 * description - A short descriptive summary of what the post type is. Defaults to blank. 717 721 * public - Whether posts of this type should be shown in the admin UI. Defaults to false. … … 747 751 748 752 // Args prefixed with an underscore are reserved for internal use. 749 $defaults = array('label' => false, ' description' => '', 'publicly_queryable' => null, 'exclude_from_search' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, 'rewrite' => true, 'query_var' => true, 'supports' => array(), 'register_meta_box_cb' => null, 'taxonomies' => array(), 'show_ui' => null );753 $defaults = array('label' => false, 'singular_label' => false, 'description' => '', 'publicly_queryable' => null, 'exclude_from_search' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, 'rewrite' => true, 'query_var' => true, 'supports' => array(), 'register_meta_box_cb' => null, 'taxonomies' => array(), 'show_ui' => null ); 750 754 $args = wp_parse_args($args, $defaults); 751 755 $args = (object) $args; … … 768 772 if ( false === $args->label ) 769 773 $args->label = $post_type; 774 775 if ( false === $args->singular_label ) 776 $args->singular_label = $args->label; 770 777 771 778 if ( empty($args->capability_type) )
Note: See TracChangeset
for help on using the changeset viewer.