What Would Seth Godin Do
[resolved] Set priority in add_action lines (2 posts)

  1. Kenn Wilson
    Posted 3 years ago #

    I've finally upgraded to WWSGD 2.x and am happy to see the earlier issues I reported have been addressed. Thanks for that.

    One remaining issue I find with 2.0.3 is that if I'm loading my own copy of jQuery via wp_enqueue_script, the WWSGD jquery.cookie.js file is loaded before jQuery, with the result that execution fails.

    What I'm doing is deregistering the default WP copy of jQuery and loading my own. I'm using the following to do this, where replace_wp_script() is the function that de/registers jQuery.

    add_action('wp', 'replace_wp_script');

    WWSGD loads it's JS like this:

    add_action('wp_footer', 'wwsgd_js');

    The result is that your JS is loaded before jQuery, with predictable results. The following trivial change to the priority fixes this:

    add_action('wp_footer', 'wwsgd_js', 100);



  2. Richard K Miller
    Plugin Author

    Posted 3 years ago #

    Hi Kenn, thanks for the message. I fixed this today in version 2.0.4.

    Best regards,

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • What Would Seth Godin Do
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.