Clean up whitespace in status/PT/tax registration.
git-svn-id: https://develop.svn.wordpress.org/trunk@14432 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a8feef50fc
commit
23ce2f4151
|
@ -15,7 +15,8 @@
|
|||
* Creates the initial post types when 'init' action is fired.
|
||||
*/
|
||||
function create_initial_post_types() {
|
||||
register_post_type( 'post', array( 'label' => __('Posts'),
|
||||
register_post_type( 'post', array(
|
||||
'label' => __( 'Posts' ),
|
||||
'singular_label' => __( 'Post' ),
|
||||
'public' => true,
|
||||
'show_ui' => false,
|
||||
|
@ -25,10 +26,11 @@ function create_initial_post_types() {
|
|||
'hierarchical' => false,
|
||||
'rewrite' => false,
|
||||
'query_var' => false,
|
||||
'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions')
|
||||
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions' ),
|
||||
) );
|
||||
|
||||
register_post_type( 'page', array( 'label' => __('Pages'),
|
||||
register_post_type( 'page', array(
|
||||
'label' => __( 'Pages' ),
|
||||
'singular_label' => __( 'Page' ),
|
||||
'public' => true,
|
||||
'show_ui' => false,
|
||||
|
@ -38,10 +40,11 @@ function create_initial_post_types() {
|
|||
'hierarchical' => true,
|
||||
'rewrite' => false,
|
||||
'query_var' => false,
|
||||
'supports' => array('title', 'editor', 'author', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions')
|
||||
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions' ),
|
||||
) );
|
||||
|
||||
register_post_type( 'attachment', array('label' => __('Media'),
|
||||
register_post_type( 'attachment', array(
|
||||
'label' => __( 'Media' ),
|
||||
'public' => true,
|
||||
'show_ui' => false,
|
||||
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
|
||||
|
@ -52,7 +55,8 @@ function create_initial_post_types() {
|
|||
'query_var' => false,
|
||||
) );
|
||||
|
||||
register_post_type( 'revision', array( 'label' => __('Revisions'),
|
||||
register_post_type( 'revision', array(
|
||||
'label' => __( 'Revisions' ),
|
||||
'singular_label' => __( 'Revision' ),
|
||||
'public' => false,
|
||||
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
|
||||
|
@ -63,7 +67,8 @@ function create_initial_post_types() {
|
|||
'query_var' => false,
|
||||
) );
|
||||
|
||||
register_post_type( 'nav_menu_item', array( 'label' => __('Navigation Menu Items'),
|
||||
register_post_type( 'nav_menu_item', array(
|
||||
'label' => __( 'Navigation Menu Items' ),
|
||||
'singular_label' => __( 'Navigation Menu Item' ),
|
||||
'public' => false,
|
||||
'show_ui' => false,
|
||||
|
@ -74,52 +79,60 @@ function create_initial_post_types() {
|
|||
'query_var' => false,
|
||||
) );
|
||||
|
||||
register_post_status( 'publish', array( 'label' => _x('Published', 'post'),
|
||||
register_post_status( 'publish', array(
|
||||
'label' => _x( 'Published', 'post' ),
|
||||
'public' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'label_count' => _n_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')
|
||||
'label_count' => _n_noop( 'Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>' ),
|
||||
) );
|
||||
|
||||
register_post_status( 'future', array( 'label' => _x('Scheduled', 'post'),
|
||||
register_post_status( 'future', array(
|
||||
'label' => _x( 'Scheduled', 'post' ),
|
||||
'protected' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'label_count' => _n_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')
|
||||
'label_count' => _n_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>' ),
|
||||
) );
|
||||
|
||||
register_post_status( 'draft', array( 'label' => _x('Draft', 'post'),
|
||||
register_post_status( 'draft', array(
|
||||
'label' => _x( 'Draft', 'post' ),
|
||||
'protected' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'label_count' => _n_noop('Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>')
|
||||
'label_count' => _n_noop( 'Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>' ),
|
||||
) );
|
||||
|
||||
register_post_status( 'pending', array( 'label' => _x('Pending', 'post'),
|
||||
register_post_status( 'pending', array(
|
||||
'label' => _x( 'Pending', 'post' ),
|
||||
'protected' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'label_count' => _n_noop('Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>')
|
||||
'label_count' => _n_noop( 'Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>' ),
|
||||
) );
|
||||
|
||||
register_post_status( 'private', array( 'label' => _x('Private', 'post'),
|
||||
register_post_status( 'private', array(
|
||||
'label' => _x( 'Private', 'post' ),
|
||||
'private' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'label_count' => _n_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>')
|
||||
'label_count' => _n_noop( 'Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>' ),
|
||||
) );
|
||||
|
||||
register_post_status( 'trash', array( 'label' => _x('Trash', 'post'),
|
||||
register_post_status( 'trash', array(
|
||||
'label' => _x( 'Trash', 'post' ),
|
||||
'internal' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'label_count' => _n_noop( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>' ),
|
||||
'show_in_admin_status_list' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'label_count' => _n_noop('Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>')
|
||||
) );
|
||||
|
||||
register_post_status( 'auto-draft', array( 'label' => 'auto-draft',
|
||||
register_post_status( 'auto-draft', array(
|
||||
'label' => 'auto-draft',
|
||||
'internal' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
) );
|
||||
|
||||
register_post_status( 'inherit', array( 'label' => 'inherit',
|
||||
register_post_status( 'inherit', array(
|
||||
'label' => 'inherit',
|
||||
'internal' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'exclude_from_search' => false,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
) );
|
||||
}
|
||||
add_action( 'init', 'create_initial_post_types', 0 ); // highest priority
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
* Creates the initial taxonomies when 'init' action is fired.
|
||||
*/
|
||||
function create_initial_taxonomies() {
|
||||
register_taxonomy( 'category', 'post', array( 'hierarchical' => true,
|
||||
register_taxonomy( 'category', 'post', array(
|
||||
'hierarchical' => true,
|
||||
'update_count_callback' => '_update_post_term_count',
|
||||
'label' => __( 'Categories' ),
|
||||
'singular_label' => __( 'Category' ),
|
||||
|
@ -23,7 +24,7 @@ function create_initial_taxonomies() {
|
|||
'rewrite' => false,
|
||||
'public' => true,
|
||||
'show_ui' => true,
|
||||
'_builtin' => true
|
||||
'_builtin' => true,
|
||||
) ) ;
|
||||
|
||||
register_taxonomy( 'post_tag', 'post', array(
|
||||
|
@ -35,10 +36,11 @@ function create_initial_taxonomies() {
|
|||
'rewrite' => false,
|
||||
'public' => true,
|
||||
'show_ui' => true,
|
||||
'_builtin' => true
|
||||
'_builtin' => true,
|
||||
) );
|
||||
|
||||
register_taxonomy( 'nav_menu', 'nav_menu_item', array( 'hierarchical' => false,
|
||||
register_taxonomy( 'nav_menu', 'nav_menu_item', array(
|
||||
'hierarchical' => false,
|
||||
'label' => __( 'Navigation Menus' ),
|
||||
'singular_label' => __( 'Navigation Menu' ),
|
||||
'query_var' => false,
|
||||
|
@ -47,7 +49,8 @@ function create_initial_taxonomies() {
|
|||
'_builtin' => true,
|
||||
) ) ;
|
||||
|
||||
register_taxonomy( 'link_category', 'link', array( 'hierarchical' => false,
|
||||
register_taxonomy( 'link_category', 'link', array(
|
||||
'hierarchical' => false,
|
||||
'label' => __( 'Categories' ),
|
||||
'query_var' => false,
|
||||
'rewrite' => false,
|
||||
|
|
Loading…
Reference in New Issue