像这样:-
function dequeue_my_scripts() {
wp_dequeue_script(\'dgx_donate_paypalstd_script\');
wp_dequeue_script(\'next-handle-script\');
wp_dequeue_script(\'next-handle-script-2\');
/* and so on*/
}
add_action( \'wp_print_scripts\', \'dequeue_my_scripts\', 11 );
function enqueue_scripts_to_footer() {
wp_enqueue_script(\'dgx_donate_paypalstd_script\');
wp_enqueue_script(\'next-handle-script\');
wp_enqueue_script(\'next-handle-script-2\');
/* and so on */
}
add_action( \'wp_footer\', \'enqueue_scripts_to_footer\' );
此实现中有什么问题?
EDIT:
我还想通知您,这是您正在努力实现的目标的正确实现:-
function enqueue_scripts_to_footer() {
wp_enqueue_script(\'dgx_donate_paypalstd_script\', false, array(), false, true);
wp_enqueue_script(\'next-handle-script\', false, array(), false, true);
wp_enqueue_script(\'next-handle-script-2\', false, array(), false, true);
/* and so on */
}
add_action( \'wp_enqueue_scripts\', \'enqueue_scripts_to_footer\' );