Skip to content

Commit

Permalink
Closes #7243: Preload fonts frontend (PR #7312)
Browse files Browse the repository at this point in the history
Co-authored-by: Khadreal <opeyemi.khadri@gmail.com>
Co-authored-by: WordPressFan <ahmed@wp-media.me>
Co-authored-by: Michael Lee <michaelleemichaellee408@gmail.com>
  • Loading branch information
4 people authored Feb 22, 2025
1 parent e4638fa commit 1646888
Show file tree
Hide file tree
Showing 19 changed files with 307 additions and 138 deletions.
11 changes: 11 additions & 0 deletions inc/Engine/Media/PreloadFonts/Context/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,15 @@ public function is_allowed( array $data = [] ): bool {

return wpm_apply_filters_typed( 'boolean', 'rocket_preload_fonts_optimization', (bool) $this->options->get( 'rocket_preload_fonts', 1 ) );
}

/**
* Determines if the page is mobile and separate cache for mobile files is enabled.
*
* @return bool
*/
public function is_mobile_allowed(): bool {
return $this->options->get( 'cache_mobile', 0 )
&& $this->options->get( 'do_caching_mobile_files', 0 )
&& wp_is_mobile();
}
}
184 changes: 80 additions & 104 deletions inc/Engine/Media/PreloadFonts/Frontend/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@
use WP_Rocket\Engine\Common\PerformanceHints\Frontend\ControllerInterface;
use WP_Rocket\Engine\Media\PreloadFonts\Database\Queries\PreloadFonts as PFQuery;
use WP_Rocket\Engine\Media\PreloadFonts\Context\Context;
use WP_Rocket\Engine\Optimization\UrlTrait;
use WP_Rocket\Engine\Support\CommentTrait;
use WP_Rocket\Engine\Common\Head\ElementTrait;

class Controller implements ControllerInterface {
use UrlTrait;
use CommentTrait;
use ElementTrait;

/**
* Options instance
*
Expand Down Expand Up @@ -52,8 +59,10 @@ public function __construct( Options_Data $options, PFQuery $query, Context $con
* @return string
*/
public function optimize( string $html, $row ): string {
// Implement the optimization logic here.
return $html;
if ( ! $this->context->is_allowed() || ! $row->has_preload_fonts() ) {
return $html;
}
return $this->add_meta_comment( 'auto_preload_fonts', $html );
}

/**
Expand All @@ -64,6 +73,10 @@ public function optimize( string $html, $row ): string {
* @return array
*/
public function add_custom_data( array $data ): array {
if ( ! $this->context->is_allowed() ) {
return $data;
}

$system_fonts = [
'serif',
'sans-serif',
Expand Down Expand Up @@ -99,117 +112,80 @@ public function add_custom_data( array $data ): array {
*/
$system_fonts = wpm_apply_filters_typed( 'array', 'rocket_preload_fonts_system_fonts', $system_fonts );

// To Delete Mock Data during implementation of https://github.com/wp-media/wp-rocket/issues/7306.
$font_data = [
'https://fonts.gstatic.com/s/poppins/v22/pxiAyp8kv8JHgFVrJJLmE0tMMPKhSkFEkm8.woff2' => [
[
'family' => 'Poppins',
'weight' => '100',
'style' => 'italic',
'unicodeRange' => 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiAyp8kv8JHgFVrJJLmE0tCMPKhSkFE.woff2' => [
[
'family' => 'Poppins',
'weight' => '100',
'style' => 'italic',
'unicodeRange' => 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiDyp8kv8JHgFVrJJLmv1pVGdeOYktMqlap.woff2' => [
[
'family' => 'Poppins',
'weight' => '200',
'style' => 'italic',
'unicodeRange' => 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiDyp8kv8JHgFVrJJLmv1pVF9eOYktMqg.woff2' => [
[
'family' => 'Poppins',
'weight' => '200',
'style' => 'italic',
'unicodeRange' => 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiDyp8kv8JHgFVrJJLm21lVGdeOYktMqlap.woff2' => [
[
'family' => 'Poppins',
'weight' => '300',
'style' => 'italic',
'unicodeRange' => 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiDyp8kv8JHgFVrJJLm21lVF9eOYktMqg.woff2' => [
[
'family' => 'Poppins',
'weight' => '300',
'style' => 'italic',
'unicodeRange' => 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiEyp8kv8JHgFVrJJLmg1hHGpeKQEk.woff2' => [
[
'family' => 'Poppins',
'weight' => '400',
'style' => 'italic',
'unicodeRange' => 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiFyp8kv8JHgFVrJJLucHtUFMNEKQ.woff2' => [
[
'family' => 'Poppins',
'weight' => '500',
'style' => 'italic',
'unicodeRange' => 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiGyp8kv8JHgFVrJJLsbX9NE9eO.woff2' => [
[
'family' => 'Poppins',
'weight' => '600',
'style' => 'italic',
'unicodeRange' => 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiGyp8kv8JHgFVrJJLsbXpNE9eO.woff2' => [
[
'family' => 'Poppins',
'weight' => '900',
'style' => 'italic',
'unicodeRange' => 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC…',
],
],
'https://fonts.gstatic.com/s/poppins/v22/pxiGyp8kv8JHgFVrLPTufntAOvWDSHFF.woff2' => [
[
'family' => 'Poppins',
'weight' => '100',
'style' => 'normal',
'unicodeRange' => 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7…',
],
],
'https://fonts.cdnfonts.com/s/31427/Paper Sign.woff' => [
[
'family' => 'Paper Sign',
'weight' => '400',
'style' => 'normal',
'unicodeRange' => 'U+0000-10FFFF',
],
],
];

/**
* Filters the list of mock font urls.
*
* @param array $font_data Array of font data.
* @param array $font_data Array of font data.
*/
$font_data = wpm_apply_filters_typed( 'array', 'rocket_preload_fonts_font_data', $font_data );
$font_data = wpm_apply_filters_typed( 'array', 'rocket_preload_fonts_font_data', [] );

$data['system_fonts'] = $system_fonts;
$data['font_data'] = $font_data;
$data['status']['preload_fonts'] = $this->context->is_allowed();

return $data;
}

/**
* Checks if the font URL is from a third party.
*
* @param string $font_url Font URL.
*
* @return bool
*/
private function is_third_party_font( string $font_url ): bool {
$parsed_url = wp_parse_url( $font_url );

if ( empty( $parsed_url['host'] ) ) {
return false;
}

$site_url = wp_parse_url( site_url() );

return $parsed_url['host'] !== $site_url['host'];
}

/**
* Adds the preload fonts to the head tag.
*
* @param array $items added to the head.
* @return array Items to be added to the head.
*/
public function add_preload_fonts_in_head( $items ) {

Check warning on line 154 in inc/Engine/Media/PreloadFonts/Frontend/Controller.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

inc/Engine/Media/PreloadFonts/Frontend/Controller.php#L154

The method add_preload_fonts_in_head() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
if ( ! $this->context->is_allowed() ) {
return $items;
}

global $wp;

$url = untrailingslashit( home_url( add_query_arg( [], $wp->request ) ) );
$is_mobile = $this->context->is_mobile_allowed();

$row = $this->query->get_row( $url, $is_mobile );
if ( empty( $row ) || 'completed' !== $row->status || empty( $row->fonts ) || '[]' === $row->fonts ) {
return $items;
}

$fonts = json_decode( $row->fonts, true );

if ( empty( $fonts ) ) {
return $items;
}

foreach ( $fonts as $font ) {
$item_args = [
// 'id' => 'preload-font-' . md5( $font ), // Unique ID based on font URL.
'href' => esc_url( $font ),
'as' => 'font',
];

if ( ! $this->is_relative( $font ) && $this->is_third_party_font( $font ) ) {
$item_args[2] = 'crossorigin';
}

$items[] = $this->preload_link( $item_args );
}

return $items;
}
}
31 changes: 30 additions & 1 deletion inc/Engine/Media/PreloadFonts/Frontend/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,26 @@
namespace WP_Rocket\Engine\Media\PreloadFonts\Frontend;

use WP_Rocket\Event_Management\Subscriber_Interface;
use WP_Rocket\Engine\Media\PreloadFonts\Frontend\Controller as PreloadFonts;

class Subscriber implements Subscriber_Interface {

/**
* Preload Fonts controller instance.
*
* @var PreloadFonts
*/
private $preload_fonts;

/**
* Subscriber constructor.
*
* @param PreloadFonts $preload_fonts Preload Fonts controller instance.
*/
public function __construct( PreloadFonts $preload_fonts ) {
$this->preload_fonts = $preload_fonts;
}

/**
* Returns an array of events that this subscriber wants to listen to.
*
Expand All @@ -15,6 +32,18 @@ class Subscriber implements Subscriber_Interface {
* @return array
*/
public static function get_subscribed_events(): array {
return [];
return [
'rocket_head_items' => [ 'add_preload_fonts_in_head', 30 ],
];
}

/**
* Add preload fonts into head.
*
* @param array $items Head items.
* @return array
*/
public function add_preload_fonts_in_head( $items ) {
return $this->preload_fonts->add_preload_fonts_in_head( $items );
}
}
9 changes: 7 additions & 2 deletions inc/Engine/Media/PreloadFonts/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function register(): void {
$this->getContainer()->add( 'preload_fonts_query', PreloadFontsQuery::class );
$this->getContainer()->add( 'preload_fonts_context', Context::class )
->addArgument( $options );
$this->getContainer()->add( 'preload_fonts_front_controller', FrontendController::class )
$this->getContainer()->addShared( 'preload_fonts_front_controller', FrontendController::class )
->addArguments(
[
$this->getContainer()->get( 'options' ),
Expand All @@ -73,7 +73,12 @@ public function register(): void {
]
);

$this->getContainer()->addShared( 'preload_fonts_frontend_subscriber', FrontendSubscriber::class );
$this->getContainer()->addShared( 'preload_fonts_frontend_subscriber', FrontendSubscriber::class )
->addArguments(
[
$this->getContainer()->get( 'preload_fonts_front_controller' ),
]
);

$this->getContainer()->addShared( 'preload_fonts_factory', Factory::class )
->addArguments(
Expand Down
9 changes: 9 additions & 0 deletions inc/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ class Plugin {
*/
private $is_valid_key;

/**
* Instance of the Options.
*
* @since 3.6
*
* @var Options
*/
private $options_api;

Check warning on line 100 in inc/Plugin.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

inc/Plugin.php#L100

Avoid unused private fields such as '$options_api'.

/**
* Instance of the Options_Data.
*
Expand Down
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ parameters:
count: 9
path: inc/Engine/Media/Lazyload/Subscriber.php

-
message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#"
count: 1
path: inc/Engine/Media/PreloadFonts/Frontend/Controller.php

-
message: "#^Usage of apply_filters\\(\\) is discouraged\\. Use wpm_apply_filters_typed\\(\\) instead\\.$#"
count: 2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="http://example.org/assets/fonts/font1.woff2">
<link rel="stylesheet" href="http://example.org/assets/fonts/font2.ttf">
</head>
<body></body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="http://external.domain/assets/fonts/font1.woff2">
<link rel="stylesheet" href="http://example.org/assets/fonts/font2.ttf">
</head>
<body></body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="/assets/fonts/font1.woff2">
<link rel="stylesheet" href="/assets/fonts/font2.ttf">
</head>
<body></body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
</head>
<body>
</html>
<script>var rocket_beacon_data = {"ajax_url":"http:\/\/example.org\/wp-admin\/admin-ajax.php","nonce":"96ac96b69e","url":"http:\/\/example.org","is_mobile":false,"width_threshold":1600,"height_threshold":700,"delay":500,"debug":false,"status":{"atf":true,"lrc":true,"preload_fonts":true},"elements":"img, video, picture, p, main, div, li, svg, section, header, span","lrc_threshold":1800,"system_fonts":["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","Arial","Helvetica","Times New Roman","Times","Courier New","Courier","Georgia","Palatino","Garamond","Bookman","Tahoma","Trebuchet MS","Arial Black","Impact","Comic Sans MS"],"font_data":{"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiAyp8kv8JHgFVrJJLmE0tMMPKhSkFEkm8.woff2":[{"family":"Poppins","weight":"100","style":"italic","unicodeRange":"U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiAyp8kv8JHgFVrJJLmE0tCMPKhSkFE.woff2":[{"family":"Poppins","weight":"100","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiDyp8kv8JHgFVrJJLmv1pVGdeOYktMqlap.woff2":[{"family":"Poppins","weight":"200","style":"italic","unicodeRange":"U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiDyp8kv8JHgFVrJJLmv1pVF9eOYktMqg.woff2":[{"family":"Poppins","weight":"200","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiDyp8kv8JHgFVrJJLm21lVGdeOYktMqlap.woff2":[{"family":"Poppins","weight":"300","style":"italic","unicodeRange":"U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiDyp8kv8JHgFVrJJLm21lVF9eOYktMqg.woff2":[{"family":"Poppins","weight":"300","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiEyp8kv8JHgFVrJJLmg1hHGpeKQEk.woff2":[{"family":"Poppins","weight":"400","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiFyp8kv8JHgFVrJJLucHtUFMNEKQ.woff2":[{"family":"Poppins","weight":"500","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiGyp8kv8JHgFVrJJLsbX9NE9eO.woff2":[{"family":"Poppins","weight":"600","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiGyp8kv8JHgFVrJJLsbXpNE9eO.woff2":[{"family":"Poppins","weight":"900","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiGyp8kv8JHgFVrLPTufntAOvWDSHFF.woff2":[{"family":"Poppins","weight":"100","style":"normal","unicodeRange":"U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7\u2026"}],"https:\/\/fonts.cdnfonts.com\/s\/31427\/Paper Sign.woff":[{"family":"Paper Sign","weight":"400","style":"normal","unicodeRange":"U+0000-10FFFF"}]}}</script><script data-name="wpr-wpr-beacon" src='http://example.org/wp-content/plugins/wp-rocket/assets/js/wpr-beacon.min.js' async></script>
<script>var rocket_beacon_data = {"ajax_url":"http:\/\/example.org\/wp-admin\/admin-ajax.php","nonce":"96ac96b69e","url":"http:\/\/example.org","is_mobile":false,"width_threshold":1600,"height_threshold":700,"delay":500,"debug":false,"status":{"atf":true,"lrc":true,"preload_fonts":true},"elements":"img, video, picture, p, main, div, li, svg, section, header, span","lrc_threshold":1800,"system_fonts":["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","Arial","Helvetica","Times New Roman","Times","Courier New","Courier","Georgia","Palatino","Garamond","Bookman","Tahoma","Trebuchet MS","Arial Black","Impact","Comic Sans MS"],"font_data":[]}</script><script data-name="wpr-wpr-beacon" src='http://example.org/wp-content/plugins/wp-rocket/assets/js/wpr-beacon.min.js' async></script>

Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ <h1>Iframe Header</h1>
</body>
</html>
" width="600" height="400" style="border:none;"></iframe>
<script>var rocket_beacon_data = {"ajax_url":"http:\/\/example.org\/wp-admin\/admin-ajax.php","nonce":"96ac96b69e","url":"http:\/\/example.org","is_mobile":false,"width_threshold":1600,"height_threshold":700,"delay":500,"debug":false,"status":{"atf":true,"lrc":true,"preload_fonts":true},"elements":"img, video, picture, p, main, div, li, svg, section, header, span","lrc_threshold":1800,"system_fonts":["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","Arial","Helvetica","Times New Roman","Times","Courier New","Courier","Georgia","Palatino","Garamond","Bookman","Tahoma","Trebuchet MS","Arial Black","Impact","Comic Sans MS"],"font_data":{"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiAyp8kv8JHgFVrJJLmE0tMMPKhSkFEkm8.woff2":[{"family":"Poppins","weight":"100","style":"italic","unicodeRange":"U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiAyp8kv8JHgFVrJJLmE0tCMPKhSkFE.woff2":[{"family":"Poppins","weight":"100","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiDyp8kv8JHgFVrJJLmv1pVGdeOYktMqlap.woff2":[{"family":"Poppins","weight":"200","style":"italic","unicodeRange":"U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiDyp8kv8JHgFVrJJLmv1pVF9eOYktMqg.woff2":[{"family":"Poppins","weight":"200","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiDyp8kv8JHgFVrJJLm21lVGdeOYktMqlap.woff2":[{"family":"Poppins","weight":"300","style":"italic","unicodeRange":"U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiDyp8kv8JHgFVrJJLm21lVF9eOYktMqg.woff2":[{"family":"Poppins","weight":"300","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiEyp8kv8JHgFVrJJLmg1hHGpeKQEk.woff2":[{"family":"Poppins","weight":"400","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiFyp8kv8JHgFVrJJLucHtUFMNEKQ.woff2":[{"family":"Poppins","weight":"500","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiGyp8kv8JHgFVrJJLsbX9NE9eO.woff2":[{"family":"Poppins","weight":"600","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiGyp8kv8JHgFVrJJLsbXpNE9eO.woff2":[{"family":"Poppins","weight":"900","style":"italic","unicodeRange":"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC\u2026"}],"https:\/\/fonts.gstatic.com\/s\/poppins\/v22\/pxiGyp8kv8JHgFVrLPTufntAOvWDSHFF.woff2":[{"family":"Poppins","weight":"100","style":"normal","unicodeRange":"U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7\u2026"}],"https:\/\/fonts.cdnfonts.com\/s\/31427\/Paper Sign.woff":[{"family":"Paper Sign","weight":"400","style":"normal","unicodeRange":"U+0000-10FFFF"}]}}</script><script data-name="wpr-wpr-beacon" src='http://example.org/wp-content/plugins/wp-rocket/assets/js/wpr-beacon.min.js' async></script></body>
<script>var rocket_beacon_data = {"ajax_url":"http:\/\/example.org\/wp-admin\/admin-ajax.php","nonce":"96ac96b69e","url":"http:\/\/example.org","is_mobile":false,"width_threshold":1600,"height_threshold":700,"delay":500,"debug":false,"status":{"atf":true,"lrc":true,"preload_fonts":true},"elements":"img, video, picture, p, main, div, li, svg, section, header, span","lrc_threshold":1800,"system_fonts":["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","Arial","Helvetica","Times New Roman","Times","Courier New","Courier","Georgia","Palatino","Garamond","Bookman","Tahoma","Trebuchet MS","Arial Black","Impact","Comic Sans MS"],"font_data":[]}</script><script data-name="wpr-wpr-beacon" src='http://example.org/wp-content/plugins/wp-rocket/assets/js/wpr-beacon.min.js' async></script></body>
</html>
Loading

0 comments on commit 1646888

Please sign in to comment.