Make WordPress Core


Ignore:
Timestamp:
08/05/2009 11:50:29 PM (16 years ago)
Author:
azaozz
Message:

Show Empty Trash button only when the user has cap. props mrmist, see #4529

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-comments.php

    r11763 r11778  
    306306    if ( 'spam' == $comment_status ) { ?>
    307307        <input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Spam'); ?>" class="button-secondary apply" />
    308 <?php } elseif ( 'trash' == $comment_status ) { ?>
     308<?php } elseif ( 'trash' == $comment_status && current_user_can('moderate_comments') ) { ?>
    309309        <input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
    310310<?php }
     
    378378<?php if ( 'spam' == $comment_status ) { ?>
    379379<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Spam'); ?>" class="button-secondary apply" />
    380 <?php } elseif ( 'trash' == $comment_status ) { ?>
     380<?php } elseif ( 'trash' == $comment_status && current_user_can('moderate_comments') ) { ?>
    381381<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
    382382<?php } ?>
Note: See TracChangeset for help on using the changeset viewer.