[wp-hackers] wp _ enqueue _ script() not working while in the Loop

scribu scribu at gmail.com
Thu Dec 17 10:38:31 UTC 2009


On Thu, Dec 17, 2009 at 12:00 PM, TobiasBg <wp-hackers at tobias.baethge.com>wrote:

> Of course both plugins could use the same global variable to cross-check,
> but that's cheep somehow and not really good practice, I guess.
> Something similar that would also help: A function to check if a script
> (i.e. handle) has been printed. Then I could use that to check if printing
> is required...
>


That's why I use $wp_scripts->do_items(). It makes sure the same script
isn't included twice. You just have to make sure you use the same handle for
both plugins.


-- 
http://scribu.net


More information about the wp-hackers mailing list