Support » Plugin: Simple Mail Address Encoder » Revisiting wp_enqueue_script error

  • Resolved dsmiller


    I see someone else posted about the WordPress error about wp_enqueue_script being called too soon. In the interest of getting this addressed in the plugin repository code, here’s a simple fix (for v. 1.5.4):

    Change line 40 to:

    add_action('wp_enqueue_scripts', array(&$this,'smae_js'), 10);

    Add the new function somewhere (I put it at line 263):

    // Enqueue scripts at the appropriate time
    	public function smae_js() {
    		wp_enqueue_script('smae.js', plugins_url('', __File__).'/smae.js', array(), '1.0.0', true);

    Can we get this integrated into the repository? (I care because, for security reasons, I compare the code on the site to the repository).


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Revisiting wp_enqueue_script error’ is closed to new replies.