WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
JQuery is included in a wrong way (2 posts)

  1. Marco Cimmino
    Member
    Posted 3 years ago #

    Hi,
    please fix your plugin to include correctly jquery as the documentation states:
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    Use the wp_enqueue_scripts action to call this function, or admin_enqueue_scripts to call it on the admin side. Calling it outside of an action can lead to troubles. See #11526 for details.

    You are not complying with this rule, for example from Contact Form 7 v2.4.4:
    admin.php - line 146
    add_action( 'admin_print_scripts', 'wpcf7_admin_enqueue_scripts' );
    should be:
    add_action( 'admin_enqueue_scripts', 'wpcf7_admin_enqueue_scripts' );

    controller.php - line 246
    add_action( 'wp_print_scripts', 'wpcf7_enqueue_scripts' );
    should be:
    add_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_scripts' );

    otherwise you screw _all_ plugins that use jquery, mine included and people bother me.

    thanks
    Marco Cimmino

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Cimmo, thanks a lot for letting me know this. I've fixed it and released as Contact Form 7 2.4.5.
    http://wordpress.org/extend/plugins/contact-form-7/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic