WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Comment Validation] jQuery library load (2 posts)

  1. kirilln
    Member
    Posted 4 years ago #

    Hello,
    I'm the author of the TweetBlender plugin that also relies on jQuery. On one of the sites where our plugins are used together there were problems and I found that your plugin loads jQuery version 1.2.6 (current version is 1.3.2).

    I suggest that you unbundle jQuery from your plugin. WordPress comes with the library already available and is on top of keeping it the latest version.

    Here is an example of what your code might look like:

    // add javascript with dependency on jQuery to public pages only
    add_action("template_redirect","load_js");
    function load_js() {
    	wp_enqueue_script('jqvalidate', '/' . PLUGINDIR . '/comment-validation/jquery.validate.pack.js', array('jquery'));
            wp_enqueue_script('main', '/' . PLUGINDIR . '/comment-validation/comment-validation.js', array('jquery','jqvalidate'));
    }

    http://wordpress.org/extend/plugins/comment-validation/

  2. joern.zaefferer
    Member
    Posted 4 years ago #

    I've released version 0.4, which should fix this issue. It doesn't bundle jQuery anymore and uses wp_enqueue_script.

Topic Closed

This topic has been closed to new replies.

About this Topic