Make WordPress Core

Ticket #9674: register_post_type_description.diff

File register_post_type_description.diff, 1.7 KB (added by ptahdunbar, 15 years ago)

register_post_type() should have a description arg which could be displayed in the UI or used with plugins.

  • post.php

     
    711711 * Optional $args contents:
    712712 *
    713713 * label - A descriptive name for the post type marked for translation. Defaults to $post_type.
     714 * description - A short descriptive summary of what the post type is. Defaults to blank.
    714715 * public - Whether posts of this type should be shown in the admin UI. Defaults to false.
    715716 * exclude_from_search - Whether to exclude posts with this post type from search results. Defaults to true if the type is not public, false if the type is public.
    716717 * publicly_queryable - Whether post_type queries can be performed from the front page.  Defaults to whatever public is set as.
     
    743744                $wp_post_types = array();
    744745
    745746        // Args prefixed with an underscore are reserved for internal use.
    746         $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, 'rewrite' => true, 'query_var' => true, 'supports' => array(), 'register_meta_box_cb' => null, 'taxonomies' => array(), 'show_ui' => null );
     747        $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 );
    747748        $args = wp_parse_args($args, $defaults);
    748749        $args = (object) $args;
    749750