﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
8884,Bug In wp_enqueue_script() In Footer,GamerZ,azaozz,"I saw Andrew Ozz committing the patch to allow plugin authors to plugin their JS into the footer using wp_enqueue_script(). The script works in WP-Admin but when in the client side view, it works a little weird.
{{{
#!php
add_action('admin_print_scripts-wp-polls/polls-manager.php', 'poll_javascripts_admin');
function poll_javascripts_admin() {
	wp_enqueue_script('wp-polls-admin', plugins_url('wp-polls/polls-admin-js.js'), array('jquery'), '2.50', true);
}
}}}
The above code works perfect, with the last argument of wp_enqueue_script() set to true means print in the footer.

Now lets move onto the client side.
{{{
#!php
add_action('wp_print_scripts', 'poll_javascripts');
function poll_javascripts() {	
	wp_enqueue_script('wp-polls', plugins_url('wp-polls/polls-js.js'), array('jquery'), '2.50', true);
}
}}}
The above code is similar to that of the WP-Admin side with the last argument of wp_enqueue_script() set to true means print in the footer.

There is 2 problem with the code above.

1. It will print in the footer of WP-Admin as well even though the hook is for ""wp_print_scripts"" and not ""admin_print_scripts"".

2. In the client side, instead of printing it in the footer, it prints in the header.

I am using the default theme and hence there is a <?php wp_footer(); ?> in footer.php",defect (bug),closed,high,2.8,JavaScript,2.8,normal,fixed,,
