Skip to content

Instantly share code, notes, and snippets.

@mallorydxw
Created November 29, 2012 17:52
Show Gist options
  • Save mallorydxw/4170745 to your computer and use it in GitHub Desktop.
Save mallorydxw/4170745 to your computer and use it in GitHub Desktop.
diff --git a/sharethis.php b/sharethis.php
index 79f6859..116f296 100644
--- a/sharethis.php
+++ b/sharethis.php
@@ -58,7 +58,7 @@ function install_ShareThis(){
if($widget==false || !preg_match('/stLight.options/',$widget)){
$pkey2=get_option('st_pubid');
$widget ="<script charset=\"utf-8\" type=\"text/javascript\">var switchTo5x=true;</script>";
- $widget.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://w.sharethis.com/button/buttons.js\"></script>";
+ $widget.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"https://ws.sharethis.com/button/buttons.js\"></script>";
$widget.="<script type=\"text/javascript\">stLight.options({publisher:'$pkey2'});var st_type='wordpress".trim(get_bloginfo('version'))."';</script>";
update_option('st_widget',$widget);
}
@@ -118,7 +118,7 @@ function getNewTag($oldTag){
$qs=parse_url($url);
if($qs['query']){
$qs=$qs['query'];
- $newUrl="http://w.sharethis.com/button/sharethis.js#$qs";
+ $newUrl="https://ws.sharethis.com/button/sharethis.js#$qs";
}
else{
$newUrl=$url;
@@ -349,7 +349,7 @@ function st_request_handler() {
$pkeyUpdated=false;
}
if(!preg_match('/stLight.options/',$widget) || $pkeyUpdated==true){
- $widgetTemp="<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://w.sharethis.com/button/buttons.js\"></script>";
+ $widgetTemp="<script charset=\"utf-8\" type=\"text/javascript\" src=\"https://ws.sharethis.com/button/buttons.js\"></script>";
$widgetTemp.="<script type=\"text/javascript\">stLight.options({publisher:'$publisher_id'});var st_type='wordpress".trim(get_bloginfo('version'))."';</script>";
// In case of button style = sharethis (4/7) default.
@@ -375,7 +375,7 @@ function st_request_handler() {
if (preg_match('/serviceWidget/',$widget) && preg_match('/hoverbuttons/',$widget)) {
- $widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://s.sharethis.com/loader.js\"></script>";
+ $widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"https://ws.sharethis.com/loader.js\"></script>";
$widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\">var options={ \"service\": \"facebook\", \"timer\": { \"countdown\": 30, \"interval\": 10, \"enable\": false}, \"frictionlessShare\": false, \"style\": \"3\", publisher:\"".$publisher_id."\"};var st_service_widget = new sharethis.widgets.serviceWidget(options);</script>";
$widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\">var options={ \"publisher\":\"".$publisher_id."\", \"position\": \"right\", \"chicklets\": { \"items\": [".$st_services_values."] } }; var st_hover_widget = new sharethis.widgets.hoverbuttons(options);</script>";
@@ -383,12 +383,12 @@ function st_request_handler() {
}
else if (preg_match('/serviceWidget/',$widget)) {
- $widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://s.sharethis.com/loader.js\"></script>";
+ $widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"https://ws.sharethis.com/loader.js\"></script>";
$widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\">var options={ \"service\": \"facebook\", \"timer\": { \"countdown\": 30, \"interval\": 10, \"enable\": false}, \"frictionlessShare\": false, \"style\": \"3\", publisher:\"".$publisher_id."\"};var st_service_widget = new sharethis.widgets.serviceWidget(options);</script>";
}
else if (preg_match('/hoverbuttons/',$widget)) {
- $widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://s.sharethis.com/loader.js\"></script>";
+ $widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"https://ws.sharethis.com/loader.js\"></script>";
$widgetTemp.="<script charset=\"utf-8\" type=\"text/javascript\">var options={ \"publisher\":\"".$publisher_id."\", \"position\": \"left\", \"chicklets\": { \"items\": [".$st_services_values."] } }; var st_hover_widget = new sharethis.widgets.hoverbuttons(options);</script>";
}
@@ -560,7 +560,7 @@ function st_options_form() {
})();
</script>
- <link rel="stylesheet" href="http://w.sharethis.com/widget/wp_ex.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="https://ws.sharethis.com/widget/wp_ex.css" type="text/css" media="screen" />
<div class="wrap">
@@ -576,13 +576,13 @@ function st_options_form() {
<span id="currentType"></span>
</span>
<ul id="carousel" class="jcarousel-skin-tango">
- <li st_type="large"><div class="buttonType">Large Icons (1/7)</div><img src="http://w.sharethis.com/images/wp_ex4.png" alt=""></li>
- <li st_type="hcount"><div class="buttonType">Horizontal Count (2/7)</div><img src="http://w.sharethis.com/images/wp_ex2.png" alt=""></li>
- <li st_type="vcount"><div class="buttonType">Vertical Count (3/7)</div><img src="http://w.sharethis.com/images/wp_ex1.png" alt=""></li>
- <li st_type="sharethis"><div class="buttonType">Classic (4/7)</div><img src="http://w.sharethis.com/images/wp_ex7.png" alt=""></li>
- <li st_type="chicklet"><div class="buttonType">Regular Buttons (5/7)</div><img src="http://w.sharethis.com/images/wp_ex5.png" alt=""></li>
- <li st_type="chicklet2"><div class="buttonType">Regular Button No-Text (6/7)</div><img src="http://w.sharethis.com/images/wp_ex6.png" alt=""></li>
- <li st_type="buttons"><div class="buttonType">Buttons (7/7)</div><img src="http://w.sharethis.com/images/wp_ex3.png" alt=""></li>
+ <li st_type="large"><div class="buttonType">Large Icons (1/7)</div><img src="https://ws.sharethis.com/images/wp_ex4.png" alt=""></li>
+ <li st_type="hcount"><div class="buttonType">Horizontal Count (2/7)</div><img src="https://ws.sharethis.com/images/wp_ex2.png" alt=""></li>
+ <li st_type="vcount"><div class="buttonType">Vertical Count (3/7)</div><img src="https://ws.sharethis.com/images/wp_ex1.png" alt=""></li>
+ <li st_type="sharethis"><div class="buttonType">Classic (4/7)</div><img src="https://ws.sharethis.com/images/wp_ex7.png" alt=""></li>
+ <li st_type="chicklet"><div class="buttonType">Regular Buttons (5/7)</div><img src="https://ws.sharethis.com/images/wp_ex5.png" alt=""></li>
+ <li st_type="chicklet2"><div class="buttonType">Regular Button No-Text (6/7)</div><img src="https://ws.sharethis.com/images/wp_ex6.png" alt=""></li>
+ <li st_type="buttons"><div class="buttonType">Buttons (7/7)</div><img src="https://ws.sharethis.com/images/wp_ex3.png" alt=""></li>
</ul>
</div>
<br/>
@@ -601,15 +601,15 @@ function st_options_form() {
<div class="version">
<span class="heading">Choose which version of the widget you would like to use:</span><br /><br />
- <input type="radio" id="get5x" ' . $fiveCheck . ' name="st_version" value="5x" class="versionItem '.$fiveTag.'" onclick="$(\'.versionImage\').attr(\'src\', \'http://www.sharethis.com/images/Image_Multi_Post-1.png\');"></input>&nbsp;
+ <input type="radio" id="get5x" ' . $fiveCheck . ' name="st_version" value="5x" class="versionItem '.$fiveTag.'" onclick="$(\'.versionImage\').attr(\'src\', \'https://www.sharethis.com/images/Image_Multi_Post-1.png\');"></input>&nbsp;
<label id="multipost_label">Multi-Post</label>
&nbsp;&nbsp;&nbsp;&nbsp;
- <input type="radio" id="get4x" ' . $fourCheck . ' name="st_version" value="4x" class="versionItem '.$fourTag.'" onclick="$(\'.versionImage\').attr(\'src\', \'http://www.sharethis.com/images/Image_Classic-1.png\');"></input>&nbsp;
+ <input type="radio" id="get4x" ' . $fourCheck . ' name="st_version" value="4x" class="versionItem '.$fourTag.'" onclick="$(\'.versionImage\').attr(\'src\', \'https://www.sharethis.com/images/Image_Classic-1.png\');"></input>&nbsp;
<label id="classic_label">Classic</label>
<br />
- <img class="versionImage" src="http://www.sharethis.com/images/' . $wImage . '"></img>
+ <img class="versionImage" src="https://www.sharethis.com/images/' . $wImage . '"></img>
</div>
<br />
<div class="services">
@@ -715,7 +715,7 @@ function st_options_form() {
<label id="hoverbar_label">Enable Hovering Bar</label>
<div style="width: 900px;">
<p class="explainText">Would you like your sharing buttons to be persistent and remain on the page as the user scrolls? Well, then Hovering Bar is for you. It shows the sharing services on the left side to present a non-intrusive yet always available experience.</p>
- <img src="http://sharethis.com/images/new/get-sharing-tools/PREVIEW_Hover.png">
+ <img src="https://sharethis.com/images/new/get-sharing-tools/PREVIEW_Hover.png">
</div><br/><br/>
<div>
@@ -754,19 +754,19 @@ function st_options_form() {
<h2 id="stepHeadings">Pick a style</h2>
<ul id="themeList" class="subOptions" style="margin-top:0px;">
<li data-value="3" class="selected">
- <a><img class="widgetIconSelected" id="opt_theme3" src="http://sharethis.com/images/fbtheme_3.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme3" src="https://sharethis.com/images/fbtheme_3.png"></a>
</li>
<li data-value="4">
- <a><img class="widgetIconSelected" id="opt_theme4" src="http://sharethis.com/images/fbtheme_4.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme4" src="https://sharethis.com/images/fbtheme_4.png"></a>
</li>
<li data-value="5">
- <a><img class="widgetIconSelected" id="opt_theme5" src="http://sharethis.com/images/fbtheme_5.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme5" src="https://sharethis.com/images/fbtheme_5.png"></a>
</li>
<li data-value="6">
- <a><img class="widgetIconSelected" id="opt_theme6" src="http://sharethis.com/images/fbtheme_6.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme6" src="https://sharethis.com/images/fbtheme_6.png"></a>
</li>
<li data-value="7">
- <a><img class="widgetIconSelected" id="opt_theme7" src="http://sharethis.com/images/fbtheme_7.png"></a>
+ <a><img class="widgetIconSelected" id="opt_theme7" src="https://sharethis.com/images/fbtheme_7.png"></a>
</li>
</ul>
<div style="clear:both;"></div>
@@ -842,4 +842,4 @@ add_action('wp_head', 'st_widget_head');
add_action('init', 'st_request_handler', 9999);
add_action('admin_menu', 'st_menu_items');
-?>
\ No newline at end of file
+?>
diff --git a/wp_st_opt.js b/wp_st_opt.js
index 4e5f900..b02db8a 100644
--- a/wp_st_opt.js
+++ b/wp_st_opt.js
@@ -276,8 +276,8 @@ function generateShareNow(){
var tag='<script charset="utf-8" type="text/javascript">var switchTo5x='+switchTo5x+';</script>';
- //var tag='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
- tag+='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
+ //var tag='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
+ tag+='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
tag+='<script type="text/javascript">stLight.options({publisher:"'+pubkey+'"'+getCopyNShare()+'});</script>';
if ($('#st_sharenow').attr('checked')) {
@@ -285,7 +285,7 @@ function generateShareNow(){
// Hoverbar already present and ShareNow Checked, need to move the hoverbar to right
$('#st_widget').val("");
- tag+='<script charset="utf-8" type="text/javascript" src="http://s.sharethis.com/loader.js"></script>';
+ tag+='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/loader.js"></script>';
$('#st_widget').val(tag);
defaultPosition = "right";
generateHoverbar(defaultPosition);
@@ -294,7 +294,7 @@ function generateShareNow(){
}else{
// simple sharenow
- tag+='<script charset="utf-8" type="text/javascript" src="http://s.sharethis.com/loader.js"></script>';
+ tag+='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/loader.js"></script>';
}
tag+='<script charset="utf-8" type="text/javascript">var options={ "service": "facebook", "timer": { "countdown": 30, "interval": 10, "enable": false}, "frictionlessShare": false, "style": "3", publisher:"'+pubkey+'"};var st_service_widget = new sharethis.widgets.serviceWidget(options);</script>';
@@ -313,7 +313,7 @@ function generateShareNow(){
generateHoverbar(defaultPosition);
}else{
// Simple buttons with NO sharenow and NO hoverbar
- var tag='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
+ var tag='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
tag+='<script type="text/javascript">stLight.options({publisher:"'+pubkey+'"'+getCopyNShare()+'});</script>';
$('#st_widget').val(tag);
}
@@ -372,8 +372,8 @@ function generateHoverbar(defaultPosition) {
var tag='<script charset="utf-8" type="text/javascript">var switchTo5x='+switchTo5x+';</script>';
- //var tag='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
- tag +='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
+ //var tag='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
+ tag +='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
tag+='<script type="text/javascript">stLight.options({publisher:"'+pubkey+'"'+getCopyNShare()+'});</script>';
if ($('#st_hoverbar').attr('checked')) {
@@ -381,7 +381,7 @@ function generateHoverbar(defaultPosition) {
defaultPosition = "right";
tag = $('#st_widget').val(); // get the present tag and append HoverBar option
}else{
- tag+='<script charset="utf-8" type="text/javascript" src="http://s.sharethis.com/loader.js"></script>';
+ tag+='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/loader.js"></script>';
}
tag+='<script charset="utf-8" type="text/javascript">var options={ publisher:"'+pubkey+'", "position": "'+defaultPosition+'", "chicklets": { "items": ['+chickletServices+'] } }; var st_hover_widget = new sharethis.widgets.hoverbuttons(options);</script>';
@@ -395,7 +395,7 @@ function generateHoverbar(defaultPosition) {
generateShareNow();
}else{
// Simple buttons with NO sharenow and NO hoverbar
- var tag='<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
+ var tag='<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>';
tag+='<script type="text/javascript">stLight.options({publisher:"'+pubkey+'"'+getCopyNShare()+'});</script>';
$('#st_widget').val(tag);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment