WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/load-(page)

Runs when an administration menu page is loaded. This action is not usually added directly -- see Administration Menus for more details of how to add admin menus. If you do want to use it directly, the return value from add_options_page and similar functions gives you the (page) part of the action name.

Example:

add_action( 'admin_menu', 'test_load');
function test_load() {
   $hook = add_management_page( 'Test', 'Test', 8, 'testload');
   print('load-'.$hook);exit;
   /*
       Result: load-tools_page_testload
   */
}

Example:

add_action( 'load-edit.php', 'post_listing_page' );
function post_listing_page() {
    //this is the wp admin edit.php post listing page!
}

Return to Plugin API/Action Reference