WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Kenn Wilson
    Member
    Posted 2 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);

    Thanks!

    http://wordpress.org/extend/plugins/what-would-seth-godin-do/

  2. Richard K Miller
    Member
    Plugin Author

    Posted 2 years ago #

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

    Best regards,
    Richard

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.