Skip to content

Commit 9592343

Browse files
committed
Don't strip protocol from WordPress core update URLs
A filter is added to make all URLs protocol relative, but our handling of these in WordPress core for updates doesn't work. It's possible this works in future versions of WordPress, but in my testing while upgrading from 3.8.1 to 4.3.1, things stood still. :)
1 parent 890ec11 commit 9592343

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mu-plugins/jquery-filters.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,10 @@ function jquery_unfiltered_html_for_term_descriptions() {
113113
add_filter( 'theme_root_uri', 'strip_https', 10, 1 );
114114
add_filter( 'clean_url', 'strip_https', 11, 1 );
115115
function strip_https($url) {
116+
// WordPress core updates need a protocol.
117+
if ( 'downloads.wordpress.org' === parse_url( $url, PHP_URL_HOST ) ) {
118+
return $url;
119+
}
120+
116121
return preg_replace( '/^https?:/', '', $url );
117122
}

0 commit comments

Comments
 (0)