[wp-trac] [WordPress Trac] #15928: wp_get_attachment_url does not check for HTTPS
WordPress Trac
wp-trac at lists.automattic.com
Sat May 26 20:17:48 UTC 2012
#15928: wp_get_attachment_url does not check for HTTPS
-------------------------------------+-----------------------------
Reporter: atetlaw | Owner:
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future Release
Component: Permalinks | Version: 3.0.3
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+-----------------------------
Comment (by johnbillion):
Quick fix for anyone who is experiencing this issue and doesn't want to
patch their install:
{{{
function fix_ssl_attachment_url( $url ) {
if ( is_ssl() )
$url = str_replace( 'http://', 'https://', $url );
return $url;
}
add_filter( 'wp_get_attachment_url', 'fix_ssl_attachment_url' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15928#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list