Remove drafts from Write page.

git-svn-id: http://svn.automattic.com/wordpress/trunk@7282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2008-03-14 07:07:46 +00:00
parent 89bc5d972f
commit 62298aa7c7
2 changed files with 0 additions and 52 deletions

View File

@ -19,9 +19,6 @@ $messages[3] = __('Custom field deleted.');
<h2><?php _e('Write Post') ?></h2>
<?php
if ( !empty( $draft_div ) )
echo $draft_div;
if (!isset($post_ID) || 0 == $post_ID) {
$form_action = 'post';
$temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post()

View File

@ -32,55 +32,6 @@ endif;
<?php
$my_drafts = get_users_drafts($user_ID);
$pending = get_others_pending($user_ID);
$others_drafts = get_others_drafts($user_ID);
$nag_posts_limit = (int) apply_filters('nag_posts_limit', 3);
$nag_posts = array(
array(
'my_drafts',
__('Your Drafts:'),
'edit.php?post_status=draft&amp;author=' . $user_ID,
count($my_drafts)),
array(
'pending',
__('Pending Review:'),
'edit.php?post_status=pending',
count($pending)),
array(
'others_drafts',
__('Others&#8217; Drafts:'),
'edit.php?post_status=draft&author=-' . $user_ID,
count($others_drafts))
);
$draft_div = '';
if ( !empty($my_drafts) || !empty($pending) || !empty($others_drafts) ) {
$draft_div = '<div class="wrap" id="draft-nag">';
foreach ( $nag_posts as $nag ) {
if ( ${$nag[0]} ) {
$draft_div .= '<p><strong>' . wp_specialchars($nag[1]) . '</strong> ';
$i = 0;
foreach ( ${$nag[0]} as $post ) {
$i++;
if ( $i > $nag_posts_limit )
break;
$draft_div .= '<a href="post.php?action=edit&amp;post=' . $post->ID . '">';
$draft_div .= ( '' == the_title('', '', FALSE) ) ? sprintf( __('Post #%s'), $post->ID ) : get_the_title();
$draft_div .= '</a>';
if ( $i < min($nag[3], $nag_posts_limit) )
$draft_div .= ', ';
}
if ( $nag[3] > $nag_posts_limit )
$draft_div .= sprintf(__(', and <a href="%s">%d more</a>'), $nag[2], $nag[3] - $nag_posts_limit);
$draft_div .= '.</p>';
}
}
$draft_div .= "</div>\n";
}
// Show post form.
$post = get_default_post_to_edit();