Skip to content

Commit

Permalink
Revert "Closes #7104: Duplicated tag added to page (#7105)"
Browse files Browse the repository at this point in the history
This reverts commit dc07f3e.
  • Loading branch information
Khadreal authored Nov 14, 2024
1 parent dc07f3e commit 55e5344
Show file tree
Hide file tree
Showing 24 changed files with 109 additions and 883 deletions.
27 changes: 0 additions & 27 deletions inc/Engine/Media/Fonts/Context/Context.php

This file was deleted.

128 changes: 0 additions & 128 deletions inc/Engine/Media/Fonts/Frontend/Controller.php

This file was deleted.

57 changes: 0 additions & 57 deletions inc/Engine/Media/Fonts/Frontend/Subscriber.php

This file was deleted.

19 changes: 0 additions & 19 deletions inc/Engine/Media/Fonts/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
use WP_Rocket\Engine\Media\Fonts\Admin\Settings;
use WP_Rocket\Engine\Media\Fonts\Admin\Subscriber as AdminSubscriber;
use WP_Rocket\Engine\Media\Fonts\Context\Context;
use WP_Rocket\Engine\Media\Fonts\Frontend\Controller as FrontendController;
use WP_Rocket\Engine\Media\Fonts\Frontend\Subscriber as FrontendSubscriber;

class ServiceProvider extends AbstractServiceProvider {
/**
Expand All @@ -23,9 +20,6 @@ class ServiceProvider extends AbstractServiceProvider {
protected $provides = [
'media_fonts_settings',
'media_fonts_admin_subscriber',
'media_fonts_context',
'media_fonts_frontend_controller',
'media_fonts_frontend_subscriber',
];

/**
Expand All @@ -48,18 +42,5 @@ public function register(): void {
$this->getContainer()->add( 'media_fonts_settings', Settings::class );
$this->getContainer()->addShared( 'media_fonts_admin_subscriber', AdminSubscriber::class )
->addArgument( 'media_fonts_settings' );

$this->getContainer()->add( 'media_fonts_context', Context::class )
->addArgument( $this->getContainer()->get( 'options' ) );
$this->getContainer()->add( 'media_fonts_frontend_controller', FrontendController::class )
->addArguments(
[
$this->getContainer()->get( 'media_fonts_context' ),
]
);
$this->getContainer()->add( 'media_fonts_frontend_subscriber', FrontendSubscriber::class )
->addArgument(
$this->getContainer()->get( 'media_fonts_frontend_controller' )
);
}
}
14 changes: 0 additions & 14 deletions inc/Engine/Optimization/GoogleFonts/AbstractGFOptimization.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,6 @@ protected function get_font_display_value(): string {
* @return string
*/
protected function get_optimized_markup( string $url ): string {
/**
* Filters whether to disable Google Fonts preloading.
*
* @since 3.18
*
* @param bool $disable_google_fonts_preload Whether to disable Google Fonts preloading. Default false.
*/
if ( wpm_apply_filters_typed( 'boolean', 'rocket_disable_google_fonts_preload', false ) ) {
return sprintf(
'<link rel="stylesheet" href="%1$s" />', // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
$url
);
}

return sprintf(
'<link rel="preload" data-rocket-preload as="style" href="%1$s" /><link rel="stylesheet" href="%1$s" media="print" onload="this.media=\'all\'" /><noscript><link rel="stylesheet" href="%1$s" /></noscript>', // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
$url
Expand Down
2 changes: 1 addition & 1 deletion inc/Engine/Optimization/GoogleFonts/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct( AbstractGFOptimization $combine, AbstractGFOptimiza
public static function get_subscribed_events() {
return [
'wp_resource_hints' => [ 'preconnect', 10, 2 ],
'rocket_buffer' => [ 'process', 17 ],
'rocket_buffer' => [ 'process', 1001 ],
];
}

Expand Down
1 change: 0 additions & 1 deletion inc/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ private function init_common_subscribers() {
'performance_hints_admin_subscriber',
'lrc_frontend_subscriber',
'taxonomy_subscriber',
'media_fonts_frontend_subscriber',
'media_fonts_admin_subscriber',
];

Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 55e5344

Please sign in to comment.