[wp-hackers] Re: Plugin interference

Sabin Iacob iacobs at m0n5t3r.info
Thu Apr 10 22:14:13 GMT 2008


Andrew Ozz wrote:
>     $page = add_management_page( 'myplugin', 'myplugin', 9, __FILE__, 
> 'myplugin_admin_page' );
>     add_action( "admin_print_scripts-$page", 'myplugin_admin_head' );

heh, it looks like one can always learn new things, and one can always 
miss some details while reading source... I was using 
sanitize_title("somepage") to get the proper name for 
[hooks-]<somepage>_page_whatever, after finding out the hard way that 
i18n-ed Wordpresses also have translated hook names (which is very 
extremely dumb, if you ask me... reminds me of a story told by someone 
who worked for a company writing some Microsoft Office plug-in back in 
the day and went through hell since the function names were translated, 
so the API was, um, quite hard to predict...)


More information about the wp-hackers mailing list