i know how i can print a single script with wp_dequeue_script and wp_enqueue_script to the footer:
function dequeue_my_scripts() {
wp_dequeue_script('dgx_donate_paypalstd_script');
}
add_action( 'wp_print_scripts', 'dequeue_my_scripts', 11 );
function enqueue_scripts_to_footer() {
wp_enqueue_script('dgx_donate_paypalstd_script');
}
add_action( 'wp_footer', 'enqueue_scripts_to_footer' );
But how can i print a couple of scripts to the footer. Is there a posibility to use enumeration for example:
function dequeue_my_scripts() {
wp_dequeue_script('dgx_donate_paypalstd_script','next-handle-script', 'next-handle-script'.....);
}
add_action( 'wp_print_scripts', 'dequeue_my_scripts', 11 );
function enqueue_scripts_to_footer() {
wp_enqueue_script('dgx_donate_paypalstd_script','next-handle-script', 'next-handle-script'.....);
}
add_action( 'wp_footer', 'enqueue_scripts_to_footer' );
Or is there another possibility??
wp_enqueue_script
multiple times with different arguments (links to different scripts) inenqueue_scripts_to_footer
?function enqueue_scripts_to_footer() { wp_enqueue_script('onother-script'); } add_action( 'wp_footer', 'enqueue_scripts_to_footer' );
But i have to change the function name:enqueue_scripts_to_footer()
right? or can i use the name two times?