Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Add js-to-footer module
Browse files Browse the repository at this point in the history
  • Loading branch information
QWp6t committed Mar 3, 2015
1 parent 1d677b6 commit 7df9249
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions modules/js-to-footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Roots\Soil\JsToFooter;

/**
* Moves all scripts to wp_footer action
*
* You can enable/disable this feature in functions.php (or lib/config.php if you're using Sage):
* add_theme_support('soil-js-to-footer');
*/
function js_to_footer() {
remove_action('wp_head', 'wp_print_scripts');
remove_action('wp_head', 'wp_print_head_scripts', 9);
remove_action('wp_head', 'wp_enqueue_scripts', 1);
}
add_action( 'wp_enqueue_scripts', 'custom_clean_head' );

0 comments on commit 7df9249

Please sign in to comment.