I registered a new post type, and I was wondering what the difference was between the $args and labels array. Read more about it in the codex (can't have more than two links, sorry).
For example, labels (code from this CPT tutorial)
'labels' => array( 'name' => __( 'Super Dupers' ), 'singular_name' => __( 'Super Duper' ), 'add_new' => __( 'Add New' ), 'add_new_item' => __( 'Add New Super Duper' ), 'edit' => __( 'Edit' ), 'edit_item' => __( 'Edit Super Duper' ), 'new_item' => __( 'New Super Duper' ), 'view' => __( 'View Super Duper' ), 'view_item' => __( 'View Super Duper' ), 'search_items' => __( 'Search Super Dupers' ), 'not_found' => __( 'No super dupers found' ), 'not_found_in_trash' => __( 'No super dupers found in Trash' ), 'parent' => __( 'Parent Super Duper' ), ),
VS $args (code from this portfolio tutorial)
$args = array( 'label' => __('Portfolio'), 'singular_label' => __('Project'), 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => true, 'supports' => array('title', 'editor', 'thumbnail') );
What are the advantages of each? I noticed that if I tried to use some of the labels in the $args array, nothing happened or didn't happen as expected. For example, 'add_new_item' => __( 'Add New Super Duper' ),
doesn't work if I include it in the $args array. I would like for those labels to work as well as all existing code in the $args array (i don't want anything to break).