[wp-hackers] Re: Plugin interference

Andrew Ozz admin at laptoptips.ca
Thu Apr 10 23:24:41 GMT 2008


Sabin Iacob wrote:
> 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...)
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

I've actually added this to the codex for future reference. Feel free to 
edit it if it's too short, etc.

http://codex.wordpress.org/Plugin_API/Action_Reference#Administrative_Actions


More information about the wp-hackers mailing list