Possible Fix for Favicon Not Being Delivered Over SSL in Admin
-
This is both a help inquiry and a possible solution:
I set my admin to load via SSL using FORCE_SSL_ADMIN, but I was getting a security warning in my browser that some content was not delivered securely. I was able to narrow it down to the favicon image in the header. This probably isn’t a huge issue, but being OCD I decided to try to fix it. After digging around in the code a bit, I made a change to the wp_get_attachment_url function in wp-includes/post.php. I changed line 5076 from:
if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $GLOBALS['pagenow'] ) {
to:
if ( is_ssl() && ((! is_admin() && 'wp-login.php' !== $GLOBALS['pagenow']) || is_admin()) ) {
and this seemed to solve the problem. I noticed it also fixed images not served over SSL on the Media Library page. I thought I would post this in case it would help anyone else, or in case someone had a better solution. Since I’m relatively new to WordPress, I don’t know yet if this could cause problems elsewhere (I’ll post back if I notice any problems) so I would appreciate any information from users who might know better.
- The topic ‘Possible Fix for Favicon Not Being Delivered Over SSL in Admin’ is closed to new replies.