[wp-hackers] Included scripts array

scribu scribu at gmail.com
Thu Aug 7 18:53:02 GMT 2008

@Viper007Bond: Thanks, but I can't use that because I don't have DB
data to search through.

@Jennifer Hodgdon: $wp_scripts is what I was looking for. Thanks. (I
can get the scripts in the header via another js script.)

On Thu, Aug 7, 2008 at 5:56 PM, Jennifer Hodgdon <yahgrp at poplarware.com> wrote:
> Take a look at the wp_enqueue_scripts and wp_print_scripts functions.
> Basically, the list of scripts to be printed is maintained in the global
> variable $wp_scripts. You can probably figure out what those functions do,
> and do something similar to figure out if the script of interest to you has
> been queued previously. Files to look at (in wp-includes):
> class.wp-scripts.php, class.wp-dependencies.php, functions.wp-scripts.php.
> However, you really need to get the script into the HTML header if you want
> it to work right in all browsers, so this probably won't help you much....
> Good luck,
>    Jennifer
> scribu wrote:
>> I was wondering if after the various js scripts are printed to <head>
>> there is an array of them that I can acces later in the page.
>> I'm trying to load jQuery and other scripts only if needed (hence I
>> can't use wp_enqueue_script) and I don't want to load it if it is
>> already in the head.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list