How to avoid double insertion of code using wp_head hook?
-
I’m working on several plugins that insert flash movies (video/audio players, a type of message board, etc) into posts and pages. The best way to do this (imho) is to to use SWFObject (https://blog.deconcept.com/swfobject/).
This requires code to be added to the head section of the page, for which I’d like to use the wp_head hook. My problem is however that when using all my plugins together, this would insert the javascript link several times, which might result in errors.
Is there any way to check whether specific code has already been inserted?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘How to avoid double insertion of code using wp_head hook?’ is closed to new replies.