• I created this theme and it worked on my site without any problem. When I moved it to another server, I get wp_register_script was called incorrectly. error.

    I scanned my source code and I didn’t use any wp_register_script … however I am suspecting that it is reacting to this …

    function add_script_code() {
    		wp_deregister_script('jquery');
    		wp_enqueue_script(
    		'jquery',
    		base_url('source/js/jquery-1.4.1-vsdoc.js'),
    		false,
    		'1.3.0',
    		TRUE );
    		wp_enqueue_script(
    		'less',
    		base_url('source/js/less-1.3.0.min.js'),
    		false,
    		'1.3.0',
    		TRUE);
    		wp_enqueue_script(
    		'vars',
    		base_url('source/js/vars.js'),
    		false,
    		'1.3.0',
    		TRUE);
    		wp_enqueue_script(
    		'function',
    		base_url('source/js/function.js'),
    		false,
    		'1.3.0',
    		TRUE);
    	}
    	//add_action('admin_init', 'add_script_code');
    	add_action('wp_footer', 'add_script_code')

    My code base is in github. The functions folder contains my functions for the theme.
    https://github.com/abarcenas29/dmp-v4

    Thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter solidad29

    (@solidad29)

    In case people wondering …

    base_url() is a function I created.

    function base_url($url) {
    		return get_bloginfo('template_url').'/'.$url;
    	}
Viewing 1 replies (of 1 total)
  • The topic ‘wp_register_script was called incorrectly’ is closed to new replies.