I have my wp-admin configured to use SSL using the FORCE_SSL_ADMIN constant in wp-config.php. However I’ve been getting the infamous “mixed content” error throughout all my admin panels.
Upon further inspection, it turns out that the content causing this error are the site icons/favicons being loaded in the admin over http instead of https.
I am using the site icons feature that was added in WordPress 4.3, which is what is adding those site icons into the head on the admin panels over http. Is there a way to force WordPress to load those site icons using https in the admin?
Here is the view-source where the icons are being loaded, with the website URLs edited, starting line 231:
This is a known bug which I have reported here https://core.trac.wordpress.org/ticket/35182
Here is a temporary fix, place it in
// Fix https://core.trac.wordpress.org/changeset/35572 add_filter( 'get_site_icon_url', 'set_url_scheme' );
Hi Caspers. when I place your code in wp-includes/functions.php, I get:
Fatal error: Call to undefined function add_filter()
raker3, that code should be placed in the functions.php file of your theme. So:
This fixed the issue for me. Thanks Kaspars.
- You must be logged in to reply to this topic.