-
Notifications
You must be signed in to change notification settings - Fork 68
feat: filter JS and print styles enqueuing #2207
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
Conversation
| } | ||
|
|
||
| if ( ! apply_filters( 'newspack_theme_enqueue_js', true ) ) { | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some styles being loaded down below. See lines 471 and 475. Maybe they should be moved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed in 702b208
leogermani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we should also add docblocks here
# [1.82.0-alpha.1](v1.81.0...v1.82.0-alpha.1) (2023-12-01) ### Features * filter JS and print styles enqueuing ([#2207](#2207)) ([86d60bf](86d60bf))
|
🎉 This PR is included in version 1.82.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.82.0](v1.81.0...v1.82.0) (2023-12-11) ### Features * filter JS and print styles enqueuing ([#2207](#2207)) ([86d60bf](86d60bf))
|
🎉 This PR is included in version 1.82.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Adds filters for dequeuing print styles and JS scripts.
How to test the changes in this Pull Request:
Load a page, observe that print styles (
print.css) and JS scripts (e.g.amp-fallback.js) are loaded as expectedOther information: