Support » Plugin: Mustavatar » Patch for HTTPS sites

Viewing 1 replies (of 1 total)

  • From 96af06ceb97de122e92d52325377f1e891b32065 Mon Sep 17 00:00:00 2001
    From: Mike Doherty <mike@mikedoherty.ca>
    Date: Sat, 1 Nov 2014 22:25:54 -0700
    Subject: [PATCH] Use mustachio.herokuapp.com, which supports HTTPS

    I've used a protocol-relative URL, which will connect over
    either HTTP or HTTPS, according to how the page the link
    is in was loaded. That is, only secure sites will connect
    with TLS, so insecure ones are spared the "penalty" of TLS.
    ---
    mustavatar.php | 9 ++++-----
    1 file changed, 4 insertions(+), 5 deletions(-)

    diff --git a/mustavatar.php b/mustavatar.php
    index c5f66ea..a3e1854 100644
    --- a/mustavatar.php
    +++ b/mustavatar.php
    @@ -9,7 +9,7 @@
    * License: GPL2
    */

    -add_filter( 'get_avatar', 'mustavatar' );
    +add_filter( 'get_avatar', 'mustavatar' );

    /*
    * Add mustached goodness!
    @@ -20,12 +20,11 @@ function mustavatar($imgtag) {
    $url = $matches[2];
    // es-cah-pay
    $escurl = urlencode( $url );
    -
    +
    // 'stache it!
    - $imgtag = $matches[1] . "src='http://mustachify.me?src=" . $escurl . "'" . $matches[3];
    + $imgtag = $matches[1] . "src='//mustachio.herokuapp.com?src=" . $escurl . "'" . $matches[3];
    }
    -
    +
    return $imgtag;
    -
    }

    --
    1.9.2

Viewing 1 replies (of 1 total)
  • The topic ‘Patch for HTTPS sites’ is closed to new replies.