Display warning when bulk deleting posts, pages, attachments, comments, etc.

git-svn-id: https://develop.svn.wordpress.org/trunk@9560 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2008-11-07 03:13:50 +00:00
parent 7039f04bf9
commit b5a79bce8d
10 changed files with 153 additions and 16 deletions

View File

@@ -338,6 +338,22 @@ if ( $page_links )
</div>
<script type="text/javascript">
/* <![CDATA[ */
(function($){
$(document).ready(function(){
$('#doaction, #doaction2').click(function(){
if ( $('select[name^="action"]').val() == 'delete' ) {
var n = $('#the-comment-list input[type="checkbox"]:checked').length;
var m = n > 1 ? '<?php echo js_escape(__("You are about to delete the selected comments.\n 'Cancel' to stop, 'OK' to delete.")); ?>' : '<?php echo js_escape(__("You are about to delete the selected comment.\n 'Cancel' to stop, 'OK' to delete.")); ?>';
return showNotice.warn(m);
}
});
});
})(jQuery);
/* ]]> */
</script>
<?php
wp_comment_reply('-1', true, 'detail');
include('admin-footer.php'); ?>