Changeset 9153 for trunk/wp-admin/includes/template.php
- Timestamp:
- 10/14/2008 03:49:57 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r9141 r9153 688 688 $posts_columns['cb'] = '<input type="checkbox" />'; 689 689 $posts_columns['title'] = __('Title'); 690 $posts_columns['date'] = __('Date');691 690 $posts_columns['author'] = __('Author'); 692 691 $posts_columns['categories'] = __('Categories'); … … 694 693 if ( !isset($_GET['post_status']) || !in_array($_GET['post_status'], array('pending', 'draft', 'future')) ) 695 694 $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="images/comment-grey-bubble.png" /></div>'; 696 $posts_columns[' status'] = __('Status');695 $posts_columns['date'] = __('Date'); 697 696 $posts_columns = apply_filters('manage_posts_columns', $posts_columns); 698 697 … … 736 735 $posts_columns['cb'] = '<input type="checkbox" />'; 737 736 $posts_columns['title'] = __('Title'); 738 $posts_columns['date'] = __('Date');739 737 $posts_columns['author'] = __('Author'); 740 738 if ( !in_array($post_status, array('pending', 'draft', 'future')) ) 741 739 $posts_columns['comments'] = '<div class="vers"><img alt="" src="images/comment-grey-bubble.png" /></div>'; 742 $posts_columns[' status'] = __('Status');740 $posts_columns['date'] = __('Date'); 743 741 $posts_columns = apply_filters('manage_pages_columns', $posts_columns); 744 742 … … 945 943 </div> 946 944 <?php } ?> 945 946 <div class="status quick-edit-div" title="<?php _e('Status'); ?>"> 947 <div class="title"><?php _e('Status'); ?></div> 948 <div class="in"> 949 <select name="_status"> 950 <?php if ( $bulk ) { ?> 951 <option value="-1"><?php _e('- No Change -'); ?></option> 952 <?php if ( $can_publish ) { ?> 953 <option value="private"><?php _e('Private') ?></option> 954 <?php } ?> 955 <?php } ?> 956 <?php if ( $can_publish ) { // Contributors only get "Unpublished" and "Pending Review" ?> 957 <option value="publish"><?php _e('Published') ?></option> 958 <option value="future"><?php _e('Scheduled') ?></option> 959 <?php } ?> 960 <option value="pending"><?php _e('Pending Review') ?></option> 961 <option value="draft"><?php _e('Unpublished') ?></option> 962 </select> 963 </div> 964 </div> 947 965 948 966 <?php if ( $is_page ) { ?> … … 1062 1080 break; 1063 1081 1064 case 'status': ?>1065 <div <?php echo $attributes ?> title="<?php _e('Status'); ?>">1066 <div class="title"><?php _e('Status'); ?></div>1067 <div class="in">1068 <select name="_status">1069 <?php if ( $bulk ) { ?>1070 <option value="-1"><?php _e('- No Change -'); ?></option>1071 <?php if ( $can_publish ) { ?>1072 <option value="private"><?php _e('Private') ?></option>1073 <?php } ?>1074 <?php } ?>1075 <?php if ( $can_publish ) { // Contributors only get "Unpublished" and "Pending Review" ?>1076 <option value="publish"><?php _e('Published') ?></option>1077 <option value="future"><?php _e('Scheduled') ?></option>1078 <?php } ?>1079 <option value="pending"><?php _e('Pending Review') ?></option>1080 <option value="draft"><?php _e('Unpublished') ?></option>1081 </select>1082 </div>1083 </div>1084 1085 <?php if ( ! $is_page && ! $bulk && current_user_can( 'edit_others_posts' ) ) { ?>1086 <div class="sticky quick-edit-div" <?php echo $style; ?> title="<?php _e('Sticky') ?>">1087 <div class="title"><?php _e('Sticky'); ?></div>1088 <div class="in">1089 <label title="<?php _e('Sticky') ?>">1090 <input type="checkbox" name="sticky" value="sticky" /> <?php _e('Stick this post to the front page') ?></label>1091 </div>1092 </div>1093 <?php }1094 break;1095 1096 1082 default: 1097 1083 if ( $bulk ) … … 1276 1262 <td <?php echo $attributes ?>><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong> 1277 1263 <?php 1278 if ( !empty($post->post_password) ) { _e(' — <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' — <strong>Private</strong>'); }1264 _post_states($post); 1279 1265 1280 1266 if ( 'excerpt' == $mode ) … … 1355 1341 ?> 1356 1342 <td <?php echo $attributes ?>><a href="edit.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td> 1357 <?php1358 break;1359 1360 case 'status':1361 ?>1362 <td <?php echo $attributes ?>>1363 <a href="<?php the_permalink(); ?>" title="<?php echo attribute_escape(sprintf(__('View "%s"'), $title)); ?>" rel="permalink">1364 <?php1365 switch ( $post->post_status ) {1366 case 'publish' :1367 case 'private' :1368 _e('Published');1369 break;1370 case 'future' :1371 _e('Scheduled');1372 break;1373 case 'pending' :1374 _e('Pending Review');1375 break;1376 case 'draft' :1377 _e('Unpublished');1378 break;1379 }1380 ?>1381 </a>1382 </td>1383 1343 <?php 1384 1344 break; … … 1488 1448 <td <?php echo $attributes ?>><strong><?php if ( current_user_can( 'edit_post', $page->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; } ?></strong> 1489 1449 <?php 1490 if ( !empty($post->post_password) ) { _e(' — <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' — <strong>Private</strong>'); }1450 _post_states($page); 1491 1451 1492 1452 $actions = array(); … … 1529 1489 ?> 1530 1490 <td <?php echo $attributes ?>><a href="edit-pages.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td> 1531 <?php1532 break;1533 1534 case 'status':1535 ?>1536 <td <?php echo $attributes ?>>1537 <a href="<?php the_permalink(); ?>" title="<?php echo attribute_escape(sprintf(__('View "%s"'), $title)); ?>" rel="permalink">1538 <?php1539 switch ( $page->post_status ) {1540 case 'publish' :1541 case 'private' :1542 _e('Published');1543 break;1544 case 'future' :1545 _e('Scheduled');1546 break;1547 case 'pending' :1548 _e('Pending Review');1549 break;1550 case 'draft' :1551 _e('Unpublished');1552 break;1553 }1554 ?>1555 </a>1556 </td>1557 1491 <?php 1558 1492 break; … … 3115 3049 } 3116 3050 3051 function _post_states($post) { 3052 $post_states = array(); 3053 if ( isset($_GET['post_status']) ) 3054 $post_status = $_GET['post_status']; 3055 else 3056 $post_status = ''; 3057 3058 if ( !empty($post->post_password) ) 3059 $post_states[] = __('Protected'); 3060 if ( 'private' == $post->post_status && 'private' != $post_status ) 3061 $post_states[] = __('Private'); 3062 if ( 'draft' == $post->post_status && 'draft' != $post_status ) 3063 $post_states[] = __('Draft'); 3064 if ( 'pending' == $post->post_status && 'pending' != $post_status ) 3065 $post_states[] = __('Pending'); 3066 3067 if ( ! empty($post_states) ) { 3068 $state_count = count($post_states); 3069 $i = 0; 3070 echo '<div id="post-states">'; 3071 foreach ( $post_states as $state ) { 3072 ++$i; 3073 ( $i == $state_count ) ? $sep = '' : $sep = ', '; 3074 echo "<span class='post-state'>$state$sep</span>"; 3075 } 3076 echo '</div>'; 3077 } 3078 } 3079 3117 3080 ?>
Note: See TracChangeset
for help on using the changeset viewer.