Skip to content

Commit

Permalink
Closes #7284: Adds filter to add fonts extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Miraeld committed Feb 21, 2025
1 parent 045ea4a commit 78637b7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions inc/Engine/Media/PreloadFonts/Frontend/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,21 @@ public function add_custom_data( array $data ): array {

$data['system_fonts'] = $system_fonts;

$processed_extensions = [
'woff2',
'woff',
'ttf',
];

/**
* Filters the list of processed font extensions.
*
* @param array $processed_extensions Array of processed font extensions.
*/
wpm_apply_filters_typed( 'array', 'rocket_preload_fonts_processed_extensions', $processed_extensions );

$data[ 'processed_extensions' ] = $processed_extensions;

return $data;
}
}

0 comments on commit 78637b7

Please sign in to comment.