Changeset 5707 for trunk/wp-admin/post-new.php
- Timestamp:
- 06/14/2007 04:24:28 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post-new.php
r5676 r5707 25 25 <?php 26 26 endif; 27 ?> 27 28 28 if ( $drafts = get_users_drafts( $user_ID ) ) { ?> 29 <div class="wrap"> 30 <p><strong><?php _e('Your Drafts:') ?></strong> 29 31 30 <?php 32 // Show drafts. 33 $num_drafts = count($drafts); 34 if ( $num_drafts > 15 ) $num_drafts = 15; 35 for ( $i = 0; $i < $num_drafts; $i++ ) { 36 $draft = $drafts[$i]; 37 if ( 0 != $i ) 38 echo ', '; 39 if ( empty($draft->post_title) ) 40 $draft->post_title = sprintf(__('Post # %s'), $draft->ID); 41 echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>"; 31 $my_drafts = get_users_drafts($user_ID); 32 $pending = get_others_pending($user_ID); 33 $others_drafts = get_others_drafts($user_ID); 34 35 if ( !empty($my_drafts) || !empty($pending) || !empty($others_drafts) ) { 36 echo '<div class="wrap" id="draft-nag">'; 37 38 if ( $my_drafts ) { 39 echo '<p><strong>' . __( 'Your Drafts:' ) . '</strong> '; 40 if ( count($my_drafts) < 3 ) { 41 $i = 0; 42 foreach ( $my_drafts as $post ) { 43 if ( $i++ != 0 ) 44 echo ', '; 45 echo '<a href="post.php?action=edit&post=' . $post->ID . '">'; 46 the_title(); 47 echo '</a>'; 48 } 49 echo '.</p>'; 50 } else { 51 printf( 52 __( 'You have <a href="%s">%d drafts</a>.' ) . '</p>', 53 'edit.php?post_status=draft&author=' . $user_ID, count($my_drafts) 54 ); 55 } 42 56 } 43 57 44 if ( 15 < count($drafts) ) { ?> 45 , <a href="edit.php"><?php echo sprintf(__('and %s more »'), (count($drafts) - 15) ); ?></a> 46 <?php } ?> 47 .</p> 48 </div> 58 if ( $pending ) { 59 echo '<p><strong>' . __( 'Pending Review:' ) . '</strong> '; 60 if ( count($pending) < 3 ) { 61 $i = 0; 62 foreach ( $pending as $post ) { 63 if ( $i++ != 0 ) 64 echo ', '; 65 echo '<a href="post.php?action=edit&post=' . $post->ID . '">'; 66 the_title(); 67 echo '</a>'; 68 } 69 echo '.</p>'; 70 } else { 71 printf( 72 __( 'There are <a href="%s">%d drafts pending review</a>.' ) . '</p>', 73 'edit.php?post_status=pending', count($pending) 74 ); 75 } 76 } 77 78 if ( $others_drafts ) { 79 echo '<p><strong>' . __( 'Others’ Drafts:' ) . '</strong> '; 80 if ( count($others_drafts) < 3 ) { 81 $i = 0; 82 foreach ( $others_drafts as $post ) { 83 if ( $i++ != 0 ) 84 echo ', '; 85 echo '<a href="post.php?action=edit&post=' . $post->ID . '">'; 86 the_title(); 87 echo '</a>'; 88 } 89 echo '.</p>'; 90 } else { 91 printf( 92 __( 'There are <a href="%s">%d in-progress drafts by other authors</a>.' ) . '</p>', 93 'edit.php?post_status=pending&author=-' . $user_ID, count($others_drafts) 94 ); 95 } 96 } 97 98 echo "</div>\n"; 99 } 100 ?> 101 102 49 103 <?php 50 }51 52 104 // Show post form. 53 105 $post = get_default_post_to_edit();
Note: See TracChangeset
for help on using the changeset viewer.