Plugin adding to head tag after analyzing the_content
-
I’m writing a simple form to mail plugin.
My goal is to have the possibility of adding a tag to the content, like this:
[form 1 EN] (meaning form number 1 in English)
This tag is captured by a filter:
add_filter('the_content', array(&$this, 'the_content_filter'), 9);
The function the_content_filter prints the proper form.
My problem is that I have to add some javascripts (I’m using jQuery with some plugins) if – and only if – the_content is having a form.
How can I pass this to the head tag in order to insert the proper code for javascripts there (without including unnecesary this scripts on every page or post)…?
- The topic ‘Plugin adding to head tag after analyzing the_content’ is closed to new replies.