Skip to content

Instantly share code, notes, and snippets.



Created Dec 10, 2015
What would you like to do?
* SSL for media library
function have_https_for_media( $url ) {
if ( is_ssl() )
$url = str_replace( 'http://', 'https://', $url );
return $url;
add_filter( 'wp_get_attachment_url', 'have_https_for_media' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment