-
Notifications
You must be signed in to change notification settings - Fork 228
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
Closes #7284: Preload Fonts - Filter to add extensions #7318
base: feature/3.19
Are you sure you want to change the base?
Closes #7284: Preload Fonts - Filter to add extensions #7318
Conversation
Co-authored-by: WordPressFan <[email protected]> Co-authored-by: Michael Lee <[email protected]> Co-authored-by: Gaël Robin <[email protected]>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
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.
The filter is not working now because of the mentioned line.
Description
Fixes #7284
Adds a filter
rocket_preload_fonts_processed_extensions
to customize extension of fonts sent to the beacon script.Example of usage:
Type of change
Detailed scenario
What was tested
Integration tests are making sure that
processed_extensions
is added to the JS variable used by the beacon (rocket_beacon_data
).How to test
Just open a page that would include the beacon, and make sure that
processed_extensions
is added to the JS variable used by the beacon (rocket_beacon_data
).Also, you can change its value by using the filter
rocket_preload_fonts_processed_extensions
, example of usage:Technical description
Documentation
This pull request includes changes to the handling of font extensions in the
rocket_beacon_data
object and the addition of a filter for processed font extensions. The most important changes are the introduction of a new array for processed font extensions and the updates to various HTML fixture files to include this new data.Enhancements to font extension processing:
inc/Engine/Media/PreloadFonts/Frontend/Controller.php
: Added a new arrayprocessed_extensions
for font extensions and applied a filterrocket_preload_fonts_processed_extensions
to it.Updates to HTML fixture files:
tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/no_closing_body_tag_output.html
: Updated therocket_beacon_data
object to include the newprocessed_extensions
array.tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_double_body_tag.html
: Updated therocket_beacon_data
object to include the newprocessed_extensions
array.tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_w_beacon.html
: Updated therocket_beacon_data
object to include the newprocessed_extensions
array.tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_with_beacon_and_atf_opt.html
: Updated therocket_beacon_data
object to include the newprocessed_extensions
array.tests/Fixtures/inc/Engine/Common/PerformanceHints/Frontend/Subscriber/HTML/output_with_beacon_and_only_lrc_opt.html
: Updated therocket_beacon_data
object to include the newprocessed_extensions
array.New dependencies
None
Risks
None
Mandatory Checklist
Code validation
Code style