Version Description
Initial release
Download this release
Release Info
Developer | joshuadnelson |
Plugin | Scripts To Footer |
Version | 0.1 |
Comparing to | |
See all releases |
Version 0.1
- readme.txt +31 -0
- scripts-to-footer.php +35 -0
readme.txt
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Scripts To Footer ===
|
2 |
+
Contributors: joshuadnelson
|
3 |
+
Tags: javascript, footer, speed, head
|
4 |
+
Donate link: http://joshuadnelson.com/donate
|
5 |
+
Requires at least: 3.0.1
|
6 |
+
Tested up to: 3.8
|
7 |
+
Stable tag: 4.3
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
This small plugin moves scripts to the footer to help speed up page load times, while keep stylesheets in the header.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
This small plugin moves scripts to the footer to help speed up page load times, while keep stylesheets in the header. Note that this only works if you have plugins and a theme that utilizes wp_enqueue_scripts correctly.
|
16 |
+
|
17 |
+
== Installation ==
|
18 |
+
|
19 |
+
This section describes how to install the plugin and get it working.
|
20 |
+
|
21 |
+
e.g.
|
22 |
+
|
23 |
+
1. Upload `scripts-to-footer.php` to the `/wp-content/plugins/` directory
|
24 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress
|
25 |
+
1. Once activated, it should work.
|
26 |
+
|
27 |
+
== Changelog ==
|
28 |
+
|
29 |
+
= 0.1 =
|
30 |
+
|
31 |
+
Initial release
|
scripts-to-footer.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Scripts-To-Footer
|
4 |
+
Plugin URI: http://joshuadnelson.com/
|
5 |
+
Description: This small plugin moves scripts to the footer to help speed up page load times, while keep stylesheets in the header. Note that this only works if you have plugins and a theme that utilizes wp_enqueue_scripts correctly.
|
6 |
+
Version: 0.1
|
7 |
+
Author: Joshua David Nelson
|
8 |
+
Author URI: http://joshuadnelson.com
|
9 |
+
License: GPL2
|
10 |
+
|
11 |
+
Copyright 2013 Joshua David Nelson (email : josh@joshuadnelson.com)
|
12 |
+
|
13 |
+
This program is free software; you can redistribute it and/or modify
|
14 |
+
it under the terms of the GNU General Public License, version 2, as
|
15 |
+
published by the Free Software Foundation.
|
16 |
+
|
17 |
+
This program is distributed in the hope that it will be useful,
|
18 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, aka AS-IS. See the
|
20 |
+
GNU General Public License for more details.
|
21 |
+
|
22 |
+
You should have received a copy of the GNU General Public License
|
23 |
+
along with this program; if not, write to the Free Software
|
24 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
+
*/
|
26 |
+
|
27 |
+
function stf_custom_clean_head() {
|
28 |
+
remove_action( 'wp_head', 'wp_print_scripts' );
|
29 |
+
remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
|
30 |
+
remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );
|
31 |
+
}
|
32 |
+
add_action( 'wp_enqueue_scripts', 'stf_custom_clean_head' );
|
33 |
+
|
34 |
+
|
35 |
+
?>
|