From fdba4c4eef65e53cb75c13dff91e8aed9e422249 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 11 Oct 2022 13:30:12 +0100 Subject: [PATCH] Skip resource hinting on admin requests #7215 --- src/AssetsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AssetsController.php b/src/AssetsController.php index 85990ba61b8..4d25eef1da9 100644 --- a/src/AssetsController.php +++ b/src/AssetsController.php @@ -86,7 +86,7 @@ public function register_assets() { * @return array URLs to print for resource hints. */ public function add_resource_hints( $urls, $relation_type ) { - if ( ! in_array( $relation_type, [ 'prefetch', 'prerender' ], true ) ) { + if ( ! in_array( $relation_type, [ 'prefetch', 'prerender' ], true ) || is_admin() ) { return $urls; }