Remove the fonts preconnect from always being loaded
-
Hi,
Great plugin for performance improvement. I have one issue with a hardcoded setting though.
Why is this part always inserted in the HTML through the plugin?
My website does not use the Google fonts, so why is this in?I removed all preconnect entries in the admin pages, but this still persists in the output.
Please add those as default (if needed), but offer the ability to remove them as well, because now I have to modify the plugin source to remove it….<link rel=’preconnect’ href=’https://fonts.gstatic.com’ />
<link rel=’preconnect’ href=’https://fonts.googleapis.com’ />Which is now hardcoded in:
public function prefetch_fonts( $hints, $relation_type ) { if ( 'preconnect' !== $relation_type ) { return $hints; } // TODO: we need a way to add crossorigin attribute. if ( ! in_array( 'https://fonts.gstatic.com', $hints, true ) ) { $hints[] = 'https://fonts.gstatic.com'; } if ( ! in_array( 'https://fonts.googleapis.com', $hints, true ) ) { $hints[] = 'https://fonts.googleapis.com'; } return $hints; }
- The topic ‘Remove the fonts preconnect from always being loaded’ is closed to new replies.