Closes #7284: Preload Fonts - Filter to add extensions #7318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
None
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