Hi;
I'm currently working a WP plugin. It will be as complex as buddypress. It will have more than one different pages
For example
Page 1
I will need to add some ajax related codes
Page 2
I will need to add some tab related javascript codes and css files
Every Page
All of my pages will have a different css for template issues and colour schemes
(This list can continue until page 100. I mean will need to add different things most of pages <head> and </head>)
I know this
I know
function my_custom_js() {
echo '<script type="text/javascript" src="myjsfile.js"></script>';
}
// Add hook for admin <head></head>
add_action('admin_head', 'my_custom_js');
// Add hook for front-end <head></head>
add_action('wp_head', 'my_custom_js');
but it's a quite bad function to use because i will need to use this bad function over 50 times :(
My Question
E.g., Joomla! 1.6 has an API like below
`$doc =& JFactory::getDocument();
$doc->addCustomTag($headTag);`
to do that.
Is there any similar function for WP? or is it doing that with a WP hack?
Thank you for all help