Check for publish_posts cap.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-05 03:38:35 +00:00
parent bd31c21f83
commit 37bd0472b1
2 changed files with 3 additions and 2 deletions

View File

@ -99,7 +99,7 @@ addLoadEvent(focusit);
<fieldset class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post Status') ?></h3>
<div class="dbx-content"><?php if ( user_can_create_post($user_ID) ) : ?>
<div class="dbx-content"><?php if ( current_user_can('publish_posts') ) : ?>
<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); ?> /> <?php _e('Published') ?></label>
<?php endif; ?>
<label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post->post_status, 'draft'); ?> /> <?php _e('Draft') ?></label>

View File

@ -66,8 +66,9 @@ Post:
</p>
<p>
<input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="Save as Draft" />
<?php if ( current_user_can('publish_posts') ) : ?>
<input name="publish" type="submit" id="publish" tabindex="6" style="font-weight: bold;" value="Publish" />
<?php endif; ?>
</p>
</div>
</form>