WordPress action hook · part of WordPress core

restrict_manage_posts

A WordPress core action that 17 plugins also fire themselves, running on 202K+ sites between them.

“Fires before the Filter button on the Posts and Pages list tables.”

How to use restrict_manage_posts

It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'restrict_manage_posts', function( $post_type, $which ) {
	// Your code runs here.
}, 10, 2 );

Argument names come from Event Tickets and Registration's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

17 plugins that fire restrict_manage_posts

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Event Tickets and Registration icon Event Tickets and Registration90,000+ installs do_action( 'restrict_manage_posts', $this->screen->post_type, $which ) src/Tickets/Commerce/Admin_Tables/Orders_Table.php:739
  2. Download Monitor icon Download Monitor80,000+ installs do_action( 'restrict_manage_posts', $this->screen->post_type, $which ) src/Admin/class-dlm-admin-list-table.php:542
  3. Cornerstone icon Cornerstone20,000+ installs do_action( 'restrict_manage_posts' ) includes/class.content_utilities.php:860
  4. Gallery by BestWebSoft icon Gallery by BestWebSoft10,000+ installs do_action( 'restrict_manage_posts' ) includes/class-gllr-media-table.php:105
  5. Sprout Invoices icon Sprout Invoices1,000+ installs do_action( 'restrict_manage_posts' ) controllers/records/Records_Admin_Table.php:113
  6. BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor icon BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor1,000+ installs do_action( 'restrict_manage_posts', $post_type, '' ) includes/brikpanel-ase-bridge.php:524
  7. Contasimple icon Contasimple200+ installs do_action( 'restrict_manage_posts', $this->screen->post_type, $which ) includes/class-contasimple-wp-list-table-wc-orders.php:338
  8. Add entries functionality to WPForms icon Add entries functionality to WPForms100+ installs do_action( 'restrict_manage_posts', $this->screen->post_type, $which ) includes/admin/entry/entries-table.php:237
  9. Admin Posts Grid icon Admin Posts Grid40+ installs do_action( 'restrict_manage_posts', $this->screen->post_type, $which ) includes/class-wp-posts-list-grid.php:577
  10. Sprout Clients icon Sprout Clients30+ installs do_action( 'restrict_manage_posts' ) controllers/records/Records_Admin_Table.php:109
  11. Admin Live Search icon Admin Live Search20+ installs do_action( 'restrict_manage_posts', $this->screen->post_type, $which ) admin/admin-live-search-post-table.php:610
  12. Tags for Media Library icon Tags for Media Library10+ installs do_action( 'restrict_manage_posts' ) class-wp-media-list-table-for-nggtags.php:175
  13. Recipe Schema icon Recipe Schema10+ installs do_action( 'restrict_manage_posts' ) inc/recipe-import-post-list.php:147
  14. Quick Slugs icon Quick Slugs10+ installs do_action( 'restrict_manage_posts' ) quick-slugs.php:342
  15. Eledo PDF Attachments for WooCommerce icon Eledo PDF Attachments for WooCommerceFewer than 10 installs do_action( 'restrict_manage_posts', $this->screen->post_type, $which ) includes/admin/class-eledo-pdf-list-table.php:269
  16. PickyBooking icon PickyBookingFewer than 10 installs do_action( 'restrict_manage_posts', $this->screen->post_type, $which ) admin/class-picky-reservations-list-facade.php:238
  17. Awesome Tracker icon Awesome TrackerFewer than 10 installs do_action( 'restrict_manage_posts' ) inc/admin/class-at-records.php:85

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.