Support for using wp_enqueue_script() and wp_enqueue_style() in the HTML body. All scripts and styles are added in the footer, fixes #9346

git-svn-id: https://develop.svn.wordpress.org/trunk@18446 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2011-07-21 16:32:01 +00:00
parent 6b5d8397b0
commit c1779932f1
5 changed files with 55 additions and 25 deletions

View File

@@ -167,15 +167,7 @@ class WP_Scripts extends WP_Dependencies {
}
function do_footer_items() {
if ( !empty($this->in_footer) ) {
foreach( $this->in_footer as $key => $handle ) {
if ( !in_array($handle, $this->done, true) && isset($this->registered[$handle]) ) {
$this->do_item($handle);
$this->done[] = $handle;
unset( $this->in_footer[$key] );
}
}
}
$this->do_items(false, 1);
return $this->done;
}