Currently, if the scheme of the URL passed in does not match the scheme of WP_CONTENT_URL, then the search and replace str_replace( WP_CONTENT_URL, WP_CONTENT_DIR, $src ) does not occur, and the $src string remains a URL rather than being converted to a file path.
For example, we had this situation, where the replace failed (note different schemes):
Currently, if the scheme of the URL passed in does not match the scheme of
WP_CONTENT_URL
, then the search and replacestr_replace( WP_CONTENT_URL, WP_CONTENT_DIR, $src )
does not occur, and the$src
string remains a URL rather than being converted to a file path.For example, we had this situation, where the replace failed (note different schemes):
This pull request matches the schemes if they differ, forcing the
$src
scheme to the scheme ofWP_CONTENT_URL
.