@@ -126,22 +126,19 @@ public function process_bulk_action(): void {
126126 return ;
127127 }
128128
129- // Nonce action WordPress uses for bulk actions is 'bulk-' . $this->_args['plural']
130129 $ nonce_action = 'bulk- ' . $ this ->_args ['plural ' ];
131130 $ nonce_value = $ _REQUEST ['_wpnonce ' ] ?? '' ;
132131
133- // Ensure nonce is a string for wp_verify_nonce
134132 $ nonce = is_string ( $ nonce_value ) ? $ nonce_value : '' ;
135133
136- // Fix for PHPStan: wp_verify_nonce returns int|false, need explicit boolean check
137134 $ nonce_result = wp_verify_nonce ( $ nonce , $ nonce_action );
138135 if ( false === $ nonce_result ) {
139136 wp_die ( esc_html__ ( 'Nonce verification failed! ' , 'wpgraphql-logging ' ) );
140137 }
141138
142139 $ deleted_count = 0 ;
143140
144- // WordPress sometimes sends 'delete' for selected items
141+ // WordPress sometimes sends 'delete' for selected items.
145142 if ( in_array ( $ action , [ 'delete ' , 'bulk_delete ' ], true ) && ! empty ( $ _REQUEST ['log ' ] ) ) {
146143 $ ids = array_map ( 'absint ' , (array ) $ _REQUEST ['log ' ] );
147144 // Remove redundant empty check since array_map always returns array
@@ -160,7 +157,6 @@ public function process_bulk_action(): void {
160157 }
161158
162159 if ( $ deleted_count > 0 ) {
163- // Preserve filters during redirect
164160 $ preserved_filters = [];
165161 $ filter_keys = [ 'level_filter ' , 'start_date ' , 'end_date ' ];
166162
0 commit comments