From f94e306af4b3e9770b2f1a5d5580d5f7692bb952 Mon Sep 17 00:00:00 2001 From: Ricardo Rauch Date: Thu, 21 Mar 2013 20:43:59 -0300 Subject: [PATCH] adding code at footer --- wp-reading-time.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/wp-reading-time.php b/wp-reading-time.php index e3d26a3..01b0485 100755 --- a/wp-reading-time.php +++ b/wp-reading-time.php @@ -39,7 +39,7 @@ function __construct() { // Register site styles and scripts add_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_scripts' ) ); - add_action('wp_head', array( $this, 'my_custom_js')); + add_action('wp_footer', array( $this, 'my_custom_js')); // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively. register_activation_hook( __FILE__, array( $this, 'activate' ) ); @@ -52,18 +52,17 @@ function __construct() { * Registers and enqueues plugin-specific scripts. */ public function register_plugin_scripts() { - - wp_enqueue_script( 'jquery-reading-time', "https://raw.github.com/themeskult/jquery-reading-time/master/jquery.readingTime.js", array('jquery')); + + wp_enqueue_script( 'jquery-reading-time', "//raw.github.com/themeskult/jquery-reading-time/master/jquery.readingTime.js", array('jquery')); } // end register_plugin_scripts public function my_custom_js() { echo " - ";