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

Andrew Ozz admin at laptoptips.ca
Sat May 24 20:30:17 GMT 2008

Eric Marden wrote:
> I ran across this in the codex 
> (http://codex.wordpress.org/Plugin_API/Action_Reference), and would like 
> to use it for a plugin I am developing. If I understand it correctly, I 
> can specify the name of the page on which to fire my plugin functions, 
> but can't seem to figured out the syntax.
> 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. I'm 
> using admin_head now for the hook, but this makes it fire on every admin 
> page, and is inefficient for my needs.
> Any one know how to use the load-(page) action hook?

The syntax is the same as in admin_print_scripts-(page_hook) or 
admin_print_scripts-(plugin_page). The (page_hook) is returned when you 
call add_management_page(), or you can hard-code it.

More information about the wp-hackers mailing list