wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
698 stars 218 forks source link

3.18 - Frontend part #7063

Open piotrbak opened 2 days ago

piotrbak commented 2 days ago

User Story As a user, I’d like to use locally stored Google Fonts on the front end instead of the online ones

Acceptance Criteria

Example

<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<link href="https://domain.ext/wp-content/cache/wp-rocket/fonts/google-fonts/2/f/b/1/d/3474c012728984fc4241fafaf56.css" rel="stylesheet" data-wpr-hosted-gf-parameters="family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap">
Khadreal commented 15 hours ago

Scope a solution:

In general, we would be creating 4 classes for this, Subscriber, Controller and Context and the ServiceProvider class.