WordPress.org

Forums

WordPress.com Custom CSS
safecss and HTTPS mixed content errors. Fix included. (2 posts)

  1. Dan Collis-Puro
    Member
    Posted 2 years ago #

    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/

  2. Brian Zoetewey
    Member
    Posted 2 years ago #

    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__ );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress.com Custom CSS
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.