To delete a post and lock a post, you need to fill in the reason for rejection, share a window, and bind different events to buttons:
title = 'Delete posts (block, not display)';
The code copy is as follows:
$('#btn_ok', '#div_deny_reason').bind('click', function(){edit('if_show', '0');});
title = 'Lock post';
$('#btn_ok', '#div_deny_reason').bind('click', function(){edit('if_lock', '1');});
As a result, after locking the post and deleting the post, edit() will be executed twice.
Just change it to the following:
The code copy is as follows:
title = 'Delete posts (block, not display)';
$('#btn_ok', '#div_deny_reason').one('click', function(){edit('if_show', '0');});
title = 'Lock post';
$('#btn_ok', '#div_deny_reason').one('click', function(){edit('if_lock', '1');});