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.php

    r11763 r11778  
    288288?>
    289289<input type="submit" id="post-query-submit" value="<?php esc_attr_e('Filter'); ?>" class="button-secondary" />
    290 <?php } if ( $_GET['post_status'] == 'trash' ) { ?>
     290<?php }
     291
     292if ( $_GET['post_status'] == 'trash' && current_user_can('edit_others_posts') ) { ?>
    291293<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
    292294<?php } ?>
     
    333335</select>
    334336<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
    335 <?php if ( $_GET['post_status'] == 'trash' ) { ?>
     337<?php if ( $_GET['post_status'] == 'trash' && current_user_can('edit_others_posts') ) { ?>
    336338<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
    337339<?php } ?>
Note: See TracChangeset for help on using the changeset viewer.