diff --git a/wp-content/themes/apus-theme/inc/performance.php b/wp-content/themes/apus-theme/inc/performance.php index fc4d199f..1400fd1b 100644 --- a/wp-content/themes/apus-theme/inc/performance.php +++ b/wp-content/themes/apus-theme/inc/performance.php @@ -306,7 +306,14 @@ function apus_disable_rest_api( $result ) { */ function apus_remove_dns_prefetch( $hints, $relation_type ) { if ( 'dns-prefetch' === $relation_type ) { - return array_diff( wp_dependencies_unique_hosts(), $hints ); + // Remove s.w.org from hints to avoid WordPress.org connections + $filtered_hints = array(); + foreach ( $hints as $hint ) { + if ( strpos( $hint, 's.w.org' ) === false ) { + $filtered_hints[] = $hint; + } + } + return $filtered_hints; } return $hints;