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:
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.
-
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 -
Download Monitor80,000+ installs
do_action( 'restrict_manage_posts', $this->screen->post_type, $which )src/Admin/class-dlm-admin-list-table.php:542 -
Cornerstone20,000+ installs
do_action( 'restrict_manage_posts' )includes/class.content_utilities.php:860 -
Gallery by BestWebSoft10,000+ installs
do_action( 'restrict_manage_posts' )includes/class-gllr-media-table.php:105 -
Sprout Invoices1,000+ installs
do_action( 'restrict_manage_posts' )controllers/records/Records_Admin_Table.php:113 -
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 -
Contasimple200+ installs
do_action( 'restrict_manage_posts', $this->screen->post_type, $which )includes/class-contasimple-wp-list-table-wc-orders.php:338 -
Add entries functionality to WPForms100+ installs
do_action( 'restrict_manage_posts', $this->screen->post_type, $which )includes/admin/entry/entries-table.php:237 -
Admin Posts Grid40+ installs
do_action( 'restrict_manage_posts', $this->screen->post_type, $which )includes/class-wp-posts-list-grid.php:577 -
Sprout Clients30+ installs
do_action( 'restrict_manage_posts' )controllers/records/Records_Admin_Table.php:109 -
Admin Live Search20+ installs
do_action( 'restrict_manage_posts', $this->screen->post_type, $which )admin/admin-live-search-post-table.php:610 -
Tags for Media Library10+ installs
do_action( 'restrict_manage_posts' )class-wp-media-list-table-for-nggtags.php:175 -
Recipe Schema10+ installs
do_action( 'restrict_manage_posts' )inc/recipe-import-post-list.php:147 -
Quick Slugs10+ installs
do_action( 'restrict_manage_posts' )quick-slugs.php:342 -
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 -
PickyBookingFewer than 10 installs
do_action( 'restrict_manage_posts', $this->screen->post_type, $which )admin/class-picky-reservations-list-facade.php:238 -
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.