Support » Plugin: Really Simple SSL » Social counters set to zero?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author RogierLankhorst

    (@rogierlankhorst)

    The problem are these urls in your code:

    https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.koolhydraatarmrecept.nl
    data-a2a-url="https://www.koolhydraatarmrecept.nl
    addtoany_share_save" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.koolhydraatarmrecept.nl

    I think that these need to be replaced back to http to make it work. The code would have to be something like this (put in your theme’s functions.php):

    function rsssl_exclude_http_url($html) {
    
      $http_url = str_replace("https://", "http://", home_url());
      $https_url = home_url();
      
      $http_url_encoded = urlencode($http_url);
      $https_url_encoded = urlencode($https_url);
      
      $html = str_replace('add_to/facebook?linkurl='.$https_url_encoded, 'add_to/facebook?linkurl='.$http_url_encoded, $html);
      $html = str_replace('data-a2a-url="'.$https_url, 'data-a2a-url="'.$http_url, $html);
      $html = str_replace('addtoany_share_save" href="https://www.addtoany.com/share#url='.$https_url_encoded, 'addtoany_share_save" href="https://www.addtoany.com/share#url='.$http_url_encoded, $html);
      return $html;
    }
    add_filter("rsssl_fixer_output","rsssl_exclude_http_url");

    Thanks Rogier!!
    But do you mean euh… “something like this ” or “THIS:”
    😉

    Yessss it’s working!
    And the new counts on https URL are cumulated?

    Thnaks a lot!
    GRTZ
    AK

    Plugin Author RogierLankhorst

    (@rogierlankhorst)

    Typing a bit too fast sometimes… 😉

    Counts keep being added to the http url. As far as I know there’s no way of adding it up. You have to choose: http, or https.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Social counters set to zero?’ is closed to new replies.