Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Skip resource hinting on admin requests #7215
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Oct 11, 2022
1 parent 6e07e6d commit fdba4c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit fdba4c4

Please sign in to comment.