[wp-hackers] load-(page) action hook

Austin Matzko if.website at gmail.com
Sat May 24 20:22:21 GMT 2008


On Sat, May 24, 2008 at 4:10 PM, Eric Marden <wp at xentek.net> wrote:
> The page I want it to fire on is the users page in the admin screen. I tried
> load-(users) and load-users and neither one fired my plugin.

The action hook for the users.php page is "load-users.php".

> Any one know how to use the load-(page) action hook?

In general, if you're adding your own admin page, you can figure out
the load action hook from the return value of the function adding the
menu.

For example, the following would call my_load_function() on the
loading of the manage admin page I created:

$my_page = add_management_page(...);
add_action("load-$my_page", 'my_load_function');


More information about the wp-hackers mailing list