Don't show delete button if there's nothing to delete

git-svn-id: http://svn.automattic.com/wordpress/trunk@2537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-04-16 18:47:37 +00:00
parent c7bd7fe40b
commit c996e21818
1 changed files with 4 additions and 2 deletions

View File

@ -172,11 +172,13 @@ if ('publish' != $post_status || 0 == $post_ID) {
<td><?php touch_time(($action == 'edit')); ?></td>
</tr>
<?php endif; ?>
<?php if ('edit' == $action) : ?>
<tr>
<th scope="row"><?php _e('Delete'); ?>:</th>
<td><?php if ('edit' == $action) : ?>
<td>
<input name="deletepost" class="button" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), addslashes($edited_post_title) ) . "')\""; ?> />
<?php endif; ?></td>
</td>
<?php endif; ?>
</tr>
</table>