Skip to content

Conversation

@adekbadek
Copy link
Member

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 expected

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@adekbadek adekbadek added the [Status] Needs Review The issue or pull request needs to be reviewed label Nov 23, 2023
@adekbadek adekbadek requested a review from a team as a code owner November 23, 2023 15:27
}

if ( ! apply_filters( 'newspack_theme_enqueue_js', true ) ) {
return;
Copy link
Contributor

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?

Copy link
Member Author

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

@adekbadek adekbadek requested a review from leogermani November 27, 2023 08:15
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Nov 27, 2023
Copy link
Contributor

@leogermani leogermani left a 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

@adekbadek adekbadek requested a review from leogermani November 29, 2023 10:01
@adekbadek adekbadek merged commit 86d60bf into master Dec 1, 2023
@adekbadek adekbadek deleted the feat/some-filters branch December 1, 2023 08:32
matticbot pushed a commit that referenced this pull request Dec 1, 2023
# [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))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.82.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Dec 11, 2023
# [1.82.0](v1.81.0...v1.82.0) (2023-12-11)

### Features

* filter JS and print styles enqueuing ([#2207](#2207)) ([86d60bf](86d60bf))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.82.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released on @alpha released [Status] Approved The pull request has been reviewed and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants