mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-16 07:35:39 +01:00
Show Empty Trash button only when the user has cap. props mrmist, see #4529
git-svn-id: http://svn.automattic.com/wordpress/trunk@11778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
04d3d11213
commit
e81414d3b3
@ -305,7 +305,7 @@ if ( ( 'spam' == $comment_status || 'trash' == $comment_status) && current_user_
|
|||||||
wp_nonce_field('bulk-destroy', '_destroy_nonce');
|
wp_nonce_field('bulk-destroy', '_destroy_nonce');
|
||||||
if ( 'spam' == $comment_status ) { ?>
|
if ( 'spam' == $comment_status ) { ?>
|
||||||
<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Spam'); ?>" class="button-secondary apply" />
|
<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" />
|
<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
|
||||||
<?php }
|
<?php }
|
||||||
} ?>
|
} ?>
|
||||||
@ -377,7 +377,7 @@ if ( $page_links )
|
|||||||
|
|
||||||
<?php if ( 'spam' == $comment_status ) { ?>
|
<?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" />
|
<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" />
|
<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php do_action('manage_comments_nav', $comment_status); ?>
|
<?php do_action('manage_comments_nav', $comment_status); ?>
|
||||||
|
@ -287,7 +287,9 @@ wp_dropdown_categories($dropdown_options);
|
|||||||
do_action('restrict_manage_posts');
|
do_action('restrict_manage_posts');
|
||||||
?>
|
?>
|
||||||
<input type="submit" id="post-query-submit" value="<?php esc_attr_e('Filter'); ?>" class="button-secondary" />
|
<input type="submit" id="post-query-submit" value="<?php esc_attr_e('Filter'); ?>" class="button-secondary" />
|
||||||
<?php } if ( $_GET['post_status'] == 'trash' ) { ?>
|
<?php }
|
||||||
|
|
||||||
|
if ( $_GET['post_status'] == 'trash' && current_user_can('edit_others_posts') ) { ?>
|
||||||
<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
|
<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
@ -332,7 +334,7 @@ if ( $page_links )
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
||||||
<?php if ( $_GET['post_status'] == 'trash' ) { ?>
|
<?php if ( $_GET['post_status'] == 'trash' && current_user_can('edit_others_posts') ) { ?>
|
||||||
<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
|
<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
Loading…
Reference in New Issue
Block a user