Title: [Plugin: Custom List Table Example] Adding nonce fields
Last modified: August 20, 2016

---

# [Plugin: Custom List Table Example] Adding nonce fields

 *  [ianhaycox](https://wordpress.org/support/users/ianhaycox/)
 * (@ianhaycox)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-custom-list-table-example-adding-nonce-fields/)
 * Firstly a big thank you for the example code. It’s saved me hours of coding pagination,
   formatting etc. and keeps the tables looking consistent with WP admin
 * I’m not sure if it’s necessary, but I added a
 * `wp_nonce_url(..., 'delete')`
 * call around the delete URL where actions are setup in the column_name() function.
   Then I added a check in my delete code to
 * `check_admin_referer('delete');`
 * to verify the nonce.
 * I also noticed the bulk delete automatically added a nonce argument to the URL
   so also added a check delete bulk deletion,
 * `check_admin_referer('bulk-' . $this->_args['plurals');`
 * Hopefully this is the correct thing to do. Can you confirm ?
 * Thanks,
 * Ian.
 * [http://wordpress.org/extend/plugins/custom-list-table-example/](http://wordpress.org/extend/plugins/custom-list-table-example/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Dutch van Andel](https://wordpress.org/support/users/veraxus/)
 * (@veraxus)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-custom-list-table-example-adding-nonce-fields/#post-2319089)
 * I usually use `wp_verify_nonce()` to verify the nonce (returns a boolean, which
   I can handle explicitly), but `check_admin_referer()` will also work (one difference
   being that it calls `die()` if not executed from an admin page, as opposed to
   simply returning false).
 * Everything should work perfectly as you’ve written it.
 *  [michalskiluc](https://wordpress.org/support/users/michalskiluc/)
 * (@michalskiluc)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-custom-list-table-example-adding-nonce-fields/#post-2319121)
 * Where did you used these functions ?
 * Cheers
    Luc
 *  [charliespider](https://wordpress.org/support/users/charliespider/)
 * (@charliespider)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-list-table-example-adding-nonce-fields/#post-2319122)
 * [@michalskiluc](https://wordpress.org/support/users/michalskiluc/) they’re talking
   about the WP native List tables class for generating the tables you see in the
   WP admin, for example: the list of all posts ( /wp-admin/edit.php ).
 * You can learn more about list tables here: [http://codex.wordpress.org/Class_Reference/WP_List_Table](http://codex.wordpress.org/Class_Reference/WP_List_Table)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Custom List Table Example] Adding nonce fields’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-list-table-example.svg)
 * [Custom List Table Example](https://wordpress.org/plugins/custom-list-table-example/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-list-table-example/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-list-table-example/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-list-table-example/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-list-table-example/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [charliespider](https://wordpress.org/support/users/charliespider/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-list-table-example-adding-nonce-fields/#post-2319122)
 * Status: not resolved