WordPress.org

Ready to get started?Download WordPress

Forums

Silk AJAX Comments
Notice Use of undefined constant jQuery assumed 'jQuery' Error (1 post)

  1. SiteDesignUSA
    Member
    Posted 8 months ago #

    Line 55 Notice: Use of undefined constant

    THis is in index.php of silk ajax comments folder.

    Code was:

    function google_jquery() {
    	if ( ! jQuery ) {
    		wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"), false);
    		wp_enqueue_script('jquery');
    	}
    }

    Changed to

    function google_jquery() {
    	if ( ! 'jQuery' ) {
    		wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"), false);
    		wp_enqueue_script('jquery');
    	}
    }

    Notice the single quotes around the jQuery...

    if ( ! 'jQuery' )

    There was also a comment here...

    http://wordpress.org/support/topic/debug-notice?replies=2

    It uses wp_script_is( 'jquery' ) but I didn't research how.

    Thanks,
    TJ

    http://wordpress.org/plugins/silk-ajax-comments/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 8 months ago by SiteDesignUSA
  • This topic is not resolved
  • WordPress version: 3.7.1