Simple filter for adding https support to wp_get_attachment_url in WordPress
<?php | |
add_filter( 'wp_get_attachment_url', function( $url, $id ){ | |
if( is_ssl() ) | |
$url = str_replace( 'http://', 'https://', $url ); | |
return $url; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
No description provided.