feat(Core): add optimize and complete code
This commit is contained in:
@@ -131,6 +131,10 @@ class Sodino_Banner_List_Table extends WP_List_Table {
|
||||
|
||||
public function process_bulk_action() {
|
||||
if ('delete' === $this->current_action()) {
|
||||
if (!current_user_can('manage_options')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$banner_ids = isset($_POST['banner_ids']) ? array_map('intval', $_POST['banner_ids']) : [];
|
||||
if (!empty($banner_ids) && check_admin_referer('bulk-' . $this->_args['plural'])) {
|
||||
foreach ($banner_ids as $id) {
|
||||
|
||||
Reference in New Issue
Block a user