You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$parsed_url['path'] = trailingslashit( wp_unslash( $_SERVER['REQUEST_URI'] ) ) . trailingslashit( $parsed_url['path'] );// @todo This is wrong because it includes the path.
// If the path is relative, append it to the current request path.
1403
+
$parsed_url['path'] = trailingslashit( wp_unslash( $_SERVER['REQUEST_URI'] ) ) . trailingslashit( $parsed_url['path'] ); // @todo This is wrong because it includes the path.
1404
+
}
1405
+
1406
+
// Rebuild the URL.
1407
+
$stylesheet_url = $parsed_url['scheme'] . '://';
1408
+
if ( isset( $parsed_url['user'] ) ) {
1409
+
$stylesheet_url .= $parsed_url['user'];
1410
+
if ( isset( $parsed_url['pass'] ) ) {
1411
+
$stylesheet_url .= ':' . $parsed_url['pass'];
1412
+
}
1413
+
$stylesheet_url .= '@';
1414
+
}
1415
+
$stylesheet_url .= $parsed_url['host'];
1416
+
if ( isset( $parsed_url['port'] ) ) {
1417
+
$stylesheet_url .= ':' . $parsed_url['port'];
1418
+
}
1419
+
$stylesheet_url .= $parsed_url['path'];
1420
+
if ( isset( $parsed_url['query'] ) ) {
1421
+
$stylesheet_url .= '?' . $parsed_url['query'];
1422
+
}
1423
+
if ( isset( $parsed_url['fragment'] ) ) {
1424
+
$stylesheet_url .= '#' . $parsed_url['fragment'];
1425
+
}
1426
+
1427
+
returnesc_url_raw( $stylesheet_url );
1428
+
}
1429
+
1361
1430
/**
1362
1431
* Fetch external stylesheet.
1363
1432
*
@@ -1368,9 +1437,9 @@ private function get_stylesheet_from_url( $stylesheet_url ) {
0 commit comments