Missing dependency – Comment-reply
In previous version, the line that specifies comment-reply.js as dependency is this:
wp_enqueue_script( 'graphene', GRAPHENE_ROOTURI . '/js/graphene.js', array( 'bootstrap', 'comment-reply', 'infinite-scroll' ), $version );
In WordPress, whenever you reply a script as a dependency for another script, that script will automatically be loaded first before the dependent script is loaded. Therefore, there’s no need to have a separate call to queue the dependency scripts, unless those scripts have not been registered yet.
In the current version, we’ve changed the script loading to this:
if ( ( get_option( 'thread_comments' ) == 1 ) ) wp_enqueue_script( 'comment-reply' ); wp_enqueue_script( 'graphene', GRAPHENE_ROOTURI . '/js/graphene.js', array( 'bootstrap', 'infinite-scroll' ), $version );
In this version, the comment-reply.js will only be loaded if threaded comments is enabled in WordPress discussion settings.
You must be logged in to reply to this topic.