Changeset 6778 for trunk/wp-admin/edit-post-rows.php
- Timestamp:
- 02/10/2008 08:10:11 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-post-rows.php
r6550 r6778 23 23 $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); 24 24 ?> 25 <tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' >25 <tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top"> 26 26 27 27 <?php … … 31 31 switch($column_name) { 32 32 33 case ' id':33 case 'cb': 34 34 ?> 35 <th scope="row" style="text-align: center">< ?php echo $id ?></th>35 <th scope="row" style="text-align: center"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th> 36 36 <?php 37 37 break; 38 38 case 'modified': 39 39 ?> 40 <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Never'); else the_modified_time(__('Y -m-d \<\b\r \/\> g:i:s a')); ?></td>40 <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Never'); else the_modified_time(__('Y/m/d \<\b\r \/\> g:i:s a')); ?></td> 41 41 <?php 42 42 break; 43 43 case 'date': 44 44 ?> 45 <td><?php if ( '0000-00-00 00:00:00' ==$post->post_date) _e('Unpublished'); else the_time(__('Y-m-d \<\b\r \/\> g:i:s a')); ?></td> 45 <td><a href="<?php the_permalink(); ?>" rel="permalink"> 46 <?php 47 if ( '0000-00-00 00:00:00' ==$post->post_date ) { 48 _e('Unpublished'); 49 } else { 50 if ( ( time() - get_post_time() ) < 86400 ) 51 echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) ); 52 else 53 the_time(__('Y/m/d')); 54 } 55 ?></a></td> 46 56 <?php 47 57 break; 48 58 case 'title': 49 59 ?> 50 <td>< ?php the_title() ?>51 <?php if ('private' == $post->post_status) _e(' -<strong>Private</strong>'); ?></td>60 <td><strong><a href="post.php?action=edit&post=<?php the_ID(); ?>"><?php the_title() ?></a></strong> 61 <?php if ('private' == $post->post_status) _e(' — <strong>Private</strong>'); ?></td> 52 62 <?php 53 63 break; … … 55 65 case 'categories': 56 66 ?> 57 <td><?php the_category(','); ?></td> 67 <td><?php 68 $categories = get_the_category(); 69 if ( !empty( $categories ) ) { 70 $out = array(); 71 foreach ( $categories as $c ) 72 $out[] = "<a href='edit.php?category_name=$c->slug'> " . wp_specialchars( $c->name) . "</a>"; 73 echo join( ', ', $out ); 74 } else { 75 _e('Uncategorized'); 76 } 77 ?></td> 78 <?php 79 break; 80 81 case 'tags': 82 ?> 83 <td><?php 84 $tags = get_the_tags(); 85 if ( !empty( $tags ) ) { 86 $out = array(); 87 foreach ( $tags as $c ) 88 $out[] = "<a href='edit.php?tag=$c->slug'> " . wp_specialchars( $c->name) . "</a>"; 89 echo join( ', ', $out ); 90 } else { 91 _e('No Tags'); 92 } 93 ?></td> 58 94 <?php 59 95 break; … … 67 103 if ( $left ) 68 104 echo '<strong>'; 69 comments_number("<a href='edit.php?p=$id&c=1' title='$pending_phrase' class='post-com-count '>" . __('0') . '</a>', "<a href='edit.php?p=$id&c=1' title='$pending_phrase' class='post-com-count'>" . __('1') . '</a>', "<a href='edit.php?p=$id&c=1' title='$pending_phrase' class='post-com-count'>" . __('%') . '</a>');105 comments_number("<a href='edit.php?p=$id&c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('0') . '</span></a>', "<a href='edit.php?p=$id&c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('1') . '</span></a>', "<a href='edit.php?p=$id&c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('%') . '</span></a>'); 70 106 if ( $left ) 71 107 echo '</strong>'; … … 77 113 case 'author': 78 114 ?> 79 <td><?php the_author() ?></td> 115 <td><a href="edit.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td> 116 <?php 117 break; 118 119 case 'status': 120 ?> 121 <td> 122 <?php 123 switch ( $post->post_status ) { 124 case 'publish' : 125 case 'private' : 126 _e('Published'); 127 break; 128 case 'future' : 129 _e('Scheduled'); 130 break; 131 case 'pending' : 132 _e('Pending Review'); 133 break; 134 case 'draft' : 135 _e('Unpublished'); 136 break; 137 } 138 ?> 139 </td> 80 140 <?php 81 141 break;
Note: See TracChangeset
for help on using the changeset viewer.