Actions that Run on Admin Edit Page Load After Posts Are Queried

What actions run on the edit page in the admin section of a post type

Here are the do_action and do_action_ref_array calls, for the edit.php (post) screen, without any plugins and with a default theme activated:

muplugins_loaded - do_action
registered_taxonomy - do_action
registered_taxonomy - do_action
registered_taxonomy - do_action
registered_taxonomy - do_action
registered_taxonomy - do_action
registered_post_type - do_action
registered_post_type - do_action
registered_post_type - do_action
registered_post_type - do_action
registered_post_type - do_action
plugins_loaded - do_action
sanitize_comment_cookies - do_action
setup_theme - do_action
unload_textdomain - do_action
load_textdomain - do_action
load_textdomain - do_action
after_setup_theme - do_action
load_textdomain - do_action
load_textdomain - do_action
auth_cookie_valid - do_action
set_current_user - do_action
init - do_action
registered_post_type - do_action
registered_post_type - do_action
registered_post_type - do_action
registered_post_type - do_action
registered_post_type - do_action
registered_taxonomy - do_action
registered_taxonomy - do_action
registered_taxonomy - do_action
registered_taxonomy - do_action
registered_taxonomy - do_action
widgets_init - do_action
register_sidebar - do_action
register_sidebar - do_action
register_sidebar - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_register_sidebar_widget - do_action
wp_loaded - do_action
auth_cookie_valid - do_action
auth_redirect - do_action
wp_default_scripts - do_action_ref_array
_admin_menu - do_action
admin_menu - do_action
admin_init - do_action
wp_default_styles - do_action_ref_array
admin_bar_init - do_action
add_admin_bar_menus - do_action
current_screen - do_action
load-edit.php - do_action
parse_request - do_action_ref_array
send_headers - do_action_ref_array
parse_tax_query - do_action
parse_query - do_action_ref_array
pre_get_posts - do_action_ref_array
parse_tax_query - do_action
posts_selection - do_action
wp - do_action_ref_array
admin_xml_ns - do_action
admin_xml_ns - do_action
admin_enqueue_scripts - do_action
admin_print_styles-edit.php - do_action
admin_print_styles - do_action
admin_print_scripts-edit.php - do_action
admin_print_scripts - do_action
wp_print_scripts - do_action
admin_head-edit.php - do_action
admin_head - do_action
adminmenu - do_action
in_admin_header - do_action
admin_bar_menu - do_action_ref_array
wp_before_admin_bar_render - do_action
wp_after_admin_bar_render - do_action
admin_notices - do_action
all_admin_notices - do_action
restrict_manage_posts - do_action
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
the_post - do_action_ref_array
pre_get_users - do_action
pre_user_query - do_action_ref_array
pre_get_users - do_action
pre_user_query - do_action_ref_array
in_admin_footer - do_action
admin_footer - do_action
admin_print_footer_scripts - do_action
admin_footer-edit.php - do_action
shutdown - do_action

If we include the filters and even if we exclude the gettext filter, we get over five thousand lines!!. I posted it here on Github instead 😉

I need to run a function when the page loads, after the query has
performed to get all of the posts that will be displayed on the edit
page.

I’m not sure what kind of function you need to run, but hopefully you can find your hook with these lists.

You could try for example the wp hook, that’s fired later then the main WP_Query query:

Thanks to @TheDeadMedic for reminding me to target the edit.php screen for the shop_order 😉

Here’s the updated code snippet:

is_admin() && add_action( 'wp', function( \WP $wp )
{
    if( 'edit-shop_order' === get_current_screen()->id )
    {
        // ... your code here
    }
} );

I added the is_admin() check, since the wphook also fires on the front-end.

You can also check my answer here for other methods:

How to check if I’m on a custom post type archive in the admin area