Scripts To Footer - Version 0.3

Version Description

Added conditional to disable on plugin on admin dashboard, version bump.

Download this release

Release Info

Developer joshuadnelson
Plugin Icon wp plugin Scripts To Footer
Version 0.3
Comparing to
See all releases

Code changes from version 0.2 to 0.3

Files changed (2) hide show
  1. readme.txt +8 -2
  2. scripts-to-footer.php +3 -3
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: joshuadnelson
3
  Tags: javascript, footer, speed, head, performance
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FGQXZEW8S9UPC
5
  Requires at least: 3.0.1
6
- Tested up to: 3.8.1
7
- Stable tag: 0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -36,6 +36,9 @@ e.g.
36
 
37
  == Changelog ==
38
 
 
 
 
39
  = 0.2 =
40
  Updating code to be object-oriented and added page metabox to disable plugin on specific pages.
41
 
@@ -44,5 +47,8 @@ Initial release
44
 
45
  == Upgrade Notice ==
46
 
 
 
 
47
  = 0.2 =
48
  This upgrade adds options to disable plugin on specific pages.
3
  Tags: javascript, footer, speed, head, performance
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FGQXZEW8S9UPC
5
  Requires at least: 3.0.1
6
+ Tested up to: 3.9
7
+ Stable tag: 0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
36
 
37
  == Changelog ==
38
 
39
+ = 0.3 =
40
+ Added conditional to disable on plugin on admin dashboard, version bump.
41
+
42
  = 0.2 =
43
  Updating code to be object-oriented and added page metabox to disable plugin on specific pages.
44
 
47
 
48
  == Upgrade Notice ==
49
 
50
+ = 0.3 =
51
+ Adds safeguard to avoid conflicts on admin dashboard.
52
+
53
  = 0.2 =
54
  This upgrade adds options to disable plugin on specific pages.
scripts-to-footer.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Scripts-To-Footer
13
  * Plugin URI: http://wordpress.org/plugins/scripts-to-footerphp/
14
  * Description: Moves scripts to the footer to decrease page load times, while keeping stylesheets in the header. Requires that plugins and theme correctly utilizes wp_enqueue_scripts hook. Can be disabled via a checkbox on specific pages and posts.
15
- * Version: 0.2
16
  * Author: Joshua David Nelson
17
  * Author URI: http://joshuadnelson.com
18
  * License: GPL2
@@ -43,7 +43,7 @@ if( !defined( 'STF_DOMAIN' ) )
43
 
44
  // Plugin Verison
45
  if( !defined( 'STF_VERSION' ) )
46
- define( 'STF_VERSION', '0.2' );
47
 
48
  /**
49
  * Scripts to Footer Class.
@@ -99,7 +99,7 @@ class JDN_Scripts_To_Footer {
99
  function clean_head() {
100
  $excluded_pages = get_post_meta( get_queried_object_id(), 'stf_exclude', true );
101
 
102
- if( 'on' != $excluded_pages ) {
103
  remove_action( 'wp_head', 'wp_print_scripts' );
104
  remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
105
  remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );
12
  * Plugin Name: Scripts-To-Footer
13
  * Plugin URI: http://wordpress.org/plugins/scripts-to-footerphp/
14
  * Description: Moves scripts to the footer to decrease page load times, while keeping stylesheets in the header. Requires that plugins and theme correctly utilizes wp_enqueue_scripts hook. Can be disabled via a checkbox on specific pages and posts.
15
+ * Version: 0.3
16
  * Author: Joshua David Nelson
17
  * Author URI: http://joshuadnelson.com
18
  * License: GPL2
43
 
44
  // Plugin Verison
45
  if( !defined( 'STF_VERSION' ) )
46
+ define( 'STF_VERSION', '0.3' );
47
 
48
  /**
49
  * Scripts to Footer Class.
99
  function clean_head() {
100
  $excluded_pages = get_post_meta( get_queried_object_id(), 'stf_exclude', true );
101
 
102
+ if( 'on' !== $excluded_pages && !is_admin() ) {
103
  remove_action( 'wp_head', 'wp_print_scripts' );
104
  remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
105
  remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );