mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Show Empty Trash button only when the user has cap. props mrmist, see #4529
git-svn-id: https://develop.svn.wordpress.org/trunk@11778 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -305,7 +305,7 @@ if ( ( 'spam' == $comment_status || 'trash' == $comment_status) && current_user_
|
||||
wp_nonce_field('bulk-destroy', '_destroy_nonce');
|
||||
if ( 'spam' == $comment_status ) { ?>
|
||||
<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Spam'); ?>" class="button-secondary apply" />
|
||||
<?php } elseif ( 'trash' == $comment_status ) { ?>
|
||||
<?php } elseif ( 'trash' == $comment_status && current_user_can('moderate_comments') ) { ?>
|
||||
<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
|
||||
<?php }
|
||||
} ?>
|
||||
@@ -377,7 +377,7 @@ if ( $page_links )
|
||||
|
||||
<?php if ( 'spam' == $comment_status ) { ?>
|
||||
<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Spam'); ?>" class="button-secondary apply" />
|
||||
<?php } elseif ( 'trash' == $comment_status ) { ?>
|
||||
<?php } elseif ( 'trash' == $comment_status && current_user_can('moderate_comments') ) { ?>
|
||||
<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
|
||||
<?php } ?>
|
||||
<?php do_action('manage_comments_nav', $comment_status); ?>
|
||||
|
||||
Reference in New Issue
Block a user