I am creating a plugin to add some javascript to Wordpress's theme header and footer.
I'm doing this through the following wordpress hooks:
add action(wp_head,function_name)
add action(wp_footer,function_name)
However my plugin can't add script if the clients theme does not have wp_head() and wp_footer() functions.
Is there any possibility that I can use if-else in my plugin to check to see if the client's theme has wp_head() and wp_footer() functions.
Or is there any possibilty to add my javascript before </head> and </body> tag
without using wp_head and wp_footer hooks.
