WordPress.org

Support

Support » Plugins and Hacks » WordPress.com Custom CSS » safecss and HTTPS mixed content errors. Fix included.

safecss and HTTPS mixed content errors. Fix included.

  • A minor change is needed to make safecss work properly when a site is being viewed under HTTPS context – otherwise it’ll use “siteurl” directly from wp_options which, in all likelihood, is using the http:// protocol. This will cause mixed content errors and browsers will throw up scary looking “site not secure! omgwtfbbq” errors.

    On line 433 of safecss/safecss.php, replace:
    $href = get_option( 'siteurl' );

    to:

    $href = site_url();

    http://wordpress.org/extend/plugins/safecss/

Viewing 1 replies (of 1 total)
  • If using the “Start from scratch . . .” option, then line 452 needs to change as well.
    from:
    return 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content/plugins/safecss/blank.css';
    to:
    return plugins_url( 'blank.css', __FILE__ );

Viewing 1 replies (of 1 total)
  • The topic ‘safecss and HTTPS mixed content errors. Fix included.’ is closed to new replies.
Skip to toolbar