• 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/

  • The topic ‘Notice Use of undefined constant jQuery assumed 'jQuery' Error’ is closed to new replies.