Changeset 2701 for trunk/wp-admin/post.php
- Timestamp:
- 07/08/2005 10:59:15 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r2692 r2701 323 323 <?php endif; ?> 324 324 <?php 325 if ( user_can_create_draft($user_ID)) {325 if ( user_can_create_draft($user_ID) ) { 326 326 $action = 'post'; 327 327 get_currentuserinfo(); 328 $drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID"); 329 if ($drafts) { 328 if ( $drafts = get_users_drafts( $user_ID ) ) { 330 329 ?> 331 330 <div class="wrap"> 332 331 <p><strong><?php _e('Your Drafts:') ?></strong> 333 332 <?php 334 $i = 0;335 foreach ($drafts as $draft) {336 if ( 0 != $i)333 for ( $i = 0; $i < 15; $i++ ) { 334 $draft = $drafts[$i]; 335 if ( 0 != $i ) 337 336 echo ', '; 338 337 $draft->post_title = stripslashes($draft->post_title); 339 if ( $draft->post_title == '')338 if ( empty($draft->post_title) ) 340 339 $draft->post_title = sprintf(__('Post # %s'), $draft->ID); 341 340 echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>"; 342 ++$i; 343 } 344 ?>.</p> 341 } 342 ?> 343 <?php if ( 15 < count($drafts) ) { ?> 344 , <a href="edit.php"><?php echo sprintf(__('and %s more'), (count($drafts) - 15) ); ?> »</a> 345 <?php } ?> 346 .</p> 345 347 </div> 346 348 <?php
Note: See TracChangeset
for help on using the changeset viewer.