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

git-svn-id: https://develop.svn.wordpress.org/trunk@2537 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-04-16 18:47:37 +00:00
parent 61ebee5445
commit f26e7d7e0d
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>