Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jQuery not found error when jquery is loaded with defer #379

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

nextgenthemes
Copy link
Contributor

Description of the Change

Changelog Entry

Fixed - Bug fix

When loading jQuery with defer. jQuery will not be found. WordPress supports this natively now, but just does not apply it by default to jQuery.

I have seen other occurrences in the plugin ZeroSpamDavidWalsh() being added with and without a DOMContentLoaded wrapper. So they probably should all be changed to use the wrapper, but I am doing this PR just for this for now. Actually it might only he one in the WooCommerce class.

Also:

  1. WP coding standards applied.
  2. Based on the comment, this is actually just for "wpDiscuz plugin" so it does not need to be loaded at all for most users. Ideally, there should be a check if that plugin is active.
  3. Is jQuery still needed on the frontend? Would love to see it gone. It's 2024 I consider it to outdated bloat.

Credits

@nextgenthemes

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Copy link
Collaborator

@bmarshall511 bmarshall511 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, looks great!

@bmarshall511 bmarshall511 merged commit 83ea736 into Highfivery:develop Apr 5, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants