Quantcast
Channel: Topic Tag: footer | WordPress.org
Viewing all articles
Browse latest Browse all 13547

scheibo on "[Plugin: WP Greet Box] Move js in the Footer"

$
0
0

Please move the javscript into the footer.

I'll must modify the wp-greet-box.class.php to move the js from

function register_scripts() {
      wp_register_script($this->name.'_functions',
        $this->c->get_plugin_url().'js/functions.js');

      if ($this->o['cache_compatible']) {
        wp_register_script($this->name.'_js_mode',
          $this->c->get_plugin_url().'js/js-mode.js', array('jquery'));
      }
      else {
        wp_register_script($this->name.'_php_mode',
          $this->c->get_plugin_url().'js/php-mode.js', array('jquery'));
      }
 }

to

function register_scripts() {
      wp_register_script($this->name.'_functions',
        $this->c->get_plugin_url().'js/functions.js', '', '', 1);

      if ($this->o['cache_compatible']) {
        wp_register_script($this->name.'_js_mode',
          $this->c->get_plugin_url().'js/js-mode.js', array('jquery'), '', 1);
      }
      else {
        wp_register_script($this->name.'_php_mode',
          $this->c->get_plugin_url().'js/php-mode.js', array('jquery'), '', 1);
      }
 }

http://wordpress.org/plugins/wp-greet-box/


Viewing all articles
Browse latest Browse all 13547

Trending Articles