Conversation
supportHello Denis! You announced “Removing jQuery dependency from frontend” in v1.3, but WP still loads Jquery scripts after activating the plugin. Is there a way to avoid loading Jquery? Thanks!
Hello @back2music , I plan to fix it in the next version. As for fixing it now, I think the easiest way is to remove the jQuery dependency in the plugin code. If this is ok for you, then you need to replace wp_enqueue_script( 'dco-comment-attachment', DCO_CA_URL . 'assets/dco-comment-attachment.js', array( 'jquery' ), DCO_CA_VERSION, true ); with wp_enqueue_script( 'dco-comment-attachment', DCO_CA_URL . 'assets/dco-comment-attachment.js', array(), DCO_CA_VERSION, true ); File: includes/class-dco-ca.php, line: 89. https://github.com/yadenis/DCO-Comment-Attachment/blob/master/includes/class-dco-ca.php#L89 This should help.
It works fine, thank you and happy New Year!
Hello @back2music , I plan to fix it in the next version. As for fixing it now, I think the easiest way is to remove the jQuery dependency in the plugin code. If this is ok for you, then you need to replace wp_enqueue_script( 'dco-comment-attachment', DCO_CA_URL . 'assets/dco-comment-attachment.js', array( 'jquery' ), DCO_CA_VERSION, true ); with wp_enqueue_script( 'dco-comment-attachment', DCO_CA_URL . 'assets/dco-comment-attachment.js', array(), DCO_CA_VERSION, true ); File: includes/class-dco-ca.php, line: 89. https://github.com/yadenis/DCO-Comment-Attachment/blob/master/includes/class-dco-ca.php#L89 This should help.
It works fine, thank you and happy New Year!