prefix . 'school_teachers'; // Bulk delete handler if ( isset( $_POST['bulk_action'] ) && 'delete' === $_POST['bulk_action'] && !empty( $_POST['teacher_ids'] ) ) { check_admin_referer( 'schoolslots_bulk_teachers_action_nonce' ); $t_ids = array_map( 'intval', (array) wp_unslash( $_POST['teacher_ids'] ) ); $del_cnt = 0; foreach ( $t_ids as $tid ) { if ( $wpdb->delete( $table, array( 'id' => $tid, ) ) ) { ++$del_cnt; } } if ( $del_cnt > 0 ) { /* translators: %d: number of teachers deleted */ $del_msg = sprintf( _n( '%d teacher deleted successfully.', '%d teachers deleted successfully.', (int) $del_cnt, 'schoolslots' ), (int) $del_cnt ); echo '
' . esc_html( $del_msg ) . '
' . esc_html__( 'Teacher updated successfully.', 'schoolslots' ) . '
' . esc_html__( 'Teacher added successfully.', 'schoolslots' ) . '
' . esc_html__( 'Teacher deleted successfully.', 'schoolslots' ) . '