Make WordPress Core


Ignore:
Timestamp:
11/07/2008 03:13:50 AM (17 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

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

    r9557 r9560  
    339339</div>
    340340
     341<script type="text/javascript">
     342/* <![CDATA[ */
     343(function($){
     344    $(document).ready(function(){
     345        $('#doaction, #doaction2').click(function(){
     346            if ( $('select[name^="action"]').val() == 'delete' ) {
     347                var n = $('#the-comment-list input[type="checkbox"]:checked').length;
     348                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.")); ?>';
     349                return showNotice.warn(m);
     350            }
     351        });
     352    });
     353})(jQuery);
     354/* ]]> */
     355</script>
     356
    341357<?php
    342358wp_comment_reply('-1', true, 'detail');
Note: See TracChangeset for help on using the changeset viewer.