Changeset 12994
- Timestamp:
- 02/06/2010 05:46:00 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r12993 r12994 233 233 $status_links[] = "<li><a href='edit.php?post_type=$post_type{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>'; 234 234 235 foreach ( get_post_stati(array( ), 'objects') as $status ) {235 foreach ( get_post_stati(array('show_in_admin_edit' => true), 'objects') as $status ) { 236 236 $class = ''; 237 237 -
trunk/wp-includes/post.php
r12993 r12994 62 62 63 63 register_post_status( 'publish', array( 'label' => _x('Published', 'post'), 64 ' exclude_from_search' => false,64 'public' => true, 65 65 '_builtin' => true, 66 66 'label_count' => _n_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>') … … 68 68 69 69 register_post_status( 'future', array( 'label' => _x('Scheduled', 'post'), 70 ' exclude_from_search' => false,70 'public' => true, 71 71 '_builtin' => true, 72 72 'label_count' => _n_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>') … … 74 74 75 75 register_post_status( 'draft', array( 'label' => _x('Draft', 'post'), 76 ' exclude_from_search' => false,76 'public' => true, 77 77 '_builtin' => true, 78 78 'label_count' => _n_noop('Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>') … … 80 80 81 81 register_post_status( 'private', array( 'label' => _x('Private', 'post'), 82 ' exclude_from_search' => false,82 'public' => true, 83 83 '_builtin' => true, 84 84 'label_count' => _n_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>') … … 86 86 87 87 register_post_status( 'trash', array( 'label' => _x('Trash', 'post'), 88 ' exclude_from_search' => false,88 'public' => true, 89 89 '_builtin' => true, 90 90 'label_count' => _n_noop('Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>') … … 92 92 93 93 register_post_status( 'auto-draft', array( 'label' => _x('Auto-Draft', 'post'), 94 ' exclude_from_search' => true,94 'public' => false, 95 95 '_builtin' => true, 96 96 'label_count' => _n_noop('Auto-Draft <span class="count">(%s)</span>', 'Auto-Drafts <span class="count">(%s)</span>') … … 522 522 523 523 // Args prefixed with an underscore are reserved for internal use. 524 $defaults = array('label' => false, 'label_count' => false, 'exclude_from_search' => true, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, '_show' => false);524 $defaults = array('label' => false, 'label_count' => false, 'exclude_from_search' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, 'publicly_queryable' => null, 'show_in_admin_edit' => null); 525 525 $args = wp_parse_args($args, $defaults); 526 526 $args = (object) $args; … … 529 529 $args->name = $post_status; 530 530 531 // If not set, default to the setting for public. 532 if ( null === $args->publicly_queryable ) 533 $args->publicly_queryable = $args->public; 534 535 // If not set, default to true if not public, false if public. 536 if ( null === $args->exclude_from_search ) 537 $args->exclude_from_search = !$args->public; 538 539 // If not set, default to the setting for public. 540 if ( null === $args->show_in_admin_edit ) 541 $args->show_in_admin_edit = $args->public; 542 531 543 if ( false === $args->label ) 532 544 $args->label = $post_status; … … 534 546 if ( false === $args->label_count ) 535 547 $args->label_count = $args->label; 536 537 if ( !$args->_builtin && $args->public )538 $args->_show = true;539 548 540 549 $wp_post_statuses[$post_status] = $args;
Note: See TracChangeset
for help on using the changeset viewer.