summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/sharedaddy')
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css30
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css2
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing.css30
-rw-r--r--plugins/jetpack/modules/sharedaddy/admin-sharing.min.css2
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-skype.pngbin0 -> 2995 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-skype@2x.pngbin0 -> 6782 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-twitter.pngbin1427 -> 2945 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.pngbin2258 -> 2686 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/stumbleupon.pngbin638 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/images/stumbleupon@2x.pngbin1423 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/readme.txt129
-rw-r--r--plugins/jetpack/modules/sharedaddy/recaptcha.php179
-rw-r--r--plugins/jetpack/modules/sharedaddy/recaptchalib.php277
-rw-r--r--plugins/jetpack/modules/sharedaddy/screenshot-1.jpgbin48840 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/screenshot-2.jpgbin23781 -> 0 bytes
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharedaddy.php50
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharedaddy.pot404
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing-service.php90
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing-sources.php660
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.css34
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.js151
-rw-r--r--plugins/jetpack/modules/sharedaddy/sharing.php32
22 files changed, 917 insertions, 1153 deletions
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css
index bd429ef7..f4e1b366 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.css
@@ -30,7 +30,7 @@
}
#enabled-services {
- padding-bottom: 20px;
+ padding-bottom: 20px;
}
#available-services, #enabled-services {
@@ -131,12 +131,12 @@ li.service.share-reddit span:before {
li.service.share-tumblr span:before {
content: '\f214';
}
-li.service.share-stumbleupon span:before {
- content: '\f223';
-}
li.service.share-pocket span:before {
content: '\f224';
}
+li.service.share-skype span:before {
+ content: '\f220';
+}
li.service.share-pinterest span:before {
content: '\f209';
}
@@ -172,7 +172,7 @@ div.sd-social-icon .inner li.preview-item a span {
div.sd-social-icon ul.preview li.preview-item.preview-custom a span {
display: inline-block;
-
+
}
.services .preview li.share-custom a {
@@ -293,14 +293,6 @@ body.settings_page_sharing .advanced input[type=submit] {
height:21px;
}
-.preview-stumbleupon .option-smart-on {
- background: url(images/smart-stumbleupon.png) no-repeat top right;
- background-size: 74px 18px;
- width: 74px;
- height: 18px;
- margin-top: 1px;
-}
-
.preview-facebook .option-smart-on {
background: url(images/smart-like.png) no-repeat top right;
background-size: 85px 20px;
@@ -310,8 +302,8 @@ body.settings_page_sharing .advanced input[type=submit] {
.preview-twitter .option-smart-on {
background: url(images/smart-twitter.png?1) no-repeat top right;
- background-size: 92px 20px;
- width:92px;
+ background-size: 60px 20px;
+ width:60px;
height:20px;
}
@@ -351,6 +343,13 @@ body.settings_page_sharing .advanced input[type=submit] {
height: 20px;
}
+.preview-skype .option-smart-on {
+ background: url(images/smart-skype.png) no-repeat top right;
+ background-size: 60px 20px;
+ width: 60px;
+ height: 20px;
+}
+
/**
* Overflow sharing dialog
@@ -399,4 +398,3 @@ body.settings_page_sharing .advanced input[type=submit] {
width: 0;
text-indent: 100%;
}
-
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css
index 6272dc02..1807d0a6 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing-rtl.min.css
@@ -1 +1 @@
-#services-config{min-width:700px;width:100%;float:right}#services-config h3{font-weight:400;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;color:#464646}#available-services,#enabled-services,#live-preview{padding:20px 0 0;width:100%;border-spacing:0}#enabled-services .ui-sortable{min-height:50px}#enabled-services{padding-bottom:20px}#available-services,#enabled-services{border-bottom:2px solid #ccc}#live-preview{border-bottom:1px solid #dfdfdf;padding-bottom:60px}#available-services h3,#enabled-services h3,#live-preview h3{padding:0;margin-top:0;margin-bottom:1em}body.settings_page_sharing .description{width:180px;vertical-align:top}body.settings_page_sharing .description p{font-size:13px;font-style:italic}body.settings_page_sharing .services{padding:0 20px;vertical-align:top}body.settings_page_sharing .services ul li{float:right;cursor:move}body.settings_page_sharing .services ul li.divider{border:none;padding:0;background:0 0;cursor:default}body.settings_page_sharing ul.services-hidden{margin-bottom:0}#available-services .service,#enabled-services .service{margin-left:10px;padding:5px 5px 5px 10px;border-radius:3px;border:1px solid #bbb;background:center center no-repeat #f8f8f8}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:400 16px/1 Noticons,Genericons;vertical-align:top;position:relative;top:1px;margin-left:3px;width:16px;height:16px;text-align:center}li.service.share-print span:before{content:'\f469'}li.service.share-digg span:before{content:'\f221'}li.service.share-email span:before{content:'\f410'}li.service.share-linkedin span:before{content:'\f207'}li.service.share-twitter span:before{content:'\f202'}li.service.share-reddit span:before{content:'\f222'}li.service.share-tumblr span:before{content:'\f214'}li.service.share-stumbleupon span:before{content:'\f223'}li.service.share-pocket span:before{content:'\f224'}li.service.share-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f204'}li.service.share-press-this span:before{content:'\f205'}body.settings_page_sharing ul.preview{float:right;margin:0}body.settings_page_sharing ul.preview li.preview-item,body.settings_page_sharing ul.preview li.preview-item a{cursor:default;text-decoration:none}div.sd-social-icon .inner li.preview-item a span,div.sd-social-icon ul.preview li.preview-item a span{display:none}div.sd-social-icon ul.preview li.preview-item.preview-custom a span{display:inline-block}.services .preview li.share-custom a{text-decoration:none}.services ul li.end-fix{clear:both;float:none;visibility:hidden;padding:0;margin:0;height:20px;width:0}#enabled-services h2{font-size:20px;padding-top:0;font-weight:400!important;color:#999}body.settings_page_sharing #live-preview h2{font-size:20px;font-weight:400!important;color:#e3e3e3}body.settings_page_sharing .clearing{clear:both}body.settings_page_sharing .options .options-left{float:right}body.settings_page_sharing .input label{font-size:11px;line-height:16px}body.settings_page_sharing .advanced-form{padding:10px 10px 8px 14px;margin-right:-24px;display:none;border-top:1px #e3e3e3 solid;margin-top:4px}body.settings_page_sharing .utility{float:left;padding-top:10px;padding-left:10px;font-size:10px}body.settings_page_sharing .advanced input[type=submit]{float:right;margin-top:10px;margin-left:10px}.services li.dropzone{border:1px dashed #999;border-radius:3px;background:#e3e3e3;margin-left:10px;padding:5px;height:18px}.advanced-form .form-table th{width:auto!important}.advanced-form .button-secondary{margin-top:0!important}#hidden-drop-target{background:#e1e1e1;border:1px solid #cdcdcd;width:29%;padding:10px;vertical-align:top}#hidden-drop-target p{font-size:13px;font-style:italic;margin:0 0 10px}.preview li.preview-item{background-position:0 5px;cursor:default}.preview .option-smart-on{margin:3px 0 0 5px}.preview-digg .option-smart-on{background:url(images/smart-digg.png) top right/76px 17px no-repeat;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) top right/104px 21px no-repeat;width:104px;height:21px}.preview-stumbleupon .option-smart-on{background:url(images/smart-stumbleupon.png) top right/74px 18px no-repeat;width:74px;height:18px;margin-top:1px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) top right/85px 20px no-repeat;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) top right/92px 20px no-repeat;width:92px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) top center/99px 18px no-repeat;width:99px;height:18px;margin-top:1px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) top right/96px 20px no-repeat;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) top right/62px 20px no-repeat;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) top right/39px 20px no-repeat;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) top right/60px 20px no-repeat;width:60px;height:20px}.services .sharing-hidden li{background-color:transparent}.sharing-hidden li.share-end{clear:both;height:0;padding:0!important;margin:0!important;width:0;visibility:hidden;float:none}.preview .sharing-label{font-weight:700;border:0;padding:4px 0 0 6px}#services-config a.remove{background:#ddd;color:#fff;padding:0 4px 2px;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;text-decoration:none;font-weight:700;font-size:10px}#services-config a.remove:hover{background:red}.sd-social-icon .inner a.sd-button span,.sd-social-icon .inner a.share-icon span{display:inline-block;overflow:hidden;width:0;text-indent:100%} \ No newline at end of file
+#services-config{min-width:700px;width:100%;float:right}#services-config h3{font-weight:400;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;color:#464646}#available-services,#enabled-services,#live-preview{padding:20px 0 0;width:100%;border-spacing:0}#enabled-services .ui-sortable{min-height:50px}#enabled-services{padding-bottom:20px}#available-services,#enabled-services{border-bottom:2px solid #ccc}#live-preview{border-bottom:1px solid #dfdfdf;padding-bottom:60px}#available-services h3,#enabled-services h3,#live-preview h3{padding:0;margin-top:0;margin-bottom:1em}body.settings_page_sharing .description{width:180px;vertical-align:top}body.settings_page_sharing .description p{font-size:13px;font-style:italic}body.settings_page_sharing .services{padding:0 20px;vertical-align:top}body.settings_page_sharing .services ul li{float:right;cursor:move}body.settings_page_sharing .services ul li.divider{border:none;padding:0;background:0 0;cursor:default}body.settings_page_sharing ul.services-hidden{margin-bottom:0}#available-services .service,#enabled-services .service{margin-left:10px;padding:5px 5px 5px 10px;border-radius:3px;border:1px solid #bbb;background:center center no-repeat #f8f8f8}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:400 16px/1 Noticons,Genericons;vertical-align:top;position:relative;top:1px;margin-left:3px;width:16px;height:16px;text-align:center}li.service.share-print span:before{content:'\f469'}li.service.share-digg span:before{content:'\f221'}li.service.share-email span:before{content:'\f410'}li.service.share-linkedin span:before{content:'\f207'}li.service.share-twitter span:before{content:'\f202'}li.service.share-reddit span:before{content:'\f222'}li.service.share-tumblr span:before{content:'\f214'}li.service.share-pocket span:before{content:'\f224'}li.service.share-skype span:before{content:'\f220'}li.service.share-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f204'}li.service.share-press-this span:before{content:'\f205'}body.settings_page_sharing ul.preview{float:right;margin:0}body.settings_page_sharing ul.preview li.preview-item,body.settings_page_sharing ul.preview li.preview-item a{cursor:default;text-decoration:none}div.sd-social-icon .inner li.preview-item a span,div.sd-social-icon ul.preview li.preview-item a span{display:none}div.sd-social-icon ul.preview li.preview-item.preview-custom a span{display:inline-block}.services .preview li.share-custom a{text-decoration:none}.services ul li.end-fix{clear:both;float:none;visibility:hidden;padding:0;margin:0;height:20px;width:0}#enabled-services h2{font-size:20px;padding-top:0;font-weight:400!important;color:#999}body.settings_page_sharing #live-preview h2{font-size:20px;font-weight:400!important;color:#e3e3e3}body.settings_page_sharing .clearing{clear:both}body.settings_page_sharing .options .options-left{float:right}body.settings_page_sharing .input label{font-size:11px;line-height:16px}body.settings_page_sharing .advanced-form{padding:10px 10px 8px 14px;margin-right:-24px;display:none;border-top:1px #e3e3e3 solid;margin-top:4px}body.settings_page_sharing .utility{float:left;padding-top:10px;padding-left:10px;font-size:10px}body.settings_page_sharing .advanced input[type=submit]{float:right;margin-top:10px;margin-left:10px}.services li.dropzone{border:1px dashed #999;border-radius:3px;background:#e3e3e3;margin-left:10px;padding:5px;height:18px}.advanced-form .form-table th{width:auto!important}.advanced-form .button-secondary{margin-top:0!important}#hidden-drop-target{background:#e1e1e1;border:1px solid #cdcdcd;width:29%;padding:10px;vertical-align:top}#hidden-drop-target p{font-size:13px;font-style:italic;margin:0 0 10px}.preview li.preview-item{background-position:0 5px;cursor:default}.preview .option-smart-on{margin:3px 0 0 5px}.preview-digg .option-smart-on{background:url(images/smart-digg.png) top right/76px 17px no-repeat;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) top right/104px 21px no-repeat;width:104px;height:21px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) top right/85px 20px no-repeat;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) top right/60px 20px no-repeat;width:60px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) top center/99px 18px no-repeat;width:99px;height:18px;margin-top:1px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) top right/96px 20px no-repeat;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) top right/62px 20px no-repeat;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) top right/39px 20px no-repeat;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) top right/60px 20px no-repeat;width:60px;height:20px}.preview-skype .option-smart-on{background:url(images/smart-skype.png) top right/60px 20px no-repeat;width:60px;height:20px}.services .sharing-hidden li{background-color:transparent}.sharing-hidden li.share-end{clear:both;height:0;padding:0!important;margin:0!important;width:0;visibility:hidden;float:none}.preview .sharing-label{font-weight:700;border:0;padding:4px 0 0 6px}#services-config a.remove{background:#ddd;color:#fff;padding:0 4px 2px;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;text-decoration:none;font-weight:700;font-size:10px}#services-config a.remove:hover{background:red}.sd-social-icon .inner a.sd-button span,.sd-social-icon .inner a.share-icon span{display:inline-block;overflow:hidden;width:0;text-indent:100%} \ No newline at end of file
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing.css b/plugins/jetpack/modules/sharedaddy/admin-sharing.css
index dd4982e4..c61df08e 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing.css
@@ -30,7 +30,7 @@
}
#enabled-services {
- padding-bottom: 20px;
+ padding-bottom: 20px;
}
#available-services, #enabled-services {
@@ -131,12 +131,12 @@ li.service.share-reddit span:before {
li.service.share-tumblr span:before {
content: '\f214';
}
-li.service.share-stumbleupon span:before {
- content: '\f223';
-}
li.service.share-pocket span:before {
content: '\f224';
}
+li.service.share-skype span:before {
+ content: '\f220';
+}
li.service.share-pinterest span:before {
content: '\f209';
}
@@ -172,7 +172,7 @@ div.sd-social-icon .inner li.preview-item a span {
div.sd-social-icon ul.preview li.preview-item.preview-custom a span {
display: inline-block;
-
+
}
.services .preview li.share-custom a {
@@ -293,14 +293,6 @@ body.settings_page_sharing .advanced input[type=submit] {
height:21px;
}
-.preview-stumbleupon .option-smart-on {
- background: url(images/smart-stumbleupon.png) no-repeat top left;
- background-size: 74px 18px;
- width: 74px;
- height: 18px;
- margin-top: 1px;
-}
-
.preview-facebook .option-smart-on {
background: url(images/smart-like.png) no-repeat top left;
background-size: 85px 20px;
@@ -310,8 +302,8 @@ body.settings_page_sharing .advanced input[type=submit] {
.preview-twitter .option-smart-on {
background: url(images/smart-twitter.png?1) no-repeat top left;
- background-size: 92px 20px;
- width:92px;
+ background-size: 60px 20px;
+ width:60px;
height:20px;
}
@@ -351,6 +343,13 @@ body.settings_page_sharing .advanced input[type=submit] {
height: 20px;
}
+.preview-skype .option-smart-on {
+ background: url(images/smart-skype.png) no-repeat top left;
+ background-size: 60px 20px;
+ width: 60px;
+ height: 20px;
+}
+
/**
* Overflow sharing dialog
@@ -399,4 +398,3 @@ body.settings_page_sharing .advanced input[type=submit] {
width: 0;
text-indent: 100%;
}
-
diff --git a/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css b/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
index 3ce68a3c..ca0413da 100644
--- a/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
+++ b/plugins/jetpack/modules/sharedaddy/admin-sharing.min.css
@@ -1 +1 @@
-#services-config{min-width:700px;width:100%;float:left}#services-config h3{font-weight:400;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;color:#464646}#available-services,#enabled-services,#live-preview{padding:20px 0 0;width:100%;border-spacing:0}#enabled-services .ui-sortable{min-height:50px}#enabled-services{padding-bottom:20px}#available-services,#enabled-services{border-bottom:2px solid #ccc}#live-preview{border-bottom:1px solid #dfdfdf;padding-bottom:60px}#available-services h3,#enabled-services h3,#live-preview h3{padding:0;margin-top:0;margin-bottom:1em}body.settings_page_sharing .description{width:180px;vertical-align:top}body.settings_page_sharing .description p{font-size:13px;font-style:italic}body.settings_page_sharing .services{padding:0 20px;vertical-align:top}body.settings_page_sharing .services ul li{float:left;cursor:move}body.settings_page_sharing .services ul li.divider{border:none;padding:0;background:0 0;cursor:default}body.settings_page_sharing ul.services-hidden{margin-bottom:0}#available-services .service,#enabled-services .service{margin-right:10px;padding:5px 10px 5px 5px;border-radius:3px;border:1px solid #bbb;background:center center no-repeat #f8f8f8}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:400 16px/1 Noticons,Genericons;vertical-align:top;position:relative;top:1px;margin-right:3px;width:16px;height:16px;text-align:center}li.service.share-print span:before{content:'\f469'}li.service.share-digg span:before{content:'\f221'}li.service.share-email span:before{content:'\f410'}li.service.share-linkedin span:before{content:'\f207'}li.service.share-twitter span:before{content:'\f202'}li.service.share-reddit span:before{content:'\f222'}li.service.share-tumblr span:before{content:'\f214'}li.service.share-stumbleupon span:before{content:'\f223'}li.service.share-pocket span:before{content:'\f224'}li.service.share-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f204'}li.service.share-press-this span:before{content:'\f205'}body.settings_page_sharing ul.preview{float:left;margin:0}body.settings_page_sharing ul.preview li.preview-item,body.settings_page_sharing ul.preview li.preview-item a{cursor:default;text-decoration:none}div.sd-social-icon .inner li.preview-item a span,div.sd-social-icon ul.preview li.preview-item a span{display:none}div.sd-social-icon ul.preview li.preview-item.preview-custom a span{display:inline-block}.services .preview li.share-custom a{text-decoration:none}.services ul li.end-fix{clear:both;float:none;visibility:hidden;padding:0;margin:0;height:20px;width:0}#enabled-services h2{font-size:20px;padding-top:0;font-weight:400!important;color:#999}body.settings_page_sharing #live-preview h2{font-size:20px;font-weight:400!important;color:#e3e3e3}body.settings_page_sharing .clearing{clear:both}body.settings_page_sharing .options .options-left{float:left}body.settings_page_sharing .input label{font-size:11px;line-height:16px}body.settings_page_sharing .advanced-form{padding:10px 14px 8px 10px;margin-left:-24px;display:none;border-top:1px #e3e3e3 solid;margin-top:4px}body.settings_page_sharing .utility{float:right;padding-top:10px;padding-right:10px;font-size:10px}body.settings_page_sharing .advanced input[type=submit]{float:left;margin-top:10px;margin-right:10px}.services li.dropzone{border:1px dashed #999;border-radius:3px;background:#e3e3e3;margin-right:10px;padding:5px;height:18px}.advanced-form .form-table th{width:auto!important}.advanced-form .button-secondary{margin-top:0!important}#hidden-drop-target{background:#e1e1e1;border:1px solid #cdcdcd;width:29%;padding:10px;vertical-align:top}#hidden-drop-target p{font-size:13px;font-style:italic;margin:0 0 10px}.preview li.preview-item{background-position:0 5px;cursor:default}.preview .option-smart-on{margin:3px 5px 0 0}.preview-digg .option-smart-on{background:url(images/smart-digg.png) top left/76px 17px no-repeat;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) top left/104px 21px no-repeat;width:104px;height:21px}.preview-stumbleupon .option-smart-on{background:url(images/smart-stumbleupon.png) top left/74px 18px no-repeat;width:74px;height:18px;margin-top:1px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) top left/85px 20px no-repeat;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) top left/92px 20px no-repeat;width:92px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) top center/99px 18px no-repeat;width:99px;height:18px;margin-top:1px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) top left/96px 20px no-repeat;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) top left/62px 20px no-repeat;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) top left/39px 20px no-repeat;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) top left/60px 20px no-repeat;width:60px;height:20px}.services .sharing-hidden li{background-color:transparent}.sharing-hidden li.share-end{clear:both;height:0;padding:0!important;margin:0!important;width:0;visibility:hidden;float:none}.preview .sharing-label{font-weight:700;border:0;padding:4px 6px 0 0}#services-config a.remove{background:#ddd;color:#fff;padding:0 4px 2px;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;text-decoration:none;font-weight:700;font-size:10px}#services-config a.remove:hover{background:red}.sd-social-icon .inner a.sd-button span,.sd-social-icon .inner a.share-icon span{display:inline-block;overflow:hidden;width:0;text-indent:100%} \ No newline at end of file
+#services-config{min-width:700px;width:100%;float:left}#services-config h3{font-weight:400;font-size:15px;margin:0;padding:8px 10px;overflow:hidden;white-space:nowrap;color:#464646}#available-services,#enabled-services,#live-preview{padding:20px 0 0;width:100%;border-spacing:0}#enabled-services .ui-sortable{min-height:50px}#enabled-services{padding-bottom:20px}#available-services,#enabled-services{border-bottom:2px solid #ccc}#live-preview{border-bottom:1px solid #dfdfdf;padding-bottom:60px}#available-services h3,#enabled-services h3,#live-preview h3{padding:0;margin-top:0;margin-bottom:1em}body.settings_page_sharing .description{width:180px;vertical-align:top}body.settings_page_sharing .description p{font-size:13px;font-style:italic}body.settings_page_sharing .services{padding:0 20px;vertical-align:top}body.settings_page_sharing .services ul li{float:left;cursor:move}body.settings_page_sharing .services ul li.divider{border:none;padding:0;background:0 0;cursor:default}body.settings_page_sharing ul.services-hidden{margin-bottom:0}#available-services .service,#enabled-services .service{margin-right:10px;padding:5px 10px 5px 5px;border-radius:3px;border:1px solid #bbb;background:center center no-repeat #f8f8f8}#available-services .service:hover,#enabled-services .service:hover{background:#fff;border:1px solid #bbb;box-shadow:0 1px 3px rgba(0,0,0,.2)}li.service span:before{color:#555;display:inline-block;-webkit-font-smoothing:antialiased;font:400 16px/1 Noticons,Genericons;vertical-align:top;position:relative;top:1px;margin-right:3px;width:16px;height:16px;text-align:center}li.service.share-print span:before{content:'\f469'}li.service.share-digg span:before{content:'\f221'}li.service.share-email span:before{content:'\f410'}li.service.share-linkedin span:before{content:'\f207'}li.service.share-twitter span:before{content:'\f202'}li.service.share-reddit span:before{content:'\f222'}li.service.share-tumblr span:before{content:'\f214'}li.service.share-pocket span:before{content:'\f224'}li.service.share-skype span:before{content:'\f220'}li.service.share-pinterest span:before{content:'\f209'}li.service.share-google-plus-1 span:before{content:'\f218'}li.service.share-facebook span:before{content:'\f204'}li.service.share-press-this span:before{content:'\f205'}body.settings_page_sharing ul.preview{float:left;margin:0}body.settings_page_sharing ul.preview li.preview-item,body.settings_page_sharing ul.preview li.preview-item a{cursor:default;text-decoration:none}div.sd-social-icon .inner li.preview-item a span,div.sd-social-icon ul.preview li.preview-item a span{display:none}div.sd-social-icon ul.preview li.preview-item.preview-custom a span{display:inline-block}.services .preview li.share-custom a{text-decoration:none}.services ul li.end-fix{clear:both;float:none;visibility:hidden;padding:0;margin:0;height:20px;width:0}#enabled-services h2{font-size:20px;padding-top:0;font-weight:400!important;color:#999}body.settings_page_sharing #live-preview h2{font-size:20px;font-weight:400!important;color:#e3e3e3}body.settings_page_sharing .clearing{clear:both}body.settings_page_sharing .options .options-left{float:left}body.settings_page_sharing .input label{font-size:11px;line-height:16px}body.settings_page_sharing .advanced-form{padding:10px 14px 8px 10px;margin-left:-24px;display:none;border-top:1px #e3e3e3 solid;margin-top:4px}body.settings_page_sharing .utility{float:right;padding-top:10px;padding-right:10px;font-size:10px}body.settings_page_sharing .advanced input[type=submit]{float:left;margin-top:10px;margin-right:10px}.services li.dropzone{border:1px dashed #999;border-radius:3px;background:#e3e3e3;margin-right:10px;padding:5px;height:18px}.advanced-form .form-table th{width:auto!important}.advanced-form .button-secondary{margin-top:0!important}#hidden-drop-target{background:#e1e1e1;border:1px solid #cdcdcd;width:29%;padding:10px;vertical-align:top}#hidden-drop-target p{font-size:13px;font-style:italic;margin:0 0 10px}.preview li.preview-item{background-position:0 5px;cursor:default}.preview .option-smart-on{margin:3px 5px 0 0}.preview-digg .option-smart-on{background:url(images/smart-digg.png) top left/76px 17px no-repeat;width:76px;height:17px;margin-top:2px}.preview-reddit .option-smart-on{background:url(images/smart-reddit.png) top left/104px 21px no-repeat;width:104px;height:21px}.preview-facebook .option-smart-on{background:url(images/smart-like.png) top left/85px 20px no-repeat;width:85px;height:20px}.preview-twitter .option-smart-on{background:url(images/smart-twitter.png?1) top left/60px 20px no-repeat;width:60px;height:20px}.preview-linkedin .option-smart-on{background:url(images/linkedin-smart.png) top center/99px 18px no-repeat;width:99px;height:18px;margin-top:1px}.preview-google-plus-1 .option-smart-on{background:url(images/smart-googleplus1.png) top left/96px 20px no-repeat;width:96px;height:20px}.preview-tumblr .option-smart-on{background:url(images/smart-tumblr.png) top left/62px 20px no-repeat;width:62px;height:20px}.preview-pinterest .option-smart-on{background:url(images/smart-pinterest.png) top left/39px 20px no-repeat;width:39px;height:20px}.preview-pocket .option-smart-on{background:url(images/smart-pocket.png) top left/60px 20px no-repeat;width:60px;height:20px}.preview-skype .option-smart-on{background:url(images/smart-skype.png) top left/60px 20px no-repeat;width:60px;height:20px}.services .sharing-hidden li{background-color:transparent}.sharing-hidden li.share-end{clear:both;height:0;padding:0!important;margin:0!important;width:0;visibility:hidden;float:none}.preview .sharing-label{font-weight:700;border:0;padding:4px 6px 0 0}#services-config a.remove{background:#ddd;color:#fff;padding:0 4px 2px;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;text-decoration:none;font-weight:700;font-size:10px}#services-config a.remove:hover{background:red}.sd-social-icon .inner a.sd-button span,.sd-social-icon .inner a.share-icon span{display:inline-block;overflow:hidden;width:0;text-indent:100%} \ No newline at end of file
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-skype.png b/plugins/jetpack/modules/sharedaddy/images/smart-skype.png
new file mode 100644
index 00000000..dd496692
--- /dev/null
+++ b/plugins/jetpack/modules/sharedaddy/images/smart-skype.png
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-skype@2x.png b/plugins/jetpack/modules/sharedaddy/images/smart-skype@2x.png
new file mode 100644
index 00000000..a6d0a961
--- /dev/null
+++ b/plugins/jetpack/modules/sharedaddy/images/smart-skype@2x.png
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-twitter.png b/plugins/jetpack/modules/sharedaddy/images/smart-twitter.png
index a5537328..dcbee893 100644
--- a/plugins/jetpack/modules/sharedaddy/images/smart-twitter.png
+++ b/plugins/jetpack/modules/sharedaddy/images/smart-twitter.png
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.png b/plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.png
index 929bf63c..7015cf60 100644
--- a/plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.png
+++ b/plugins/jetpack/modules/sharedaddy/images/smart-twitter@2x.png
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/stumbleupon.png b/plugins/jetpack/modules/sharedaddy/images/stumbleupon.png
deleted file mode 100644
index 5b4858f7..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/stumbleupon.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/images/stumbleupon@2x.png b/plugins/jetpack/modules/sharedaddy/images/stumbleupon@2x.png
deleted file mode 100644
index 49e479fc..00000000
--- a/plugins/jetpack/modules/sharedaddy/images/stumbleupon@2x.png
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/readme.txt b/plugins/jetpack/modules/sharedaddy/readme.txt
deleted file mode 100644
index b2fd2bd3..00000000
--- a/plugins/jetpack/modules/sharedaddy/readme.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-=== Sharedaddy ===
-Contributors: eoigal, johnny5, donncha, polldaddy, automattic
-Tags: share, sharing, email, twitter, facebook, print, reddit, stumbleupon, digg
-Requires at least: 3.0
-Tested up to: 3.1
-Stable tag: trunk
-
-Share your posts with Twitter, Facebook, and a host of other services
-
-== Description ==
-
-Share your posts with Twitter, Facebook, and a host of other services. You can configure services to appear as icons, text, or both. Some services have additional options to display smart buttons, such as Twitter, which will update the number of times the post has been shared.
-
-The following services are included:
-
-* Twitter
-* Facebook
-* Reddit
-* StumbleUpon
-* PressThis
-* Digg
-* Print
-* Email
-
-Additionally you can define your own custom services.
-
-[wpvideo WV0JOwY2]
-
-The plugin is available in the following languages:
-
-* English
-* Japanese, thanks to Naoko McCracken
-* Portuguese, thanks to WordPress Portugal
-* Spanish, thanks to elarequi
-* German, thanks to Jott und die Welt
-* French, thanks to Dario Spagnolo / Aurélie Rochelle
-* Brazilian Portuguese, thanks to Gabriel Reguly
-* Dutch, thanks to Chantal Coolsma
-* Serbian, thanks to Milan Dinić
-
-If you have a translation please send it us and we would be glad to include it for everyone to use!
-
-The following plugins extend Sharedaddy:
-
-* [Mixi Check](http://wordpress.org/extend/plugins/mixi-check/) - support for Mixi
-
-For more detailed information about using this plugin you can refer to these pages:
-
-* http://support.wordpress.com/sharing/
-* http://ryanmarkel.com/2010/08/26/adding-a-custom-sharing-service-to-wordpress-com/
-* http://ryanmarkel.com/2010/08/31/adding-specific-sharing-services-to-sharedaddy/
-* http://wpgarage.com/tips/how-to-add-a-linkedin-share-button-to-sharedaddy/
-
-Note: You will need PHP5 to use this plugin
-
-== Installation ==
-
-Upload the plugin to your blog and activate it. Configure your sharing services from the Settings > Sharing dashboard page
-
-== Screenshots ==
-
-1. Manage sharing services
-2. Share posts
-
-== Changelog ==
-= 0.1 =
-* Initial release
-
-= 0.2 =
-* Fix incorrect link in plugin page
-* Remove debug from JS code
-
-= 0.2.1 =
-* Add Japanese translation, thanks Naoko!
-
-= 0.2.2 =
-* Add Portuguese translation, thanks WordPress Portugal!
-
-= 0.2.3 =
-* Add Spanish, thanks to elarequi!
-
-= 0.2.4 =
-* Fix incorrect icon reference
-
-= 0.2.5 =
-* Add German, thanks to Jott und die Welt!
-* Optimize loading of Digg JS
-
-= 0.2.6 =
-* Add French, thanks to Dario Spagnolo / Aurélie Rochelle!
-
-= 0.2.7 =
-* Add Brazilian Portuguese, thanks to Gabriel
-* Add Dutch, thanks to Chantal
-
-= 0.2.8 =
-* Update Spanish translation (thanks to elarequi)
-* Change CSS link to use wp_enqueue (props to Barry)
-* Add %post_full_url% to custom service tags
-* Fixed removal of sharing option in quickedit (props to dimadin)
-* Add service ID to sharing_permalink filter (props to dimadin)
-* Email service loading.gif is included in the plugin
-* Better RTL support, cleanup style issues in some themes (props to Lance)
-
-= 0.2.9 =
-* Add Serbian translation (thanks to Milan Dinić)
-* Fix double = in Facebook share and rawurlencode like button for better theme compat (props to Lance)
-* Add %post_tags% to custom service tags
-* Allow Facebook like button width to change
-* Language domain fixes (props to dimadin)
-* Add language context to service names
-* Add 'sharing_show' filter to allow custom determination of whether to show sharing links
-* Add option to disable CSS and JS (so it can be moved in theme, if required)
-* Better support for non-multibyte blogs
-
-= 0.2.10 =
-* Restore fixes to Twitter link
-
-= 0.2.11 =
-* Updated German language (thanks to infected)
-* Further improvements to localisation (thanks to Milan Dinić)
-
-= 0.2.12 =
-* Theme placement improvements
-* Add Danish width to Facebook
-* Fix invalid HTML in Twitter iframe
-
-= 0.2.13 =
-* Add Google+1 button
diff --git a/plugins/jetpack/modules/sharedaddy/recaptcha.php b/plugins/jetpack/modules/sharedaddy/recaptcha.php
new file mode 100644
index 00000000..3e4fc915
--- /dev/null
+++ b/plugins/jetpack/modules/sharedaddy/recaptcha.php
@@ -0,0 +1,179 @@
+<?php
+
+/**
+ * Class that handles reCAPTCHA.
+ */
+class Jetpack_ReCaptcha {
+
+ /**
+ * URL to which requests are POSTed.
+ *
+ * @const string
+ */
+ const VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
+
+ /**
+ * Site key to use in HTML code.
+ *
+ * @var string
+ */
+ private $site_key;
+
+ /**
+ * Shared secret for the site.
+ *
+ * @var string
+ */
+ private $secret_key;
+
+ /**
+ * Config for reCAPTCHA instance.
+ *
+ * @var array
+ */
+ private $config;
+
+ /**
+ * Error codes returned from reCAPTCHA API.
+ *
+ * @see https://developers.google.com/recaptcha/docs/verify
+ *
+ * @var array
+ */
+ private $error_codes;
+
+ /**
+ * Create a configured instance to use the reCAPTCHA service.
+ *
+ * @param string $site_key Site key to use in HTML code.
+ * @param string $secret_key Shared secret between site and reCAPTCHA server.
+ * @param array $config Config array to optionally configure reCAPTCHA instance.
+ */
+ public function __construct( $site_key, $secret_key, $config = array() ) {
+ $this->site_key = $site_key;
+ $this->secret_key = $secret_key;
+ $this->config = wp_parse_args( $config, $this->get_default_config() );
+
+ $this->error_codes = array(
+ 'missing-input-secret' => __( 'The secret parameter is missing', 'jetpack' ),
+ 'invalid-input-secret' => __( 'The secret parameter is invalid or malformed', 'jetpack' ),
+ 'missing-input-response' => __( 'The response parameter is missing', 'jetpack' ),
+ 'invalid-input-response' => __( 'The response parameter is invalid or malformed', 'jetpack' ),
+ 'invalid-json' => __( 'Invalid JSON', 'jetpack' ),
+ 'unexpected-response' => __( 'Unexpected response', 'jetpack' ),
+ );
+ }
+
+ /**
+ * Get default config for this reCAPTCHA instance.
+ *
+ * @return array Default config
+ */
+ public function get_default_config() {
+ return array(
+ 'language' => get_locale(),
+ 'script_async' => true,
+ 'tag_class' => 'g-recaptcha',
+ 'tag_attributes' => array(
+ 'theme' => 'light',
+ 'type' => 'image',
+ 'tabindex' => 0,
+ ),
+ );
+ }
+
+ /**
+ * Calls the reCAPTCHA siteverify API to verify whether the user passes
+ * CAPTCHA test.
+ *
+ * @param string $response The value of 'g-recaptcha-response' in the submitted
+ * form.
+ * @param string $remote_ip The end user's IP address.
+ *
+ * @return bool|WP_Error Returns true if verified. Otherwise WP_Error is returned.
+ */
+ public function verify( $response, $remote_ip ) {
+ // No need make a request if response is empty.
+ if ( empty( $response ) ) {
+ return new WP_Error( 'missing-input-response', $this->error_codes['missing-input-response'], 400 );
+ }
+
+ $resp = wp_remote_post( self::VERIFY_URL, $this->get_verify_request_params( $response, $remote_ip ) );
+ if ( is_wp_error( $resp ) ) {
+ return $resp;
+ }
+
+ $resp_decoded = json_decode( wp_remote_retrieve_body( $resp ), true );
+ if ( ! $resp_decoded ) {
+ return new WP_Error( 'invalid-json', $this->error_codes['invalid-json'], 400 );
+ }
+
+ // Default error code and message.
+ $error_code = 'unexpected-response';
+ $error_message = $this->error_codes['unexpected-response'];
+
+ // Use the first error code if exists.
+ if ( isset( $resp_decoded['error-codes'] ) && is_array( $resp_decoded['error-codes'] ) ) {
+ if ( isset( $resp_decoded['error-codes'][0] ) && isset( $this->error_codes[ $resp_decoded['error-codes'][0] ] ) ) {
+ $error_message = $this->error_codes[ $resp_decoded['error-codes'][0] ];
+ $error_code = $resp_decoded['error-codes'][0];
+ }
+ }
+
+ if ( ! isset( $resp_decoded['success'] ) ) {
+ return new WP_Error( $error_code, $error_message );
+ }
+
+ if ( true !== $resp_decoded['success'] ) {
+ return new WP_Error( $error_code, $error_message );
+ }
+
+ return true;
+ }
+
+ /**
+ * Get siteverify request parameters.
+ *
+ * @param string $response The value of 'g-recaptcha-response' in the submitted
+ * form.
+ * @param string $remote_ip The end user's IP address.
+ *
+ * @return array
+ */
+ public function get_verify_request_params( $response, $remote_ip ) {
+ return array(
+ 'body' => array(
+ 'secret' => $this->secret_key,
+ 'response' => $response,
+ 'remoteip' => $remote_ip,
+ ),
+ 'sslverify' => true,
+ );
+ }
+
+ /**
+ * Get reCAPTCHA HTML to render.
+ *
+ * @return string
+ */
+ public function get_recaptcha_html() {
+ return sprintf(
+ '
+ <div
+ class="%s"
+ data-sitekey="%s"
+ data-theme="%s"
+ data-type="%s"
+ data-tabindex="%s"></div>
+ <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=%s"%s></script>
+ ',
+ esc_attr( $this->config['tag_class'] ),
+ esc_attr( $this->site_key ),
+ esc_attr( $this->config['tag_attributes']['theme'] ),
+ esc_attr( $this->config['tag_attributes']['type'] ),
+ esc_attr( $this->config['tag_attributes']['tabindex'] ),
+ rawurlencode( $this->config['language'] ),
+ $this->config['script_async'] ? ' async' : ''
+ );
+ }
+}
diff --git a/plugins/jetpack/modules/sharedaddy/recaptchalib.php b/plugins/jetpack/modules/sharedaddy/recaptchalib.php
deleted file mode 100644
index 205a4a2d..00000000
--- a/plugins/jetpack/modules/sharedaddy/recaptchalib.php
+++ /dev/null
@@ -1,277 +0,0 @@
-<?php
-/*
- * This is a PHP library that handles calling reCAPTCHA.
- * - Documentation and latest version
- * http://recaptcha.net/plugins/php/
- * - Get a reCAPTCHA API Key
- * https://www.google.com/recaptcha/admin/create
- * - Discussion group
- * http://groups.google.com/group/recaptcha
- *
- * Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net
- * AUTHORS:
- * Mike Crawford
- * Ben Maurer
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-/**
- * The reCAPTCHA server URL's
- */
-define("RECAPTCHA_API_SERVER", "http://www.google.com/recaptcha/api");
-define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");
-define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
-
-/**
- * Encodes the given data into a query string format
- * @param $data - array of string elements to be encoded
- * @return string - encoded request
- */
-function _recaptcha_qsencode ($data) {
- $req = "";
- foreach ( $data as $key => $value )
- $req .= $key . '=' . urlencode( stripslashes($value) ) . '&';
-
- // Cut the last '&'
- $req=substr($req,0,strlen($req)-1);
- return $req;
-}
-
-
-
-/**
- * Submits an HTTP POST to a reCAPTCHA server
- * @param string $host
- * @param string $path
- * @param array $data
- * @param int port
- * @return array response
- */
-function _recaptcha_http_post($host, $path, $data, $port = 80) {
-
- $req = _recaptcha_qsencode ($data);
-
- $http_request = "POST $path HTTP/1.0\r\n";
- $http_request .= "Host: $host\r\n";
- $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
- $http_request .= "Content-Length: " . strlen($req) . "\r\n";
- $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
- $http_request .= "\r\n";
- $http_request .= $req;
-
- $response = '';
- if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
- die ('Could not open socket');
- }
-
- fwrite($fs, $http_request);
-
- while ( !feof($fs) )
- $response .= fgets($fs, 1160); // One TCP-IP packet
- fclose($fs);
- $response = explode("\r\n\r\n", $response, 2);
-
- return $response;
-}
-
-
-
-/**
- * Gets the challenge HTML (javascript and non-javascript version).
- * This is called from the browser, and the resulting reCAPTCHA HTML widget
- * is embedded within the HTML form it was called from.
- * @param string $pubkey A public key for reCAPTCHA
- * @param string $error The error given by reCAPTCHA (optional, default is null)
- * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
-
- * @return string - The HTML to be embedded in the user's form.
- */
-function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
-{
- if ($pubkey == null || $pubkey == '') {
- die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
- }
-
- if ($use_ssl) {
- $server = RECAPTCHA_API_SECURE_SERVER;
- } else {
- $server = RECAPTCHA_API_SERVER;
- }
-
- $errorpart = "";
- if ($error) {
- $errorpart = "&amp;error=" . $error;
- }
- return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
-
- <noscript>
- <iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
- <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
- <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
- </noscript>';
-}
-
-
-
-
-/**
- * A ReCaptchaResponse is returned from recaptcha_check_answer()
- */
-class ReCaptchaResponse {
- var $is_valid;
- var $error;
-}
-
-
-/**
- * Calls an HTTP POST function to verify if the user's guess was correct
- * @param string $privkey
- * @param string $remoteip
- * @param string $challenge
- * @param string $response
- * @param array $extra_params an array of extra variables to post to the server
- * @return ReCaptchaResponse
- */
-function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
-{
- if ($privkey == null || $privkey == '') {
- die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
- }
-
- if ($remoteip == null || $remoteip == '') {
- die ("For security reasons, you must pass the remote ip to reCAPTCHA");
- }
-
-
-
- //discard spam submissions
- if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
- $recaptcha_response = new ReCaptchaResponse();
- $recaptcha_response->is_valid = false;
- $recaptcha_response->error = 'incorrect-captcha-sol';
- return $recaptcha_response;
- }
-
- $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",
- array (
- 'privatekey' => $privkey,
- 'remoteip' => $remoteip,
- 'challenge' => $challenge,
- 'response' => $response
- ) + $extra_params
- );
-
- $answers = explode ("\n", $response [1]);
- $recaptcha_response = new ReCaptchaResponse();
-
- if (trim ($answers [0]) == 'true') {
- $recaptcha_response->is_valid = true;
- }
- else {
- $recaptcha_response->is_valid = false;
- $recaptcha_response->error = $answers [1];
- }
- return $recaptcha_response;
-
-}
-
-/**
- * gets a URL where the user can sign up for reCAPTCHA. If your application
- * has a configuration page where you enter a key, you should provide a link
- * using this function.
- * @param string $domain The domain where the page is hosted
- * @param string $appname The name of your application
- */
-function recaptcha_get_signup_url ($domain = null, $appname = null) {
- return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
-}
-
-function _recaptcha_aes_pad($val) {
- $block_size = 16;
- $numpad = $block_size - (strlen ($val) % $block_size);
- return str_pad($val, strlen ($val) + $numpad, chr($numpad));
-}
-
-/* Mailhide related code */
-
-function _recaptcha_aes_encrypt($val,$ky) {
- if (! function_exists ("mcrypt_encrypt")) {
- die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
- }
- $mode=MCRYPT_MODE_CBC;
- $enc=MCRYPT_RIJNDAEL_128;
- $val=_recaptcha_aes_pad($val);
- return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
-}
-
-
-function _recaptcha_mailhide_urlbase64 ($x) {
- return strtr(base64_encode ($x), '+/', '-_');
-}
-
-/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
-function recaptcha_mailhide_url($pubkey, $privkey, $email) {
- if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
- die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
- "you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
- }
-
-
- $ky = pack('H*', $privkey);
- $cryptmail = _recaptcha_aes_encrypt ($email, $ky);
-
- return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
-}
-
-/**
- * gets the parts of the email to expose to the user.
- * eg, given johndoe@example,com return ["john", "example.com"].
- * the email is then displayed as john...@example.com
- */
-function _recaptcha_mailhide_email_parts ($email) {
- $arr = preg_split("/@/", $email );
-
- if (strlen ($arr[0]) <= 4) {
- $arr[0] = substr ($arr[0], 0, 1);
- } else if (strlen ($arr[0]) <= 6) {
- $arr[0] = substr ($arr[0], 0, 3);
- } else {
- $arr[0] = substr ($arr[0], 0, 4);
- }
- return $arr;
-}
-
-/**
- * Gets html to display an email address given a public an private key.
- * to get a key, go to:
- *
- * http://www.google.com/recaptcha/mailhide/apikey
- */
-function recaptcha_mailhide_html($pubkey, $privkey, $email) {
- $emailparts = _recaptcha_mailhide_email_parts ($email);
- $url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
-
- return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
- "' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
-
-}
-
-
-?> \ No newline at end of file
diff --git a/plugins/jetpack/modules/sharedaddy/screenshot-1.jpg b/plugins/jetpack/modules/sharedaddy/screenshot-1.jpg
deleted file mode 100644
index dd4becc7..00000000
--- a/plugins/jetpack/modules/sharedaddy/screenshot-1.jpg
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/screenshot-2.jpg b/plugins/jetpack/modules/sharedaddy/screenshot-2.jpg
deleted file mode 100644
index dabb35e3..00000000
--- a/plugins/jetpack/modules/sharedaddy/screenshot-2.jpg
+++ /dev/null
Binary files differ
diff --git a/plugins/jetpack/modules/sharedaddy/sharedaddy.php b/plugins/jetpack/modules/sharedaddy/sharedaddy.php
index 56b1cd41..c6b71a5e 100644
--- a/plugins/jetpack/modules/sharedaddy/sharedaddy.php
+++ b/plugins/jetpack/modules/sharedaddy/sharedaddy.php
@@ -54,6 +54,7 @@ function sharing_email_check_for_spam_via_akismet( $data ) {
}
function sharing_email_send_post_content( $data ) {
+ /* translators: included in e-mail when post is shared via e-mail. First item is sender's name. Second is sender's e-mail address. */
$content = sprintf( __( '%1$s (%2$s) thinks you may be interested in the following post:', 'jetpack' ), $data['name'], $data['source'] );
$content .= "\n\n";
$content .= $data['post']->post_title."\n";
@@ -62,24 +63,50 @@ function sharing_email_send_post_content( $data ) {
}
function sharing_add_meta_box() {
+ global $post;
+ if ( empty( $post ) ) { // If a current post is not defined, such as when editing a comment.
+ return;
+ }
+
+ /**
+ * Filter whether to display the Sharing Meta Box or not.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.8.0
+ *
+ * @param bool true Display Sharing Meta Box.
+ * @param $post Post.
+ */
+ if ( ! apply_filters( 'sharing_meta_box_show', true, $post ) ) {
+ return;
+ }
+
$post_types = get_post_types( array( 'public' => true ) );
/**
* Filter the Sharing Meta Box title.
*
+ * @module sharedaddy
+ *
* @since 2.2.0
*
* @param string $var Sharing Meta Box title. Default is "Sharing".
*/
$title = apply_filters( 'sharing_meta_box_title', __( 'Sharing', 'jetpack' ) );
- foreach( $post_types as $post_type ) {
- add_meta_box( 'sharing_meta', $title, 'sharing_meta_box_content', $post_type, 'advanced', 'high' );
+ if ( $post->ID !== get_option( 'page_for_posts' ) ) {
+ foreach( $post_types as $post_type ) {
+ add_meta_box( 'sharing_meta', $title, 'sharing_meta_box_content', $post_type, 'advanced', 'high' );
+ }
}
}
+
function sharing_meta_box_content( $post ) {
/**
* Fires before the sharing meta box content.
*
+ * @module sharedaddy
+ *
* @since 2.2.0
*
* @param WP_Post $post The post to share.
@@ -100,6 +127,8 @@ function sharing_meta_box_content( $post ) {
/**
* Fires after the sharing meta box content.
*
+ * @module sharedaddy
+ *
* @since 2.2.0
*
* @param WP_Post $post The post to share.
@@ -188,19 +217,24 @@ function sharing_global_resources_save() {
}
function sharing_email_dialog() {
- echo '<div class="recaptcha" id="sharing_recaptcha"></div><input type="hidden" name="recaptcha_public_key" id="recaptcha_public_key" value="'.(defined( 'RECAPTCHA_PUBLIC_KEY' ) ? esc_attr( RECAPTCHA_PUBLIC_KEY ) : '').'" />';
+ require_once plugin_dir_path( __FILE__ ) . 'recaptcha.php';
+
+ $recaptcha = new Jetpack_ReCaptcha( RECAPTCHA_PUBLIC_KEY, RECAPTCHA_PRIVATE_KEY );
+ echo $recaptcha->get_recaptcha_html(); // xss ok
}
function sharing_email_check( $true, $post, $data ) {
- require_once plugin_dir_path( __FILE__ ).'recaptchalib.php';
+ require_once plugin_dir_path( __FILE__ ) . 'recaptcha.php';
- $recaptcha_result = recaptcha_check_answer( RECAPTCHA_PRIVATE_KEY, $_SERVER["REMOTE_ADDR"], $data["recaptcha_challenge_field"], $data["recaptcha_response_field"] );
+ $recaptcha = new Jetpack_ReCaptcha( RECAPTCHA_PUBLIC_KEY, RECAPTCHA_PRIVATE_KEY );
+ $response = ! empty( $_POST['g-recaptcha-response'] ) ? $_POST['g-recaptcha-response'] : '';
+ $result = $recaptcha->verify( $response, $_SERVER['REMOTE_ADDR'] );
- return $recaptcha_result->is_valid;
+ return ( true === $result );
}
add_action( 'init', 'sharing_init' );
-add_action( 'admin_init', 'sharing_add_meta_box' );
+add_action( 'add_meta_boxes', 'sharing_add_meta_box' );
add_action( 'save_post', 'sharing_meta_box_save' );
add_action( 'sharing_email_send_post', 'sharing_email_send_post' );
add_filter( 'sharing_email_can_send', 'sharing_email_check_for_spam_via_akismet' );
@@ -210,7 +244,7 @@ add_filter( 'sharing_services', 'sharing_restrict_to_single' );
add_action( 'plugin_action_links_'.basename( dirname( __FILE__ ) ).'/'.basename( __FILE__ ), 'sharing_plugin_settings', 10, 4 );
add_filter( 'plugin_row_meta', 'sharing_add_plugin_settings', 10, 2 );
-if ( defined( 'RECAPTCHA_PRIVATE_KEY' ) ) {
+if ( defined( 'RECAPTCHA_PUBLIC_KEY' ) && defined( 'RECAPTCHA_PRIVATE_KEY' ) ) {
add_action( 'sharing_email_dialog', 'sharing_email_dialog' );
add_filter( 'sharing_email_check', 'sharing_email_check', 10, 3 );
}
diff --git a/plugins/jetpack/modules/sharedaddy/sharedaddy.pot b/plugins/jetpack/modules/sharedaddy/sharedaddy.pot
deleted file mode 100644
index 7af247cb..00000000
--- a/plugins/jetpack/modules/sharedaddy/sharedaddy.pot
+++ /dev/null
@@ -1,404 +0,0 @@
-# Translation of the WordPress plugin Sharedaddy 0.2.9 by Automattic, Inc..
-# Copyright (C) 2010 Automattic, Inc.
-# This file is distributed under the same license as the Sharedaddy package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: Sharedaddy 0.2.9\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/sharedaddy\n"
-"POT-Creation-Date: 2010-12-16 16:35+0000\n"
-"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: sharedaddy.php:14
-#, php-format
-msgid ""
-"%1$s (%2$s) thinks you may be interested in the following post:\n"
-"\n"
-msgstr ""
-
-#: sharedaddy.php:18
-msgid "Shared Post"
-msgstr ""
-
-#: sharedaddy.php:22 sharedaddy.php:23 sharing.php:49
-msgid "Sharing"
-msgstr ""
-
-#: sharedaddy.php:34
-msgid "Show sharing buttons on this post."
-msgstr ""
-
-#: sharedaddy.php:57 sharedaddy.php:64
-msgid "Settings"
-msgstr ""
-
-#: sharedaddy.php:65
-msgid "Support"
-msgstr ""
-
-#: sharedaddy.php:97
-msgid "Disable CSS and JS"
-msgstr ""
-
-#: sharedaddy.php:99
-msgid "Advanced - you must include these in your theme for Sharedaddy to work"
-msgstr ""
-
-#: sharing-service.php:194
-msgid "Share this:"
-msgstr ""
-
-#: sharing-service.php:434 sharing-sources.php:620 sharing.php:230
-#: sharing.php:271
-msgid "Share"
-msgstr ""
-
-#: sharing-sources.php:127
-msgid "Email"
-msgstr ""
-
-#: sharing-sources.php:169
-msgid "This post has been shared!"
-msgstr ""
-
-#: sharing-sources.php:170
-#, php-format
-msgid "You have shared this post with %s"
-msgstr ""
-
-#: sharing-sources.php:171
-msgid "Close"
-msgstr ""
-
-#: sharing-sources.php:193
-msgctxt "share to"
-msgid "Email"
-msgstr ""
-
-#: sharing-sources.php:193
-msgid "Click to email this to a friend"
-msgstr ""
-
-#: sharing-sources.php:207
-msgid "Send to Email Address"
-msgstr ""
-
-#: sharing-sources.php:215
-msgid "Your Name"
-msgstr ""
-
-#: sharing-sources.php:218
-msgid "Your Email Address"
-msgstr ""
-
-#: sharing-sources.php:226
-msgid "Send Email"
-msgstr ""
-
-#: sharing-sources.php:227
-msgid "Cancel"
-msgstr ""
-
-#: sharing-sources.php:230
-msgid "Post was not sent - check your email addresses!"
-msgstr ""
-
-#: sharing-sources.php:234
-msgid "Email check failed, please try again"
-msgstr ""
-
-#: sharing-sources.php:238
-msgid "Sorry, your blog cannot share posts by email."
-msgstr ""
-
-#: sharing-sources.php:257
-msgid "Twitter"
-msgstr ""
-
-#: sharing-sources.php:264
-msgctxt "share to"
-msgid "Twitter"
-msgstr ""
-
-#: sharing-sources.php:264
-msgid "Click to share on Twitter"
-msgstr ""
-
-#: sharing-sources.php:334 sharing-sources.php:411 sharing-sources.php:462
-#: sharing-sources.php:568
-msgid "Use smart button"
-msgstr ""
-
-#: sharing-sources.php:352
-msgid "StumbleUpon"
-msgstr ""
-
-#: sharing-sources.php:363
-msgctxt "share to"
-msgid "StumbleUpon"
-msgstr ""
-
-#: sharing-sources.php:363
-msgid "Click to share on StumbleUpon"
-msgstr ""
-
-#: sharing-sources.php:429 sharing-sources.php:436
-msgid "Reddit"
-msgstr ""
-
-#: sharing-sources.php:436
-msgid "Click to share on Reddit"
-msgstr ""
-
-#: sharing-sources.php:506
-msgid "Digg"
-msgstr ""
-
-#: sharing-sources.php:515 sharing-sources.php:519
-msgid "Click to Digg this post"
-msgstr ""
-
-#: sharing-sources.php:519
-msgctxt "share to"
-msgid "Digg"
-msgstr ""
-
-#: sharing-sources.php:601
-msgid "Facebook"
-msgstr ""
-
-#: sharing-sources.php:651
-msgctxt "share to"
-msgid "Facebook"
-msgstr ""
-
-#: sharing-sources.php:651
-msgid "Share on Facebook"
-msgstr ""
-
-#: sharing-sources.php:673
-msgid "Default button"
-msgstr ""
-
-#: sharing-sources.php:674
-msgid "Share button"
-msgstr ""
-
-#: sharing-sources.php:675
-msgid "Like button"
-msgstr ""
-
-#: sharing-sources.php:720
-msgid "Print"
-msgstr ""
-
-#: sharing-sources.php:724
-msgctxt "share to"
-msgid "Print"
-msgstr ""
-
-#: sharing-sources.php:724
-msgid "Click to print"
-msgstr ""
-
-#: sharing-sources.php:730
-msgid "Press This"
-msgstr ""
-
-#: sharing-sources.php:758
-msgctxt "share to"
-msgid "Press This"
-msgstr ""
-
-#: sharing-sources.php:758
-msgid "Click to Press This!"
-msgstr ""
-
-#: sharing-sources.php:789
-msgid "Click to share"
-msgstr ""
-
-#: sharing-sources.php:839
-msgid "Label"
-msgstr ""
-
-#: sharing-sources.php:844
-msgid "URL"
-msgstr ""
-
-#: sharing-sources.php:849
-msgid "Icon"
-msgstr ""
-
-#: sharing-sources.php:856
-msgid "Save"
-msgstr ""
-
-#: sharing-sources.php:857
-msgid "Remove Service"
-msgstr ""
-
-#: sharing.php:49 sharing.php:154
-msgid "Sharing Settings"
-msgstr ""
-
-#: sharing.php:144
-msgid "Warning! Multibyte support missing!"
-msgstr ""
-
-#: sharing.php:145
-#, php-format
-msgid ""
-"This plugin will work without it, but multibyte support is used <a href=\"%s"
-"\">if available</a>. You may see minor problems with Tweets and other "
-"sharing services."
-msgstr ""
-
-#: sharing.php:149
-msgid "Settings have been saved"
-msgstr ""
-
-#: sharing.php:160
-msgid "Available Services"
-msgstr ""
-
-#: sharing.php:161
-msgid "Drag and drop the services you'd like to enable into the box below."
-msgstr ""
-
-#: sharing.php:162
-msgid "Add a new service"
-msgstr ""
-
-#: sharing.php:182
-msgid "Enabled Services"
-msgstr ""
-
-#: sharing.php:185
-msgid "Services dragged here will appear individually."
-msgstr ""
-
-#: sharing.php:188
-msgid "Drag and drop available services here"
-msgstr ""
-
-#: sharing.php:199
-msgid "Services dragged here will be hidden behind a share button."
-msgstr ""
-
-#: sharing.php:214
-msgid "Live Preview"
-msgstr ""
-
-#: sharing.php:217
-msgid "Sharing is off. Please add services above to enable"
-msgstr ""
-
-#: sharing.php:299
-msgid "Default button style"
-msgstr ""
-
-#: sharing.php:302
-msgid "Icon + text"
-msgstr ""
-
-#: sharing.php:303
-msgid "Icon only"
-msgstr ""
-
-#: sharing.php:304
-msgid "Text only"
-msgstr ""
-
-#: sharing.php:309
-msgid "Sharing label"
-msgstr ""
-
-#: sharing.php:315
-msgid "Open links in"
-msgstr ""
-
-#: sharing.php:318
-msgid "New window"
-msgstr ""
-
-#: sharing.php:319
-msgid "Same window"
-msgstr ""
-
-#: sharing.php:324
-msgid "Show sharing buttons on"
-msgstr ""
-
-#: sharing.php:327
-msgid "Posts, pages, and index pages"
-msgstr ""
-
-#: sharing.php:328
-msgid "Posts and pages only"
-msgstr ""
-
-#: sharing.php:329
-msgid "Index pages only"
-msgstr ""
-
-#: sharing.php:339
-msgid "Save Changes"
-msgstr ""
-
-#: sharing.php:350
-msgid "Service name"
-msgstr ""
-
-#: sharing.php:356
-msgid "Sharing URL"
-msgstr ""
-
-#: sharing.php:360
-msgid "You can add the following variables to your service sharing URL:"
-msgstr ""
-
-#: sharing.php:365
-msgid "Icon URL"
-msgstr ""
-
-#: sharing.php:368
-msgid "Enter the URL of a 16x16px icon you want to use for this service."
-msgstr ""
-
-#: sharing.php:374
-msgid "Create Share"
-msgstr ""
-
-#: sharing.php:384
-msgid ""
-"An error occurred creating your new sharing service - please check you gave "
-"valid details."
-msgstr ""
-
-#. Plugin Name of the plugin/theme
-msgid "Sharedaddy"
-msgstr ""
-
-#. Plugin URI of the plugin/theme
-msgid "http://en.blog.wordpress.com/2010/08/24/more-ways-to-share/"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid "The most super duper sharing tool on the interwebs."
-msgstr ""
-
-#. Author of the plugin/theme
-msgid "Automattic, Inc."
-msgstr ""
-
-#. Author URI of the plugin/theme
-msgid "http://automattic.com/"
-msgstr ""
diff --git a/plugins/jetpack/modules/sharedaddy/sharing-service.php b/plugins/jetpack/modules/sharedaddy/sharing-service.php
index 6fcd9939..8966600a 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing-service.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing-service.php
@@ -6,7 +6,7 @@ define( 'WP_SHARING_PLUGIN_VERSION', JETPACK__VERSION );
class Sharing_Service {
private $global = false;
- var $default_sharing_label = '';
+ public $default_sharing_label = '';
public function __construct() {
$this->default_sharing_label = __( 'Share this:', 'jetpack' );
@@ -49,13 +49,13 @@ class Sharing_Service {
'facebook' => 'Share_Facebook',
'linkedin' => 'Share_LinkedIn',
'reddit' => 'Share_Reddit',
- 'stumbleupon' => 'Share_Stumbleupon',
'twitter' => 'Share_Twitter',
'press-this' => 'Share_PressThis',
'google-plus-1' => 'Share_GooglePlus1',
'tumblr' => 'Share_Tumblr',
'pinterest' => 'Share_Pinterest',
'pocket' => 'Share_Pocket',
+ 'skype' => 'Share_Skype',
);
if ( $include_custom ) {
@@ -69,6 +69,8 @@ class Sharing_Service {
/**
* Filters the list of available Sharing Services.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $services Array of all available Sharing Services.
@@ -136,6 +138,8 @@ class Sharing_Service {
/**
* Control the state of the list of sharing services.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $args {
@@ -179,6 +183,8 @@ class Sharing_Service {
/**
* Filters the list of default Sharing Services.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $enabled Array of default Sharing Services.
@@ -204,6 +210,8 @@ class Sharing_Service {
/**
* Filters the list of enabled Sharing Services.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $blog Array of enabled Sharing Services.
@@ -240,7 +248,7 @@ class Sharing_Service {
// Defaults
$options['global'] = array(
- 'button_style' => 'icon',
+ 'button_style' => 'icon-text',
'sharing_label' => $this->default_sharing_label,
'open_links' => 'same',
'show' => array(),
@@ -250,6 +258,8 @@ class Sharing_Service {
/**
* Filters global sharing settings.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $options['global'] Array of global sharing settings.
@@ -342,6 +352,8 @@ class Sharing_Service {
/**
* Get the state of a sharing button.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
* @param array $args {
@@ -411,12 +423,12 @@ class Sharing_Service {
}
class Sharing_Service_Total {
- var $id = '';
- var $name = '';
- var $service = '';
- var $total = 0;
+ public $id = '';
+ public $name = '';
+ public $service = '';
+ public $total = 0;
- public function Sharing_Service_Total( $id, $total ) {
+ public function __construct( $id, $total ) {
$services = new Sharing_Service();
$this->id = esc_html( $id );
$this->service = $services->get_service( $id );
@@ -433,12 +445,12 @@ class Sharing_Service_Total {
}
class Sharing_Post_Total {
- var $id = 0;
- var $total = 0;
- var $title = '';
- var $url = '';
+ public $id = 0;
+ public $total = 0;
+ public $title = '';
+ public $url = '';
- public function Sharing_Post_Total( $id, $total ) {
+ public function __construct( $id, $total ) {
$this->id = (int) $id;
$this->total = (int) $total;
$this->title = get_the_title( $this->id );
@@ -475,6 +487,8 @@ function sharing_maybe_enqueue_scripts() {
/**
* Filter to decide when sharing scripts should be enqueued.
*
+ * @module sharedaddy
+ *
* @since 3.2.0
*
* @param bool $enqueue Decide if the sharing scripts should be enqueued.
@@ -486,17 +500,21 @@ function sharing_add_footer() {
global $jetpack_sharing_counts;
/**
- * Filter all Javascript output by the sharing module.
+ * Filter all JavaScript output by the sharing module.
+ *
+ * @module sharedaddy
*
* @since 1.1.0
*
- * @param bool true Control whether the sharing module should add any Javascript to the site. Default to true.
+ * @param bool true Control whether the sharing module should add any JavaScript to the site. Default to true.
*/
if ( apply_filters( 'sharing_js', true ) && sharing_maybe_enqueue_scripts() ) {
/**
* Filter the display of sharing counts next to the sharing buttons.
*
+ * @module sharedaddy
+ *
* @since 3.2.0
*
* @param bool true Control the display of counters next to the sharing buttons. Default to true.
@@ -504,16 +522,10 @@ function sharing_add_footer() {
if ( apply_filters( 'jetpack_sharing_counts', true ) && is_array( $jetpack_sharing_counts ) && count( $jetpack_sharing_counts ) ) :
$sharing_post_urls = array_filter( $jetpack_sharing_counts );
if ( $sharing_post_urls ) :
- $is_jetpack = true === apply_filters( 'is_jetpack_site', false, get_current_blog_id() );
- $site_id = $is_jetpack ? Jetpack_Options::get_option( 'id' ) : get_current_blog_id();
?>
<script type="text/javascript">
window.WPCOM_sharing_counts = <?php echo json_encode( array_flip( $sharing_post_urls ) ); ?>;
- window.WPCOM_jetpack = <?php echo var_export( $is_jetpack, true ); ?>;
- <?php if ( is_int( $site_id ) ): ?>
- window.WPCOM_site_ID = <?php echo $site_id ?>;
- <?php endif; ?>
</script>
<?php
endif;
@@ -544,13 +556,8 @@ function sharing_add_header() {
}
if ( count( $enabled['all'] ) > 0 && sharing_maybe_enqueue_scripts() ) {
- // @todo: Remove this opt-out filter in the future
- if ( ( ! defined( 'IS_WPCOM' ) ) || ( ! IS_WPCOM ) || apply_filters( 'wpl_sharing_2014_1', true ) ) {
- wp_enqueue_style( 'sharedaddy', plugin_dir_url( __FILE__ ) .'sharing.css', array(), JETPACK__VERSION );
- wp_enqueue_style( 'genericons' );
- } else {
- wp_enqueue_style( 'sharedaddy', plugin_dir_url( __FILE__ ) .'sharing-legacy.css', array(), JETPACK__VERSION );
- }
+ wp_enqueue_style( 'sharedaddy', plugin_dir_url( __FILE__ ) .'sharing.css', array(), JETPACK__VERSION );
+ wp_enqueue_style( 'genericons' );
}
}
@@ -577,7 +584,7 @@ function sharing_display( $text = '', $echo = false ) {
if ( empty( $post ) )
return $text;
- if ( is_preview() || is_admin() ) {
+ if ( ( is_preview() || is_admin() ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
return $text;
}
@@ -617,7 +624,7 @@ function sharing_display( $text = '', $echo = false ) {
if ( !is_feed() ) {
if ( is_singular() && in_array( get_post_type(), $global['show'] ) ) {
$show = true;
- } elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) {
+ } elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) {
$show = true;
}
}
@@ -625,9 +632,11 @@ function sharing_display( $text = '', $echo = false ) {
/**
* Filter to decide if sharing buttons should be displayed.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*
- * @param
+ * @param bool $show Should the sharing buttons be displayed.
* @param WP_Post $post The post to share.
*/
$show = apply_filters( 'sharing_show', $show, $post );
@@ -641,7 +650,7 @@ function sharing_display( $text = '', $echo = false ) {
// Private post?
$post_status = get_post_status( $post->ID );
- if ( $post_status == 'private' ) {
+ if ( 'private' === $post_status ) {
$show = false;
}
@@ -655,6 +664,8 @@ function sharing_display( $text = '', $echo = false ) {
/**
* Filters the list of enabled Sharing Services.
*
+ * @module sharedaddy
+ *
* @since 2.2.3
*
* @param array $sharer->get_blog_services() Array of Sharing Services currently enabled.
@@ -738,10 +749,21 @@ function sharing_display( $text = '', $echo = false ) {
}
}
+ /**
+ * Filters the content markup of the Jetpack sharing links
+ *
+ * @module sharedaddy
+ *
+ * @since 3.8.0
+ *
+ * @param string $sharing_content Content markup of the Jetpack sharing links
+ */
+ $sharing_markup = apply_filters( 'jetpack_sharing_display_markup', $sharing_content );
+
if ( $echo )
- echo $text.$sharing_content;
+ echo $text . $sharing_markup;
else
- return $text.$sharing_content;
+ return $text . $sharing_markup;
}
add_filter( 'the_content', 'sharing_display', 19 );
diff --git a/plugins/jetpack/modules/sharedaddy/sharing-sources.php b/plugins/jetpack/modules/sharedaddy/sharing-sources.php
index 69148877..5edb4c09 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing-sources.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing-sources.php
@@ -8,6 +8,17 @@ abstract class Sharing_Source {
public function __construct( $id, array $settings ) {
$this->id = $id;
+ /**
+ * Filter the way sharing links open.
+ *
+ * By default, sharing links open in a new window.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param bool true Should Sharing links open in a new window. Default to true.
+ */
$this->open_link_in_new = apply_filters( 'jetpack_open_sharing_in_new_window', true );
if ( isset( $settings['button_style'] ) )
@@ -30,11 +41,33 @@ abstract class Sharing_Source {
}
public function get_share_url( $post_id ) {
+ /**
+ * Filter the sharing permalink.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.2.0
+ *
+ * @param string get_permalink( $post_id ) Post Permalink.
+ * @param int $post_id Post ID.
+ * @param int $this->id Sharing ID.
+ */
return apply_filters( 'sharing_permalink', get_permalink( $post_id ), $post_id, $this->id );
}
public function get_share_title( $post_id ) {
$post = get_post( $post_id );
+ /**
+ * Filter the sharing title.
+ *
+ * @module sharedaddy
+ *
+ * @since 2.8.0
+ *
+ * @param string $post->post_title Post Title.
+ * @param int $post_id Post ID.
+ * @param int $this->id Sharing ID.
+ */
$title = apply_filters( 'sharing_title', $post->post_title, $post_id, $this->id );
return html_entity_decode( wp_kses( $title, null ) );
@@ -59,9 +92,56 @@ abstract class Sharing_Source {
$text .= __( ' (Opens in new window)', 'jetpack' );
}
+ /**
+ * Filter the sharing display ID.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param int|false $id Sharing ID.
+ * @param object $this Sharing service properties.
+ * @param array $args Array of sharing service options.
+ */
$id = apply_filters( 'jetpack_sharing_display_id', $id, $this, $args );
+ /**
+ * Filter the sharing display link.
+ *
+ * @module sharedaddy
+ *
+ * @since 2.8.0
+ *
+ * @param string $url Post URL.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$url = apply_filters( 'sharing_display_link', $url, $this, $id, $args ); // backwards compatibility
+ /**
+ * Filter the sharing display link.
+ *
+ * @module sharedaddy
+ *
+ * @since 2.8.0
+ *
+ * @param string $url Post URL.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$url = apply_filters( 'jetpack_sharing_display_link', $url, $this, $id, $args );
+ /**
+ * Filter the sharing display query.
+ *
+ * @module sharedaddy
+ *
+ * @since 2.8.0
+ *
+ * @param string $query Sharing service URL parameter.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$query = apply_filters( 'jetpack_sharing_display_query', $query, $this, $id, $args );
if ( !empty( $query ) ) {
@@ -74,8 +154,44 @@ abstract class Sharing_Source {
if ( 'text' == $this->button_style )
$klasses[] = 'no-icon';
+ /**
+ * Filter the sharing display classes.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param array $klasses Sharing service classes.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$klasses = apply_filters( 'jetpack_sharing_display_classes', $klasses, $this, $id, $args );
+ /**
+ * Filter the sharing display title.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param string $title Sharing service title.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$title = apply_filters( 'jetpack_sharing_display_title', $title, $this, $id, $args );
+ /**
+ * Filter the sharing display text.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.4.0
+ *
+ * @param string $text Sharing service text.
+ * @param object $this Sharing service properties.
+ * @param int|false $id Sharing ID.
+ * @param array $args Array of sharing service options.
+ */
$text = apply_filters( 'jetpack_sharing_display_text', $text, $this, $id, $args );
return sprintf(
@@ -91,6 +207,20 @@ abstract class Sharing_Source {
);
}
+ /**
+ * Get an unfiltered post permalink to use when generating a sharing URL with get_link.
+ * Use instead of get_share_url for non-official styles as get_permalink ensures that process_request
+ * will be executed more reliably, in the case that the filtered URL uses a service that strips query parameters.
+ *
+ * @since 3.7.0
+ * @param int $post_id Post ID.
+ * @uses get_permalink
+ * @return string get_permalink( $post_id ) Post permalink.
+ */
+ public function get_process_request_url( $post_id ) {
+ return get_permalink( $post_id );
+ }
+
abstract public function get_name();
abstract public function get_display( $post );
@@ -123,7 +253,7 @@ abstract class Sharing_Source {
$klasses[] = 'no-icon';
$link = sprintf(
- '<a rel="nofollow" class="%s" href="javascript:void(0);return false;" title="%s"><span>%s</span></a>',
+ '<a rel="nofollow" class="%s" href="javascript:void(0)" title="%s"><span>%s</span></a>',
implode( ' ', $klasses ),
$this->get_name(),
$text
@@ -169,6 +299,15 @@ abstract class Sharing_Source {
}
public function process_request( $post, array $post_data ) {
+ /**
+ * Fires when a post is shared via one of the sharing buttons.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param array $args Aray of information about the sharing service.
+ */
do_action( 'sharing_bump_stats', array( 'service' => $this, 'post' => $post ) );
}
@@ -217,8 +356,8 @@ abstract class Sharing_Advanced_Source extends Sharing_Source {
class Share_Email extends Sharing_Source {
- var $shortname = 'email';
- var $genericon = '\f410';
+ public $shortname = 'email';
+ public $genericon = '\f410';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -257,6 +396,17 @@ class Share_Email extends Sharing_Source {
// Test email
$error = 1; // Failure in data
if ( empty( $post_data['source_f_name'] ) && $source_email && $target_email && $source_name ) {
+ /**
+ * Allow plugins to stop the email sharing button from running the shared message through Akismet.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param bool true Should we check if the message isn't spam?
+ * @param object $post Post information.
+ * @param array $post_data Information about the shared message.
+ */
if ( apply_filters( 'sharing_email_check', true, $post, $post_data ) ) {
$data = array(
'post' => $post,
@@ -265,10 +415,28 @@ class Share_Email extends Sharing_Source {
'name' => $source_name
);
// todo: implement an error message when email doesn't get sent.
+ /**
+ * Filter whether an email can be sent from the Email sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param array $data Array of information about the shared message.
+ */
if ( ( $data = apply_filters( 'sharing_email_can_send', $data ) ) !== false ) {
// Record stats
parent::process_request( $data['post'], $post_data );
+ /**
+ * Fires when an email is sent via the Email sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param array $data Array of information about the shared message.
+ */
do_action( 'sharing_email_send_post', $data );
}
@@ -300,7 +468,7 @@ class Share_Email extends Sharing_Source {
}
public function get_display( $post ) {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Email', 'share to', 'jetpack' ), __( 'Click to email this to a friend', 'jetpack' ), 'share=email' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Email', 'share to', 'jetpack' ), __( 'Click to email this to a friend', 'jetpack' ), 'share=email' );
}
/**
@@ -330,7 +498,18 @@ class Share_Email extends Sharing_Source {
<?php endif; ?>
<input type="text" id="jetpack-source_f_name" name="source_f_name" class="input" value="" size="25" autocomplete="off" />
<script> document.getElementById('jetpack-source_f_name').value = ''; </script>
- <?php do_action( 'sharing_email_dialog', 'jetpack' ); ?>
+ <?php
+ /**
+ * Fires when the Email sharing dialog is loaded.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.1.0
+ *
+ * @param string jetpack Eail sharing source.
+ */
+ do_action( 'sharing_email_dialog', 'jetpack' );
+ ?>
<img style="float: right; display: none" class="loading" src="<?php
/** This filter is documented in modules/shortcodes/audio.php */
@@ -356,10 +535,10 @@ class Share_Email extends Sharing_Source {
}
class Share_Twitter extends Sharing_Source {
- var $shortname = 'twitter';
- var $genericon = '\f202';
+ public $shortname = 'twitter';
+ public $genericon = '\f202';
// 'https://dev.twitter.com/rest/reference/get/help/configuration' ( 2015/02/06 ) short_url_length is 22, short_url_length_https is 23
- var $short_url_length = 24;
+ public $short_url_length = 24;
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -375,7 +554,16 @@ class Share_Twitter extends Sharing_Source {
}
function sharing_twitter_via( $post ) {
- // Allow themes to customize the via
+ /**
+ * Allow third-party plugins to customize the Twitter username used as "twitter:site" Twitter Card Meta Tag.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.0.0
+ *
+ * @param string $string Twitter Username.
+ * @param array $args Array of Open Graph Meta Tags and Twitter Cards tags.
+ */
$twitter_site_tag_value = apply_filters( 'jetpack_twitter_cards_site_tag', '', array() );
/*
@@ -387,17 +575,34 @@ class Share_Twitter extends Sharing_Source {
$twitter_site_tag_value = '';
}
+ /**
+ * Filters the Twitter username used as "via" in the Twitter sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.7.0
+ *
+ * @param string $twitter_site_tag_value Twitter Username.
+ * @param int $post->ID Post ID.
+ */
$twitter_site_tag_value = apply_filters( 'jetpack_sharing_twitter_via', $twitter_site_tag_value, $post->ID );
// Strip out anything other than a letter, number, or underscore.
// This will prevent the inadvertent inclusion of an extra @, as well as normalizing the handle.
- $twitter_site_tag_value = preg_replace( '/[^\da-z_]+/i', '', $twitter_site_tag_value );
-
- return $twitter_site_tag_value;
+ return preg_replace( '/[^\da-z_]+/i', '', $twitter_site_tag_value );
}
public function get_related_accounts( $post ) {
- // Format is 'username' => 'Optional description'
+ /**
+ * Filter the list of related Twitter accounts added to the Twitter sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 1.7.0
+ *
+ * @param array $args Array of Twitter usernames. Format is 'username' => 'Optional description'
+ * @param int $post->ID Post ID.
+ */
$related_accounts = apply_filters( 'jetpack_sharing_twitter_related', array(), $post->ID );
// Example related string: account1,account2:Account 2 description,account3
@@ -418,26 +623,46 @@ class Share_Twitter extends Sharing_Source {
$via = $this->sharing_twitter_via( $post );
if ( $via ) {
- $via = '&via=' . rawurlencode( $via );
+ $via = 'data-via="' . esc_attr( $via ) . '"';
} else {
$via = '';
}
$related = $this->get_related_accounts( $post );
if ( ! empty( $related ) && $related !== $via ) {
- $via .= '&related=' . rawurlencode( $related );
+ $related = 'data-related="' . esc_attr( $related ) . '"';
+ } else {
+ $related = '';
}
if ( $this->smart ) {
$share_url = $this->get_share_url( $post->ID );
$post_title = $this->get_share_title( $post->ID );
-
- return '<div class="twitter_button"><iframe allowtransparency="true" frameborder="0" scrolling="no" src="' . esc_url( $this->http() . '://platform.twitter.com/widgets/tweet_button.html?url=' . rawurlencode( $share_url ) . '&counturl=' . rawurlencode( get_permalink( $post->ID ) ) . '&count=horizontal&text=' . rawurlencode( $post_title . ':' ) . $via ) . '" style="width:101px; height:20px;"></iframe></div>';
+ return sprintf(
+ '<a href="https://twitter.com/share" class="twitter-share-button" data-url="%1$s" data-text="%2$s" %3$s %4$s>Tweet</a>',
+ esc_url( $share_url ),
+ esc_attr( $post_title ),
+ $via,
+ $related
+ );
} else {
- if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'twitter' ) ) {
+ if (
+ /**
+ * Allow plugins to disable sharing counts for specific sharing services.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.0.0
+ *
+ * @param bool true Should sharing counts be enabled for this specific service. Default to true.
+ * @param int $post->ID Post ID.
+ * @param string $str Sharing service name.
+ */
+ apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'twitter' )
+ ) {
sharing_register_post_for_share_counts( $post->ID );
}
- return $this->get_link( get_permalink( $post->ID ), _x( 'Twitter', 'share to', 'jetpack' ), __( 'Click to share on Twitter', 'jetpack' ), 'share=twitter', 'sharing-twitter-' . $post->ID );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Twitter', 'share to', 'jetpack' ), __( 'Click to share on Twitter', 'jetpack' ), 'share=twitter', 'sharing-twitter-' . $post->ID );
}
}
@@ -480,7 +705,7 @@ class Share_Twitter extends Sharing_Source {
$url = $post_link;
$twitter_url = add_query_arg(
- urlencode_deep( array_filter( compact( 'via', 'related', 'text', 'url' ) ) ),
+ rawurlencode_deep( array_filter( compact( 'via', 'related', 'text', 'url' ) ) ),
'https://twitter.com/intent/tweet'
);
@@ -494,52 +719,20 @@ class Share_Twitter extends Sharing_Source {
}
public function display_footer() {
- $this->js_dialog( $this->shortname, array( 'height' => 350 ) );
+ if ( $this->smart ) {
+ ?>
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
+ <?php
+ } else {
+ $this->js_dialog( $this->shortname, array( 'height' => 350 ) );
+ }
}
}
-class Share_Stumbleupon extends Sharing_Source {
- var $shortname = 'stumbleupon';
- var $genericon = '\f223';
- public function __construct( $id, array $settings ) {
- parent::__construct( $id, $settings );
-
- if ( 'official' == $this->button_style )
- $this->smart = true;
- else
- $this->smart = false;
- }
-
- public function get_name() {
- return __( 'StumbleUpon', 'jetpack' );
- }
-
- public function has_custom_button_style() {
- return $this->smart;
- }
-
- public function get_display( $post ) {
- if ( $this->smart )
- return '<div class="stumbleupon_button"><iframe src="http://www.stumbleupon.com/badge/embed/1/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&amp;title=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:74px; height: 18px;" allowTransparency="true"></iframe></div>';
- else
- return $this->get_link( get_permalink( $post->ID ), _x( 'StumbleUpon', 'share to', 'jetpack' ), __( 'Click to share on StumbleUpon', 'jetpack' ), 'share=stumbleupon' );
- }
-
- public function process_request( $post, array $post_data ) {
- $stumbleupon_url = $this->http() . '://www.stumbleupon.com/submit?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&title=' . rawurlencode( $this->get_share_title( $post->ID ) );
-
- // Record stats
- parent::process_request( $post, $post_data );
-
- // Redirect to Stumbleupon
- wp_redirect( $stumbleupon_url );
- die();
- }
-}
class Share_Reddit extends Sharing_Source {
- var $shortname = 'reddit';
- var $genericon = '\f222';
+ public $shortname = 'reddit';
+ public $genericon = '\f222';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -555,9 +748,9 @@ class Share_Reddit extends Sharing_Source {
public function get_display( $post ) {
if ( $this->smart )
- return '<div class="reddit_button"><iframe src="' . $this->http() . '://www.reddit.com/static/button/button1.html?width=120&amp;url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&amp;title=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '" height="22" width="120" scrolling="no" frameborder="0"></iframe></div>';
+ return '<div class="reddit_button"><iframe src="' . $this->http() . '://www.reddit.com/static/button/button1.html?newwindow=true&width=120&amp;url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&amp;title=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '" height="22" width="120" scrolling="no" frameborder="0"></iframe></div>';
else
- return $this->get_link( get_permalink( $post->ID ), _x( 'Reddit', 'share to', 'jetpack' ), __( 'Click to share on Reddit', 'jetpack' ), 'share=reddit' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Reddit', 'share to', 'jetpack' ), __( 'Click to share on Reddit', 'jetpack' ), 'share=reddit' );
}
public function process_request( $post, array $post_data ) {
@@ -573,8 +766,8 @@ class Share_Reddit extends Sharing_Source {
}
class Share_LinkedIn extends Sharing_Source {
- var $shortname = 'linkedin';
- var $genericon = '\f207';
+ public $shortname = 'linkedin';
+ public $genericon = '\f207';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -599,9 +792,10 @@ class Share_LinkedIn extends Sharing_Source {
$share_url = $this->get_share_url( $post->ID );
$display .= sprintf( '<div class="linkedin_button"><script type="in/share" data-url="%s" data-counter="right"></script></div>', esc_url( $share_url ) );
} else {
- $display = $this->get_link( get_permalink( $post->ID ), _x( 'LinkedIn', 'share to', 'jetpack' ), __( 'Click to share on LinkedIn', 'jetpack' ), 'share=linkedin', 'sharing-linkedin-' . $post->ID );
+ $display = $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'LinkedIn', 'share to', 'jetpack' ), __( 'Click to share on LinkedIn', 'jetpack' ), 'share=linkedin', 'sharing-linkedin-' . $post->ID );
}
+ /** This filter is already documented in modules/sharedaddy/sharing-sources.php */
if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'linkedin' ) ) {
sharing_register_post_for_share_counts( $post->ID );
}
@@ -648,8 +842,8 @@ class Share_LinkedIn extends Sharing_Source {
}
class Share_Facebook extends Sharing_Source {
- var $shortname = 'facebook';
- var $genericon = '\f204';
+ public $shortname = 'facebook';
+ public $genericon = '\f204';
private $share_type = 'default';
public function __construct( $id, array $settings ) {
@@ -692,23 +886,47 @@ class Share_Facebook extends Sharing_Source {
$locale = GP_Locales::by_field( 'wp_locale', $lang );
}
- if ( !$locale || empty( $locale->facebook_locale ) ) {
+ if ( ! $locale ) {
return false;
}
+ if ( empty( $locale->facebook_locale ) ) {
+ if ( empty( $locale->wp_locale ) ) {
+ return false;
+ } else {
+ // Facebook SDK is smart enough to fall back to en_US if a
+ // locale isn't supported. Since supported Facebook locales
+ // can fall out of sync, we'll attempt to use the known
+ // wp_locale value and rely on said fallback.
+ return $locale->wp_locale;
+ }
+ }
+
return $locale->facebook_locale;
}
public function get_display( $post ) {
if ( $this->smart ) {
$share_url = $this->get_share_url( $post->ID );
- return '<div class="fb-share-button" data-href="' . esc_attr( $share_url ) . '" data-layout="button_count"></div>';
+ $fb_share_html = '<div class="fb-share-button" data-href="' . esc_attr( $share_url ) . '" data-layout="button_count"></div>';
+ /**
+ * Filter the output of the Facebook Sharing button.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param string $fb_share_html Facebook Sharing button HTML.
+ * @param string $share_url URL of the post to share.
+ */
+ return apply_filters( 'jetpack_sharing_facebook_official_button_output', $fb_share_html, $share_url );
}
+ /** This filter is already documented in modules/sharedaddy/sharing-sources.php */
if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'facebook' ) ) {
sharing_register_post_for_share_counts( $post->ID );
}
- return $this->get_link( get_permalink( $post->ID ), _x( 'Facebook', 'share to', 'jetpack' ), __( 'Share on Facebook', 'jetpack' ), 'share=facebook', 'sharing-facebook-' . $post->ID );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Facebook', 'share to', 'jetpack' ), __( 'Click to share on Facebook', 'jetpack' ), 'share=facebook', 'sharing-facebook-' . $post->ID );
}
public function process_request( $post, array $post_data ) {
@@ -726,14 +944,39 @@ class Share_Facebook extends Sharing_Source {
$this->js_dialog( $this->shortname );
if ( $this->smart ) {
$locale = $this->guess_locale_from_lang( get_locale() );
- ?><div id="fb-root"></div><script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = '//connect.facebook.net/<?php echo $locale; ?>/sdk.js#xfbml=1&appId=249643311490&version=v2.3'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script><?php
+ if ( ! $locale ) {
+ $locale = 'en_US';
+ }
+ /**
+ * Filter the App ID used in the official Facebook Share button.
+ *
+ * @since 3.8.0
+ *
+ * @param int $fb_app_id Facebook App ID. Default to 249643311490 (WordPress.com's App ID).
+ */
+ $fb_app_id = apply_filters( 'jetpack_sharing_facebook_app_id', '249643311490' );
+ if ( is_numeric( $fb_app_id ) ) {
+ $fb_app_id = '&appId=' . $fb_app_id;
+ } else {
+ $fb_app_id = '';
+ }
+ ?><div id="fb-root"></div>
+ <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = '//connect.facebook.net/<?php echo $locale; ?>/sdk.js#xfbml=1<?php echo $fb_app_id; ?>&version=v2.3'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
+ <script>
+ jQuery( document.body ).on( 'post-load', function() {
+ if ( 'undefined' !== typeof FB ) {
+ FB.XFBML.parse();
+ }
+ } );
+ </script>
+ <?php
}
}
}
class Share_Print extends Sharing_Source {
- var $shortname = 'print';
- var $genericon = '\f469';
+ public $shortname = 'print';
+ public $genericon = '\f469';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -748,13 +991,13 @@ class Share_Print extends Sharing_Source {
}
public function get_display( $post ) {
- return $this->get_link( get_permalink( $post->ID ) . ( ( is_single() || is_page() ) ? '#print': '' ), _x( 'Print', 'share to', 'jetpack' ), __( 'Click to print', 'jetpack' ) );
+ return $this->get_link( $this->get_process_request_url( $post->ID ) . ( ( is_single() || is_page() ) ? '#print': '' ), _x( 'Print', 'share to', 'jetpack' ), __( 'Click to print', 'jetpack' ) );
}
}
class Share_PressThis extends Sharing_Source {
- var $shortname = 'pressthis';
- var $genericon = '\f205';
+ public $shortname = 'pressthis';
+ public $genericon = '\f205';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -810,13 +1053,13 @@ class Share_PressThis extends Sharing_Source {
}
public function get_display( $post ) {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Press This', 'share to', 'jetpack' ), __( 'Click to Press This!', 'jetpack' ), 'share=press-this' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Press This', 'share to', 'jetpack' ), __( 'Click to Press This!', 'jetpack' ), 'share=press-this' );
}
}
class Share_GooglePlus1 extends Sharing_Source {
- var $shortname = 'googleplus1';
- var $genericon = '\f218';
+ public $shortname = 'googleplus1';
+ public $genericon = '\f218';
private $state = false;
public function __construct( $id, array $settings ) {
@@ -837,11 +1080,12 @@ class Share_GooglePlus1 extends Sharing_Source {
}
public function get_display( $post ) {
+
if ( $this->smart ) {
$share_url = $this->get_share_url( $post->ID );
return '<div class="googleplus1_button"><div class="g-plus" data-action="share" data-annotation="bubble" data-href="' . esc_url( $share_url ) . '"></div></div>';
} else {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Google', 'share to', 'jetpack' ), __( 'Click to share on Google+', 'jetpack' ), 'share=google-plus-1', 'sharing-google-' . $post->ID );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Google', 'share to', 'jetpack' ), __( 'Click to share on Google+', 'jetpack' ), 'share=google-plus-1', 'sharing-google-' . $post->ID );
}
}
@@ -867,12 +1111,36 @@ class Share_GooglePlus1 extends Sharing_Source {
global $post;
if ( $this->smart ) { ?>
- <script type="text/javascript">
- (function() {
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
- po.src = 'https://apis.google.com/js/plusone.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
- })();
+ <script>
+ function renderGooglePlus1() {
+ if ( 'undefined' === typeof gapi ) {
+ return;
+ }
+
+ jQuery( '.g-plus' ).each(function() {
+ var $button = jQuery( this );
+
+ if ( ! $button.data( 'gplus-rendered' ) ) {
+ gapi.plusone.render( this, {
+ href: $button.attr( 'data-href' ),
+ size: $button.attr( 'data-size' ),
+ annotation: $button.attr( 'data-annotation' )
+ });
+
+ $button.data( 'gplus-rendered', true );
+ }
+ });
+ }
+
+ (function() {
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ po.src = 'https://apis.google.com/js/plusone.js';
+ po.innerHTML = '{"parsetags": "explicit"}';
+ po.onload = renderGooglePlus1;
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+ })();
+
+ jQuery( document.body ).on( 'post-load', renderGooglePlus1 );
</script>
<?php
} else {
@@ -900,7 +1168,7 @@ class Share_Custom extends Sharing_Advanced_Source {
private $icon;
private $url;
public $smart = true;
- var $shortname;
+ public $shortname;
public function get_class() {
return 'custom share-custom-' . sanitize_html_class( strtolower( $this->name ) );
@@ -942,7 +1210,7 @@ class Share_Custom extends Sharing_Advanced_Source {
}
public function get_display( $post ) {
- $str = $this->get_link( get_permalink( $post->ID ), esc_html( $this->name ), sprintf( __( 'Click to share on %s', 'jetpack' ), esc_attr( $this->name ) ), 'share='.$this->id );
+ $str = $this->get_link( $this->get_process_request_url( $post->ID ), esc_html( $this->name ), sprintf( __( 'Click to share on %s', 'jetpack' ), esc_attr( $this->name ) ), 'share='.$this->id );
return str_replace( '<span>', '<span style="' . esc_attr( 'background-image:url("' . addcslashes( esc_url_raw( $this->icon ), '"' ) . '");' ) . '">', $str );
}
@@ -1064,7 +1332,7 @@ class Share_Custom extends Sharing_Advanced_Source {
$klasses[] = 'no-icon';
$link = sprintf(
- '<a rel="nofollow" class="%s" href="javascript:void(0);return false;" title="%s"><span style="background-image:url(&quot;%s&quot;) !important;background-position:left center;background-repeat:no-repeat;">%s</span></a>',
+ '<a rel="nofollow" class="%s" href="javascript:void(0)" title="%s"><span style="background-image:url(&quot;%s&quot;) !important;background-position:left center;background-repeat:no-repeat;">%s</span></a>',
implode( ' ', $klasses ),
$this->get_name(),
addcslashes( esc_url_raw( $opts['icon'] ), '"' ),
@@ -1078,8 +1346,8 @@ class Share_Custom extends Sharing_Advanced_Source {
}
class Share_Tumblr extends Sharing_Source {
- var $shortname = 'tumblr';
- var $genericon = '\f214';
+ public $shortname = 'tumblr';
+ public $genericon = '\f214';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
if ( 'official' == $this->button_style )
@@ -1100,7 +1368,7 @@ class Share_Tumblr extends Sharing_Source {
return '<a target="' . $target . '" href="http://www.tumblr.com/share/link/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&name=' . rawurlencode( $this->get_share_title( $post->ID ) ) . '" title="' . __( 'Share on Tumblr', 'jetpack' ) . '" style="display:inline-block; text-indent:-9999px; overflow:hidden; width:62px; height:20px; background:url(\'//platform.tumblr.com/v1/share_2.png\') top left no-repeat transparent;">' . __( 'Share on Tumblr', 'jetpack' ) . '</a>';
} else {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Tumblr', 'share to', 'jetpack' ), __( 'Click to share on Tumblr', 'jetpack' ), 'share=tumblr' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Tumblr', 'share to', 'jetpack' ), __( 'Click to share on Tumblr', 'jetpack' ), 'share=tumblr' );
}
}
@@ -1124,12 +1392,11 @@ class Share_Tumblr extends Sharing_Source {
}
class Share_Pinterest extends Sharing_Source {
- var $shortname = 'pinterest';
- var $genericon = '\f209';
+ public $shortname = 'pinterest';
+ public $genericon = '\f209';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
-
if ( 'official' == $this->button_style )
$this->smart = true;
else
@@ -1140,16 +1407,70 @@ class Share_Pinterest extends Sharing_Source {
return __( 'Pinterest', 'jetpack' );
}
+ public function get_image( $post ) {
+ if ( class_exists( 'Jetpack_PostImages' ) ) {
+ $image = Jetpack_PostImages::get_image( $post->ID, array( 'fallback_to_avatars' => true ) );
+ if ( ! empty( $image ) ) {
+ return $image['src'];
+ }
+ }
+
+ /**
+ * Filters the default image used by the Pinterest Pin It share button.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param string $url Default image URL.
+ */
+ return apply_filters( 'jetpack_sharing_pinterest_default_image', 'https://s0.wp.com/i/blank.jpg' );
+ }
+
+ public function get_external_url( $post ) {
+ $url = 'https://www.pinterest.com/pin/create/button/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&media=' . rawurlencode( $this->get_image( $post ) ) . '&description=' . rawurlencode( $post->post_title );
+
+ /**
+ * Filters the Pinterest share URL used in sharing button output.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param string $url Pinterest share URL.
+ */
+ return apply_filters( 'jetpack_sharing_pinterest_share_url', $url );
+ }
+
+ public function get_widget_type() {
+ /**
+ * Filters the Pinterest widget type.
+ *
+ * @see https://business.pinterest.com/en/widget-builder
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param string $type Pinterest widget type. Default of 'buttonPin' for single-image selection. 'buttonBookmark' for multi-image modal.
+ */
+ return apply_filters( 'jetpack_sharing_pinterest_widget_type', 'buttonPin' );
+ }
+
public function get_display( $post ) {
$display = '';
if ( $this->smart ) {
- $share_url = 'http://pinterest.com/pin/create/button/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&description=' . rawurlencode( $post->post_title );
- $display .= sprintf( '<div class="pinterest_button"><a href="%s" data-pin-do="buttonBookmark" data-pin-config="beside"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a></div>', esc_url( $share_url ) );
+ $display = sprintf(
+ '<div class="pinterest_button"><a href="%s" data-pin-do="%s" data-pin-config="beside"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a></div>',
+ esc_url( $this->get_external_url( $post ) ),
+ esc_attr( $this->get_widget_type() )
+ );
} else {
- $display = $this->get_link( get_permalink( $post->ID ), _x( 'Pinterest', 'share to', 'jetpack' ), __( 'Click to share on Pinterest', 'jetpack' ), 'share=pinterest', 'sharing-pinterest-' . $post->ID );
+ $display = $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Pinterest', 'share to', 'jetpack' ), __( 'Click to share on Pinterest', 'jetpack' ), 'share=pinterest', 'sharing-pinterest-' . $post->ID );
}
+ /** This filter is already documented in modules/sharedaddy/sharing-sources.php */
if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'linkedin' ) ) {
sharing_register_post_for_share_counts( $post->ID );
}
@@ -1160,19 +1481,27 @@ class Share_Pinterest extends Sharing_Source {
public function process_request( $post, array $post_data ) {
// Record stats
parent::process_request( $post, $post_data );
-
// If we're triggering the multi-select panel, then we don't need to redirect to Pinterest
if ( !isset( $_GET['js_only'] ) ) {
- $pinterest_url = esc_url_raw( 'http://pinterest.com/pin/create/button/?url=' . rawurlencode( $this->get_share_url( $post->ID ) ) . '&description=' . rawurlencode( $this->get_share_title( $post->ID ) ) );
+ $pinterest_url = esc_url_raw( $this->get_external_url( $post ) );
wp_redirect( $pinterest_url );
} else {
echo '// share count bumped';
}
-
die();
}
public function display_footer() {
+ /**
+ * Filter the Pin it button appearing when hovering over images when using the official button style.
+ *
+ * @module sharedaddy
+ *
+ * @since 3.6.0
+ *
+ * @param bool $jetpack_pinit_over True by default, displays the Pin it button when hovering over images.
+ */
+ $jetpack_pinit_over = apply_filters( 'jetpack_pinit_over_button', true );
?>
<?php if ( $this->smart ) : ?>
<script type="text/javascript">
@@ -1180,42 +1509,40 @@ class Share_Pinterest extends Sharing_Source {
var s = document.createElement("script");
s.type = "text/javascript";
s.async = true;
- s.setAttribute('data-pin-hover', true);
+ <?php if ( $jetpack_pinit_over ) echo "s.setAttribute('data-pin-hover', true);"; ?>
s.src = window.location.protocol + "//assets.pinterest.com/js/pinit.js";
var x = document.getElementsByTagName("script")[0];
x.parentNode.insertBefore(s, x);
// if 'Pin it' button has 'counts' make container wider
jQuery(window).load( function(){ jQuery( 'li.share-pinterest a span:visible' ).closest( '.share-pinterest' ).width( '80px' ); } );
</script>
- <?php else : ?>
+ <?php elseif ( 'buttonPin' != $this->get_widget_type() ) : ?>
<script type="text/javascript">
- jQuery(document).on('ready', function(){
- jQuery('body').on('click', 'a.share-pinterest', function(e){
- e.preventDefault();
-
- // Load Pinterest Bookmarklet code
- var s = document.createElement("script");
- s.type = "text/javascript";
- s.src = window.location.protocol + "//assets.pinterest.com/js/pinmarklet.js?r=" + ( Math.random() * 99999999 );
- var x = document.getElementsByTagName("script")[0];
- x.parentNode.insertBefore(s, x);
-
- // Trigger Stats
- var s = document.createElement("script");
- s.type = "text/javascript";
- s.src = this + ( this.toString().indexOf( '?' ) ? '&' : '?' ) + 'js_only=1';
- var x = document.getElementsByTagName("script")[0];
- x.parentNode.insertBefore(s, x);
+ jQuery(document).on('ready', function(){
+ jQuery('body').on('click', 'a.share-pinterest', function(e){
+ e.preventDefault();
+ // Load Pinterest Bookmarklet code
+ var s = document.createElement("script");
+ s.type = "text/javascript";
+ s.src = window.location.protocol + "//assets.pinterest.com/js/pinmarklet.js?r=" + ( Math.random() * 99999999 );
+ var x = document.getElementsByTagName("script")[0];
+ x.parentNode.insertBefore(s, x);
+ // Trigger Stats
+ var s = document.createElement("script");
+ s.type = "text/javascript";
+ s.src = this + ( this.toString().indexOf( '?' ) ? '&' : '?' ) + 'js_only=1';
+ var x = document.getElementsByTagName("script")[0];
+ x.parentNode.insertBefore(s, x);
+ });
});
- });
</script>
<?php endif;
}
}
class Share_Pocket extends Sharing_Source {
- var $shortname = 'pocket';
- var $genericon = '\f224';
+ public $shortname = 'pocket';
+ public $genericon = '\f224';
public function __construct( $id, array $settings ) {
parent::__construct( $id, $settings );
@@ -1250,7 +1577,7 @@ class Share_Pocket extends Sharing_Source {
return $button;
} else {
- return $this->get_link( get_permalink( $post->ID ), _x( 'Pocket', 'share to', 'jetpack' ), __( 'Click to share on Pocket', 'jetpack' ), 'share=pocket' );
+ return $this->get_link( $this->get_process_request_url( $post->ID ), _x( 'Pocket', 'share to', 'jetpack' ), __( 'Click to share on Pocket', 'jetpack' ), 'share=pocket' );
}
}
@@ -1275,3 +1602,86 @@ class Share_Pocket extends Sharing_Source {
}
+class Share_Skype extends Sharing_Source {
+ public $shortname = 'skype';
+ public $genericon = '\f220';
+ private $share_type = 'default';
+
+ public function __construct( $id, array $settings ) {
+ parent::__construct( $id, $settings );
+
+ if ( isset( $settings['share_type'] ) ) {
+ $this->share_type = $settings['share_type'];
+ }
+
+ if ( 'official' == $this->button_style ) {
+ $this->smart = true;
+ } else {
+ $this->smart = false;
+ }
+ }
+
+ public function get_name() {
+ return __( 'Skype', 'jetpack' );
+ }
+
+ public function get_display( $post ) {
+ if ( $this->smart ) {
+ $skype_share_html = sprintf(
+ '<div class="skype-share" data-href="%1$s" data-lang="%2$s" data-style="small" data-source="jetpack" ></div>',
+ esc_attr( $this->get_share_url( $post->ID ) ),
+ 'en-US'
+ );
+ return $skype_share_html;
+ }
+
+ /** This filter is already documented in modules/sharedaddy/sharing-sources.php */
+ if ( apply_filters( 'jetpack_register_post_for_share_counts', true, $post->ID, 'skype' ) ) {
+ sharing_register_post_for_share_counts( $post->ID );
+ }
+ return $this->get_link(
+ $this->get_process_request_url( $post->ID ), _x( 'Skype', 'share to', 'jetpack' ), __( 'Share on Skype', 'jetpack' ), 'share=skype', 'sharing-skype-' . $post->ID );
+ }
+
+ public function process_request( $post, array $post_data ) {
+ $skype_url = sprintf(
+ 'https://web.skype.com/share?url=%1$s&lang=%2$s=&source=jetpack',
+ rawurlencode( $this->get_share_url( $post->ID ) ),
+ 'en-US'
+ );
+
+ // Record stats
+ parent::process_request( $post, $post_data );
+
+ // Redirect to Skype
+ wp_redirect( $skype_url );
+ die();
+ }
+
+ public function display_footer() {
+ if ( $this->smart ) :
+ ?>
+ <script>
+ (function(r, d, s) {
+ r.loadSkypeWebSdkAsync = r.loadSkypeWebSdkAsync || function(p) {
+ var js, sjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(p.id)) { return; }
+ js = d.createElement(s);
+ js.id = p.id;
+ js.src = p.scriptToLoad;
+ js.onload = p.callback
+ sjs.parentNode.insertBefore(js, sjs);
+ };
+ var p = {
+ scriptToLoad: 'https://swx.cdn.skype.com/shared/v/latest/skypewebsdk.js',
+ id: 'skype_web_sdk'
+ };
+ r.loadSkypeWebSdkAsync(p);
+ })(window, document, 'script');
+ </script>
+ <?php
+ else :
+ $this->js_dialog( $this->shortname, array( 'width' => 305, 'height' => 665 ) );
+ endif;
+ }
+}
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.css b/plugins/jetpack/modules/sharedaddy/sharing.css
index 3b8bbaad..3d6565bf 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.css
+++ b/plugins/jetpack/modules/sharedaddy/sharing.css
@@ -237,18 +237,18 @@ body .sd-content ul li.share-custom.no-icon a span {
.sd-social-icon-text .sd-content li.share-tumblr a:before {
content: '\f214';
}
-.sd-social-icon .sd-content ul li.share-stumbleupon a:before,
-.sd-social-text .sd-content ul li.share-stumbleupon a:before,
-.sd-content ul li.share-stumbleupon div.option.option-smart-off a:before,
-.sd-social-icon-text .sd-content li.share-stumbleupon a:before {
- content: '\f223';
-}
.sd-social-icon .sd-content ul li.share-pocket a:before,
.sd-social-text .sd-content ul li.share-pocket a:before,
.sd-content ul li.share-pocket div.option.option-smart-off a:before,
.sd-social-icon-text .sd-content li.share-pocket a:before {
content: '\f224';
}
+.sd-social-icon .sd-content ul li.share-skype a:before,
+.sd-social-text .sd-content ul li.share-skype a:before,
+.sd-content ul li.share-skype div.option.option-smart-off a:before,
+.sd-social-icon-text .sd-content li.share-skype a:before {
+ content: '\f220';
+}
.sd-social-icon .sd-content ul li.share-pinterest a:before,
.sd-social-text .sd-content ul li.share-pinterest a:before,
.sd-content ul li.share-pinterest div.option.option-smart-off a:before,
@@ -339,13 +339,16 @@ body .sd-content ul li.share-custom.no-icon a span {
width: 98px;
}
-.sd-social-official .sd-content .twitter_button iframe {
- width: 96px;
+.sd-social-official .sd-content .skypeShare {
+ width: 55px;
}
-
/* Individual official buttons */
-.stumbleupon_button iframe, .reddit_button iframe {
+.googleplus1_button .g-plus {
+ vertical-align: top !important;
+}
+
+.reddit_button iframe {
margin-top: 1px;
}
@@ -526,11 +529,6 @@ body .sd-social-icon .sd-content li.share-custom a span {
color: #fff !important;
}
-.sd-social-icon .sd-content ul li[class*='share-'].share-stumbleupon a.sd-button {
- background: #ea4b24;
- color: #fff !important;
-}
-
.sd-social-icon .sd-content ul li[class*='share-'].share-twitter a.sd-button {
background: #00acee;
color: #fff !important;
@@ -565,6 +563,11 @@ body .sd-social-icon .sd-content li.share-custom a span {
color: #fff !important;
}
+.sd-social-icon .sd-content ul li[class*='share-'].share-skype a.sd-button {
+ background: #00AFF0;
+ color: #fff !important;
+}
+
.sd-social-icon .sd-content ul li[class*='share-'].share-reddit a.sd-button {
background: #cee3f8;
color: #555555 !important;
@@ -677,4 +680,3 @@ div.sharedaddy.sharedaddy-dark #sharing_email {
height: 123px;
margin: 0 0 1em 0;
}
-
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.js b/plugins/jetpack/modules/sharedaddy/sharing.js
index 37da0889..1c1d6aa0 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.js
+++ b/plugins/jetpack/modules/sharedaddy/sharing.js
@@ -1,12 +1,10 @@
-/* global WPCOM_sharing_counts, Recaptcha */
+/* global WPCOM_sharing_counts, grecaptcha */
var sharing_js_options;
if ( sharing_js_options && sharing_js_options.counts ) {
var WPCOMSharing = {
done_urls : [],
- twitter_count : {},
get_counts : function() {
- var facebookPostIds = [],
- https_url, http_url, url, urls, id, service, service_url, path_ending;
+ var url, requests, id, service, service_request;
if ( 'undefined' === typeof WPCOM_sharing_counts ) {
return;
@@ -19,25 +17,10 @@ if ( sharing_js_options && sharing_js_options.counts ) {
continue;
}
- // get both the http and https version of these URLs
- https_url = encodeURIComponent( url.replace( /^http:\/\//i, 'https://' ) );
- http_url = encodeURIComponent( url.replace( /^https:\/\//i, 'http://' ) );
-
- if ( jQuery( 'a[data-shared=sharing-facebook-' + id + ']' ).length ) {
- facebookPostIds.push( id );
- }
-
- urls = {
- twitter: [
- 'https://cdn.api.twitter.com/1/urls/count.json?callback=WPCOMSharing.update_twitter_count&url=' +
- http_url,
- 'https://cdn.api.twitter.com/1/urls/count.json?callback=WPCOMSharing.update_twitter_count&url=' +
- https_url
- ],
+ requests = {
// LinkedIn actually gets the share count for both the http and https version automatically -- so we don't need to do extra magic
linkedin: [
- window.location.protocol +
- '//www.linkedin.com/countserv/count/share?format=jsonp&callback=WPCOMSharing.update_linkedin_count&url=' +
+ 'https://www.linkedin.com/countserv/count/share?format=jsonp&callback=WPCOMSharing.update_linkedin_count&url=' +
encodeURIComponent( url )
],
// Pinterest, like LinkedIn, handles share counts for both http and https
@@ -45,90 +28,60 @@ if ( sharing_js_options && sharing_js_options.counts ) {
window.location.protocol +
'//api.pinterest.com/v1/urls/count.json?callback=WPCOMSharing.update_pinterest_count&url=' +
encodeURIComponent( url )
+ ],
+ // Facebook protocol summing has been shown to falsely double counts, so we only request the current URL
+ facebook: [
+ window.location.protocol +
+ '//graph.facebook.com/?callback=WPCOMSharing.update_facebook_count&ids=' +
+ encodeURIComponent( url )
]
};
- for ( service in urls ) {
+ for ( service in requests ) {
if ( ! jQuery( 'a[data-shared=sharing-' + service + '-' + id + ']' ).length ) {
continue;
}
- while ( ( service_url = urls[ service ].pop() ) ) {
- jQuery.getScript( service_url );
+ while ( ( service_request = requests[ service ].pop() ) ) {
+ jQuery.getScript( service_request );
}
+
+ WPCOMSharing.bump_sharing_count_stat( service );
}
WPCOMSharing.done_urls[ id ] = true;
}
-
- if ( facebookPostIds.length && ( 'WPCOM_site_ID' in window ) ) {
- path_ending = window.WPCOM_jetpack ? 'jetpack-count' : 'count';
- jQuery.ajax({
- dataType: 'jsonp',
- url: 'https://public-api.wordpress.com/rest/v1.1/sites/' + window.WPCOM_site_ID + '/sharing-buttons/facebook/' + path_ending,
- jsonpCallback: 'WPCOMSharing.update_facebook_count',
- data: { post_ID: facebookPostIds },
- success: WPCOMSharing.update_facebook_count,
- cache: true
- });
- }
},
// get the version of the url that was stored in the dom (sharing-$service-URL)
get_permalink: function( url ) {
- var rxTrailingSlash, formattedSlashUrl;
-
if ( 'https:' === window.location.protocol ) {
url = url.replace( /^http:\/\//i, 'https://' );
} else {
url = url.replace( /^https:\/\//i, 'http://' );
}
- // Some services (e.g. Twitter) canonicalize the URL with a trailing
- // slash. We can account for this by checking whether either format
- // exists as a known URL
- if ( ! ( url in WPCOM_sharing_counts ) ) {
- rxTrailingSlash = /\/$/,
- formattedSlashUrl = rxTrailingSlash.test( url ) ?
- url.replace( rxTrailingSlash, '' ) : url + '/';
-
- if ( formattedSlashUrl in WPCOM_sharing_counts ) {
- url = formattedSlashUrl;
- }
- }
-
return url;
},
- update_facebook_count : function( data ) {
- var index, length, post;
+ update_facebook_count: function( data ) {
+ var url, permalink;
- if ( ! data || ! data.counts ) {
+ if ( ! data ) {
return;
}
- for ( index = 0, length = data.counts.length; index < length; index++ ) {
- post = data.counts[ index ];
-
- if ( ! post.post_ID || ! post.count ) {
+ for ( url in data ) {
+ if ( ! data.hasOwnProperty( url ) || ! data[ url ].shares ) {
continue;
}
- WPCOMSharing.inject_share_count( 'sharing-facebook-' + post.post_ID, post.count );
- }
- },
- update_twitter_count : function( data ) {
- if ( 'number' === typeof data.count ) {
- var permalink = WPCOMSharing.get_permalink( data.url );
+ permalink = WPCOMSharing.get_permalink( url );
- if ( ! WPCOMSharing.twitter_count[ permalink ] ) {
- WPCOMSharing.twitter_count[ permalink ] = 0;
+ if ( ! ( permalink in WPCOM_sharing_counts ) ) {
+ continue;
}
- WPCOMSharing.twitter_count[ permalink ] += data.count;
-
- if ( WPCOMSharing.twitter_count[ permalink ] > 0 ) {
- WPCOMSharing.inject_share_count( 'sharing-twitter-' + WPCOM_sharing_counts[ permalink ], WPCOMSharing.twitter_count[ permalink ] );
- }
+ WPCOMSharing.inject_share_count( 'sharing-facebook-' + WPCOM_sharing_counts[ permalink ], data[ url ].shares );
}
},
update_linkedin_count : function( data ) {
@@ -154,6 +107,9 @@ if ( sharing_js_options && sharing_js_options.counts ) {
return String( count ).substring( 0, 1 ) + 'K+';
}
return '10K+';
+ },
+ bump_sharing_count_stat: function( service ) {
+ new Image().src = document.location.protocol + '//pixel.wp.com/g.gif?v=wpcom-no-pv&x_sharing-count-request=' + service + '&r=' + Math.random();
}
};
}
@@ -176,7 +132,9 @@ if ( sharing_js_options && sharing_js_options.counts ) {
function WPCOMSharing_do() {
var $more_sharing_buttons;
- WPCOMSharing.get_counts();
+ if ( 'undefined' !== typeof WPCOMSharing ) {
+ WPCOMSharing.get_counts();
+ }
$more_sharing_buttons = $( '.sharedaddy a.sharing-anchor' );
$more_sharing_buttons.click( function() {
@@ -381,7 +339,7 @@ if ( sharing_js_options && sharing_js_options.counts ) {
// Email button
$( 'a.share-email', this ).on( 'click', function() {
- var url = $( this ).attr( 'href' ), key;
+ var url = $( this ).attr( 'href' );
if ( $sharing_email.is( ':visible' ) ) {
$sharing_email.slideUp( 200 );
@@ -393,14 +351,11 @@ if ( sharing_js_options && sharing_js_options.counts ) {
$( '#sharing_email form input[type=submit]' ).removeAttr( 'disabled' );
$( '#sharing_email form a.sharing_cancel' ).show();
- key = '';
- if ( $( '#recaptcha_public_key' ).length > 0 ) {
- key = $( '#recaptcha_public_key' ).val();
+ // Reset reCATPCHA if exists.
+ if ( 'object' === typeof grecaptcha && 'function' === typeof grecaptcha.reset ) {
+ grecaptcha.reset();
}
- // Update the recaptcha
- Recaptcha.create( key, 'sharing_recaptcha', { lang : sharing_js_options.lang } );
-
// Show dialog
$sharing_email.css( {
left: $( this ).offset().left + 'px',
@@ -448,7 +403,10 @@ if ( sharing_js_options && sharing_js_options.counts ) {
$( '#sharing_email .errors-' + response ).show();
form.find( 'input[type=submit]' ).removeAttr( 'disabled' );
form.find( 'a.sharing_cancel' ).show();
- Recaptcha.reload();
+
+ if ( 'object' === typeof grecaptcha && 'function' === typeof grecaptcha.reset ) {
+ grecaptcha.reset();
+ }
}
else {
$( '#sharing_email form' ).hide();
@@ -481,36 +439,3 @@ if ( sharing_js_options && sharing_js_options.counts ) {
$( 'li.share-email, li.share-custom a.sharing-anchor' ).addClass( 'share-service-visible' );
}
})( jQuery );
-
-// Recaptcha code
-/* jshint ignore:start */
-var RecaptchaTemplates={};RecaptchaTemplates.VertHtml='<table id="recaptcha_table" class="recaptchatable" > <tr> <td colspan="6" class=\'recaptcha_r1_c1\'></td> </tr> <tr> <td class=\'recaptcha_r2_c1\'></td> <td colspan="4" class=\'recaptcha_image_cell\'><div id="recaptcha_image"></div></td> <td class=\'recaptcha_r2_c2\'></td> </tr> <tr> <td rowspan="6" class=\'recaptcha_r3_c1\'></td> <td colspan="4" class=\'recaptcha_r3_c2\'></td> <td rowspan="6" class=\'recaptcha_r3_c3\'></td> </tr> <tr> <td rowspan="3" class=\'recaptcha_r4_c1\' height="49"> <div class="recaptcha_input_area"> <label for="recaptcha_response_field" class="recaptcha_input_area_text"><span id="recaptcha_instructions_image" class="recaptcha_only_if_image recaptcha_only_if_no_incorrect_sol"></span><span id="recaptcha_instructions_audio" class="recaptcha_only_if_no_incorrect_sol recaptcha_only_if_audio"></span><span id="recaptcha_instructions_error" class="recaptcha_only_if_incorrect_sol"></span></label><br/> <input name="recaptcha_response_field" id="recaptcha_response_field" type="text" /> </div> </td> <td rowspan="4" class=\'recaptcha_r4_c2\'></td> <td><a id=\'recaptcha_reload_btn\'><img id=\'recaptcha_reload\' width="25" height="17" /></a></td> <td rowspan="4" class=\'recaptcha_r4_c4\'></td> </tr> <tr> <td><a id=\'recaptcha_switch_audio_btn\' class="recaptcha_only_if_image"><img id=\'recaptcha_switch_audio\' width="25" height="16" alt="" /></a><a id=\'recaptcha_switch_img_btn\' class="recaptcha_only_if_audio"><img id=\'recaptcha_switch_img\' width="25" height="16" alt=""/></a></td> </tr> <tr> <td><a id=\'recaptcha_whatsthis_btn\'><img id=\'recaptcha_whatsthis\' width="25" height="16" /></a></td> </tr> <tr> <td class=\'recaptcha_r7_c1\'></td> <td class=\'recaptcha_r8_c1\'></td> </tr> </table> ';RecaptchaTemplates.CleanCss=".recaptchatable td img{display:block}.recaptchatable .recaptcha_image_cell center img{height:57px}.recaptchatable .recaptcha_image_cell center{height:57px}.recaptchatable .recaptcha_image_cell{background-color:white;height:57px;padding:7px!important}.recaptchatable,#recaptcha_area tr,#recaptcha_area td,#recaptcha_area th{margin:0!important;border:0!important;border-collapse:collapse!important;vertical-align:middle!important}.recaptchatable *{margin:0;padding:0;border:0;color:black;position:static;top:auto;left:auto;right:auto;bottom:auto;text-align:left!important}.recaptchatable #recaptcha_image{margin:auto;border:1px solid #dfdfdf!important}.recaptchatable a img{border:0}.recaptchatable a,.recaptchatable a:hover{-moz-outline:none;border:0!important;padding:0!important;text-decoration:none;color:blue;background:none!important;font-weight:normal}.recaptcha_input_area{position:relative!important;background:none!important}.recaptchatable label.recaptcha_input_area_text{border:1px solid #dfdfdf!important;margin:0!important;padding:0!important;position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important}.recaptcha_theme_red label.recaptcha_input_area_text,.recaptcha_theme_white label.recaptcha_input_area_text{color:black!important}.recaptcha_theme_blackglass label.recaptcha_input_area_text{color:white!important}.recaptchatable #recaptcha_response_field{font-size:11pt}.recaptcha_theme_blackglass #recaptcha_response_field,.recaptcha_theme_white #recaptcha_response_field{border:1px solid gray}.recaptcha_theme_red #recaptcha_response_field{border:1px solid #cca940}.recaptcha_audio_cant_hear_link{font-size:7pt;color:black}.recaptchatable{line-height:1em;border:1px solid #dfdfdf!important}.recaptcha_error_text{color:red}";RecaptchaTemplates.CleanHtml='<table id="recaptcha_table" class="recaptchatable"> <tr height="73"> <td class=\'recaptcha_image_cell\' width="302"><center><div id="recaptcha_image"></div></center></td> <td style="padding: 10px 7px 7px 7px;"> <a id=\'recaptcha_reload_btn\'><img id=\'recaptcha_reload\' width="25" height="18" alt="" /></a> <a id=\'recaptcha_switch_audio_btn\' class="recaptcha_only_if_image"><img id=\'recaptcha_switch_audio\' width="25" height="15" alt="" /></a><a id=\'recaptcha_switch_img_btn\' class="recaptcha_only_if_audio"><img id=\'recaptcha_switch_img\' width="25" height="15" alt=""/></a> <a id=\'recaptcha_whatsthis_btn\'><img id=\'recaptcha_whatsthis\' width="25" height="16" /></a> </td> <td style="padding: 18px 7px 18px 7px;"> <img id=\'recaptcha_logo\' alt="" width="71" height="36" /> </td> </tr> <tr> <td style="padding-left: 7px;"> <div class="recaptcha_input_area" style="padding-top: 2px; padding-bottom: 7px;"> <input style="border: 1px solid #3c3c3c; width: 302px;" name="recaptcha_response_field" id="recaptcha_response_field" type="text" /> </div> </td> <td></td> <td style="padding: 4px 7px 12px 7px;"> <img id="recaptcha_tagline" width="71" height="17" /> </td> </tr> </table> ';RecaptchaTemplates.ContextHtml='<table id="recaptcha_table" class="recaptchatable"> <tr> <td colspan="6" class=\'recaptcha_r1_c1\'></td> </tr> <tr> <td class=\'recaptcha_r2_c1\'></td> <td colspan="4" class=\'recaptcha_image_cell\'><div id="recaptcha_image"></div></td> <td class=\'recaptcha_r2_c2\'></td> </tr> <tr> <td rowspan="6" class=\'recaptcha_r3_c1\'></td> <td colspan="4" class=\'recaptcha_r3_c2\'></td> <td rowspan="6" class=\'recaptcha_r3_c3\'></td> </tr> <tr> <td rowspan="3" class=\'recaptcha_r4_c1\' height="49"> <div class="recaptcha_input_area"> <label for="recaptcha_response_field" class="recaptcha_input_area_text"><span id="recaptcha_instructions_context" class="recaptcha_only_if_image recaptcha_only_if_no_incorrect_sol"></span><span id="recaptcha_instructions_audio" class="recaptcha_only_if_no_incorrect_sol recaptcha_only_if_audio"></span><span id="recaptcha_instructions_error" class="recaptcha_only_if_incorrect_sol"></span></label><br/> <input name="recaptcha_response_field" id="recaptcha_response_field" type="text" /> </div> </td> <td rowspan="4" class=\'recaptcha_r4_c2\'></td> <td><a id=\'recaptcha_reload_btn\'><img id=\'recaptcha_reload\' width="25" height="17" /></a></td> <td rowspan="4" class=\'recaptcha_r4_c4\'></td> </tr> <tr> <td><a id=\'recaptcha_switch_audio_btn\' class="recaptcha_only_if_image"><img id=\'recaptcha_switch_audio\' width="25" height="16" alt="" /></a><a id=\'recaptcha_switch_img_btn\' class="recaptcha_only_if_audio"><img id=\'recaptcha_switch_img\' width="25" height="16" alt=""/></a></td> </tr> <tr> <td><a id=\'recaptcha_whatsthis_btn\'><img id=\'recaptcha_whatsthis\' width="25" height="16" /></a></td> </tr> <tr> <td class=\'recaptcha_r7_c1\'></td> <td class=\'recaptcha_r8_c1\'></td> </tr> </table> ';RecaptchaTemplates.VertCss=".recaptchatable td img{display:block}.recaptchatable .recaptcha_r1_c1{background:url(IMGROOT/sprite.png) 0 -63px no-repeat;width:318px;height:9px}.recaptchatable .recaptcha_r2_c1{background:url(IMGROOT/sprite.png) -18px 0 no-repeat;width:9px;height:57px}.recaptchatable .recaptcha_r2_c2{background:url(IMGROOT/sprite.png) -27px 0 no-repeat;width:9px;height:57px}.recaptchatable .recaptcha_r3_c1{background:url(IMGROOT/sprite.png) 0 0 no-repeat;width:9px;height:63px}.recaptchatable .recaptcha_r3_c2{background:url(IMGROOT/sprite.png) -18px -57px no-repeat;width:300px;height:6px}.recaptchatable .recaptcha_r3_c3{background:url(IMGROOT/sprite.png) -9px 0 no-repeat;width:9px;height:63px}.recaptchatable .recaptcha_r4_c1{background:url(IMGROOT/sprite.png) -43px 0 no-repeat;width:171px;height:49px}.recaptchatable .recaptcha_r4_c2{background:url(IMGROOT/sprite.png) -36px 0 no-repeat;width:7px;height:57px}.recaptchatable .recaptcha_r4_c4{background:url(IMGROOT/sprite.png) -214px 0 no-repeat;width:97px;height:57px}.recaptchatable .recaptcha_r7_c1{background:url(IMGROOT/sprite.png) -43px -49px no-repeat;width:171px;height:8px}.recaptchatable .recaptcha_r8_c1{background:url(IMGROOT/sprite.png) -43px -49px no-repeat;width:25px;height:8px}.recaptchatable .recaptcha_image_cell center img{height:57px}.recaptchatable .recaptcha_image_cell center{height:57px}.recaptchatable .recaptcha_image_cell{background-color:white;height:57px}#recaptcha_area,#recaptcha_table{width:318px!important}.recaptchatable,#recaptcha_area tr,#recaptcha_area td,#recaptcha_area th{margin:0!important;border:0!important;padding:0!important;border-collapse:collapse!important;vertical-align:middle!important}.recaptchatable *{margin:0;padding:0;border:0;font-family:helvetica,sans-serif;font-size:8pt;color:black;position:static;top:auto;left:auto;right:auto;bottom:auto;text-align:left!important}.recaptchatable #recaptcha_image{margin:auto}.recaptchatable img{border:0!important;margin:0!important;padding:0!important}.recaptchatable a,.recaptchatable a:hover{-moz-outline:none;border:0!important;padding:0!important;text-decoration:none;color:blue;background:none!important;font-weight:normal}.recaptcha_input_area{position:relative!important;width:146px!important;height:45px!important;margin-left:20px!important;margin-right:5px!important;margin-top:4px!important;background:none!important}.recaptchatable label.recaptcha_input_area_text{margin:0!important;padding:0!important;position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;background:none!important;height:auto!important;width:auto!important}.recaptcha_theme_red label.recaptcha_input_area_text,.recaptcha_theme_white label.recaptcha_input_area_text{color:black!important}.recaptcha_theme_blackglass label.recaptcha_input_area_text{color:white!important}.recaptchatable #recaptcha_response_field{width:145px!important;position:absolute!important;bottom:7px!important;padding:0!important;margin:0!important;font-size:10pt}.recaptcha_theme_blackglass #recaptcha_response_field,.recaptcha_theme_white #recaptcha_response_field{border:1px solid gray}.recaptcha_theme_red #recaptcha_response_field{border:1px solid #cca940}.recaptcha_audio_cant_hear_link{font-size:7pt;color:black}.recaptchatable{line-height:1em}#recaptcha_instructions_error{color:red!important}";var RecaptchaStr_en={visual_challenge:"Get a visual challenge",audio_challenge:"Get an audio challenge",refresh_btn:"Get a new challenge",instructions_visual:"Type the two words:",instructions_context:"Type the words in the boxes:",instructions_audio:"Type what you hear:",help_btn:"Help",play_again:"Play sound again",cant_hear_this:"Download sound as MP3",incorrect_try_again:"Incorrect. Try again."},RecaptchaStr_de={visual_challenge:"Visuelle Aufgabe generieren",audio_challenge:"Audio-Aufgabe generieren",
-refresh_btn:"Neue Aufgabe generieren",instructions_visual:"Gib die 2 W\u00f6rter ein:",instructions_context:"",instructions_audio:"Gib die 8 Ziffern ein:",help_btn:"Hilfe",incorrect_try_again:"Falsch. Nochmals versuchen!"},RecaptchaStr_es={visual_challenge:"Obt\u00e9n un reto visual",audio_challenge:"Obt\u00e9n un reto audible",refresh_btn:"Obt\u00e9n un nuevo reto",instructions_visual:"Escribe las 2 palabras:",instructions_context:"",instructions_audio:"Escribe los 8 n\u00fameros:",help_btn:"Ayuda",
-incorrect_try_again:"Incorrecto. Otro intento."},RecaptchaStr_fr={visual_challenge:"D\u00e9fi visuel",audio_challenge:"D\u00e9fi audio",refresh_btn:"Nouveau d\u00e9fi",instructions_visual:"Entrez les deux mots:",instructions_context:"",instructions_audio:"Entrez les huit chiffres:",help_btn:"Aide",incorrect_try_again:"Incorrect."},RecaptchaStr_nl={visual_challenge:"Test me via een afbeelding",audio_challenge:"Test me via een geluidsfragment",refresh_btn:"Nieuwe uitdaging",instructions_visual:"Type de twee woorden:",
-instructions_context:"",instructions_audio:"Type de acht cijfers:",help_btn:"Help",incorrect_try_again:"Foute invoer."},RecaptchaStr_pt={visual_challenge:"Obter um desafio visual",audio_challenge:"Obter um desafio sonoro",refresh_btn:"Obter um novo desafio",instructions_visual:"Escreva as 2 palavras:",instructions_context:"",instructions_audio:"Escreva os 8 numeros:",help_btn:"Ajuda",incorrect_try_again:"Incorrecto. Tenta outra vez."},RecaptchaStr_ru={visual_challenge:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",
-audio_challenge:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0437\u0432\u0443\u043a\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",refresh_btn:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443",instructions_visual:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0432\u0430 \u0441\u043b\u043e\u0432\u0430:",instructions_context:"",instructions_audio:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u043e\u0441\u0435\u043c\u044c \u0447\u0438\u0441\u0435\u043b:",
-help_btn:"\u041f\u043e\u043c\u043e\u0449\u044c",incorrect_try_again:"\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e."},RecaptchaStr_tr={visual_challenge:"G\u00f6rsel deneme",audio_challenge:"\u0130\u015fitsel deneme",refresh_btn:"Yeni deneme",instructions_visual:"\u0130ki kelimeyi yaz\u0131n:",instructions_context:"",instructions_audio:"Sekiz numaray\u0131 yaz\u0131n:",help_btn:"Yard\u0131m (\u0130ngilizce)",incorrect_try_again:"Yanl\u0131\u015f. Bir daha deneyin."},RecaptchaStr_it=
-{visual_challenge:"Modalit\u00e0 visiva",audio_challenge:"Modalit\u00e0 auditiva",refresh_btn:"Chiedi due nuove parole",instructions_visual:"Scrivi le due parole:",instructions_context:"",instructions_audio:"Trascrivi ci\u00f2 che senti:",help_btn:"Aiuto",incorrect_try_again:"Scorretto. Riprova."},RecaptchaLangMap={en:RecaptchaStr_en,de:RecaptchaStr_de,es:RecaptchaStr_es,fr:RecaptchaStr_fr,nl:RecaptchaStr_nl,pt:RecaptchaStr_pt,ru:RecaptchaStr_ru,tr:RecaptchaStr_tr,it:RecaptchaStr_it};var RecaptchaStr=RecaptchaStr_en,RecaptchaOptions,RecaptchaDefaultOptions={tabindex:0,theme:"red",callback:null,lang:"en",custom_theme_widget:null,custom_translations:null,includeContext:false},Recaptcha={widget:null,timer_id:-1,style_set:false,theme:null,type:"image",ajax_verify_cb:null,$:function(a){return typeof a=="string"?document.getElementById(a):a},create:function(a,b,c){Recaptcha.destroy();if(b)Recaptcha.widget=Recaptcha.$(b);Recaptcha._init_options(c);Recaptcha._call_challenge(a)},destroy:function(){var a=
-Recaptcha.$("recaptcha_challenge_field");a&&a.parentNode.removeChild(a);Recaptcha.timer_id!=-1&&clearInterval(Recaptcha.timer_id);Recaptcha.timer_id=-1;if(a=Recaptcha.$("recaptcha_image"))a.innerHTML="";if(Recaptcha.widget){if(Recaptcha.theme!="custom")Recaptcha.widget.innerHTML="";else Recaptcha.widget.style.display="none";Recaptcha.widget=null}},focus_response_field:function(){var a=Recaptcha.$;a=a("recaptcha_response_field");a.focus()},get_challenge:function(){if(typeof RecaptchaState=="undefined")return null;
-return RecaptchaState.challenge},get_response:function(){var a=Recaptcha.$;a=a("recaptcha_response_field");if(!a)return null;return a.value},ajax_verify:function(a){Recaptcha.ajax_verify_cb=a;a=Recaptcha._get_api_server()+"/ajaxverify?c="+encodeURIComponent(Recaptcha.get_challenge())+"&response="+encodeURIComponent(Recaptcha.get_response());Recaptcha._add_script(a)},_ajax_verify_callback:function(a){Recaptcha.ajax_verify_cb(a)},_get_api_server:function(){var a=window.location.protocol,b;b=typeof _RecaptchaOverrideApiServer!=
-"undefined"?_RecaptchaOverrideApiServer:"www.google.com/recaptcha/api";return a+"//"+b},_call_challenge:function(a){a=Recaptcha._get_api_server()+"/challenge?k="+a+"&ajax=1&cachestop="+Math.random();if(typeof RecaptchaOptions.extra_challenge_params!="undefined")a+="&"+RecaptchaOptions.extra_challenge_params;if(RecaptchaOptions.includeContext)a+="&includeContext=1";Recaptcha._add_script(a)},_add_script:function(a){var b=document.createElement("script");b.type="text/javascript";b.src=a;Recaptcha._get_script_area().appendChild(b)},
-_get_script_area:function(){var a=document.getElementsByTagName("head");return a=!a||a.length<1?document.body:a[0]},_hash_merge:function(a){var b={};for(var c in a)for(var d in a[c])b[d]=a[c][d];if(b.theme=="context")b.includeContext=true;return b},_init_options:function(a){RecaptchaOptions=Recaptcha._hash_merge([RecaptchaDefaultOptions,a||{}])},challenge_callback:function(){Recaptcha._reset_timer();RecaptchaStr=Recaptcha._hash_merge([RecaptchaStr_en,RecaptchaLangMap[RecaptchaOptions.lang]||{},RecaptchaOptions.custom_translations||
-{}]);window.addEventListener&&window.addEventListener("unload",function(){Recaptcha.destroy()},false);Recaptcha._is_ie()&&window.attachEvent&&window.attachEvent("onbeforeunload",function(){});if(navigator.userAgent.indexOf("KHTML")>0){var a=document.createElement("iframe");a.src="about:blank";a.style.height="0px";a.style.width="0px";a.style.visibility="hidden";a.style.border="none";var b=document.createTextNode("This frame prevents back/forward cache problems in Safari.");a.appendChild(b);document.body.appendChild(a)}Recaptcha._finish_widget()},
-_add_css:function(a){var b=document.createElement("style");b.type="text/css";if(b.styleSheet)if(navigator.appVersion.indexOf("MSIE 5")!=-1)document.write("<style type='text/css'>"+a+"</style>");else b.styleSheet.cssText=a;else if(navigator.appVersion.indexOf("MSIE 5")!=-1)document.write("<style type='text/css'>"+a+"</style>");else{a=document.createTextNode(a);b.appendChild(a)}Recaptcha._get_script_area().appendChild(b)},_set_style:function(a){if(!Recaptcha.style_set){Recaptcha.style_set=true;Recaptcha._add_css(a+
-"\n\n.recaptcha_is_showing_audio .recaptcha_only_if_image,.recaptcha_isnot_showing_audio .recaptcha_only_if_audio,.recaptcha_had_incorrect_sol .recaptcha_only_if_no_incorrect_sol,.recaptcha_nothad_incorrect_sol .recaptcha_only_if_incorrect_sol{display:none !important}")}},_init_builtin_theme:function(){var a=Recaptcha.$,b=RecaptchaStr,c=RecaptchaState,d,e;c=c.server;if(c[c.length-1]=="/")c=c.substring(0,c.length-1);var f=c+"/img/"+Recaptcha.theme;if(Recaptcha.theme=="clean"){c=RecaptchaTemplates.CleanCss;
-d=RecaptchaTemplates.CleanHtml;e="png"}else{if(Recaptcha.theme=="context"){c=RecaptchaTemplates.VertCss;d=RecaptchaTemplates.ContextHtml}else{c=RecaptchaTemplates.VertCss;d=RecaptchaTemplates.VertHtml}e="gif"}c=c.replace(/IMGROOT/g,f);Recaptcha._set_style(c);Recaptcha.widget.innerHTML="<div id='recaptcha_area'>"+d+"</div>";a("recaptcha_reload").src=f+"/refresh."+e;a("recaptcha_switch_audio").src=f+"/audio."+e;a("recaptcha_switch_img").src=f+"/text."+e;a("recaptcha_whatsthis").src=f+"/help."+e;if(Recaptcha.theme==
-"clean"){a("recaptcha_logo").src=f+"/logo."+e;a("recaptcha_tagline").src=f+"/tagline."+e}a("recaptcha_reload").alt=b.refresh_btn;a("recaptcha_switch_audio").alt=b.audio_challenge;a("recaptcha_switch_img").alt=b.visual_challenge;a("recaptcha_whatsthis").alt=b.help_btn;a("recaptcha_reload_btn").href="javascript:Recaptcha.reload ();";a("recaptcha_reload_btn").title=b.refresh_btn;a("recaptcha_switch_audio_btn").href="javascript:Recaptcha.switch_type('audio');";a("recaptcha_switch_audio_btn").title=b.audio_challenge;
-a("recaptcha_switch_img_btn").href="javascript:Recaptcha.switch_type('image');";a("recaptcha_switch_img_btn").title=b.visual_challenge;a("recaptcha_whatsthis_btn").href=Recaptcha._get_help_link();a("recaptcha_whatsthis_btn").target="_blank";a("recaptcha_whatsthis_btn").title=b.help_btn;a("recaptcha_whatsthis_btn").onclick=function(){Recaptcha.showhelp();return false};a("recaptcha_table").className="recaptchatable recaptcha_theme_"+Recaptcha.theme;a("recaptcha_instructions_image")&&a("recaptcha_instructions_image").appendChild(document.createTextNode(b.instructions_visual));
-a("recaptcha_instructions_context")&&a("recaptcha_instructions_context").appendChild(document.createTextNode(b.instructions_context));a("recaptcha_instructions_audio")&&a("recaptcha_instructions_audio").appendChild(document.createTextNode(b.instructions_audio));a("recaptcha_instructions_error")&&a("recaptcha_instructions_error").appendChild(document.createTextNode(b.incorrect_try_again))},_finish_widget:function(){var a=Recaptcha.$,b=RecaptchaState,c=RecaptchaOptions,d=c.theme;switch(d){case "red":case "white":case "blackglass":case "clean":case "custom":case "context":break;
-default:d="red";break}if(!Recaptcha.theme)Recaptcha.theme=d;Recaptcha.theme!="custom"?Recaptcha._init_builtin_theme():Recaptcha._set_style("");d=document.createElement("span");d.id="recaptcha_challenge_field_holder";d.style.display="none";a("recaptcha_response_field").parentNode.insertBefore(d,a("recaptcha_response_field"));a("recaptcha_response_field").setAttribute("autocomplete","off");a("recaptcha_image").style.width="300px";a("recaptcha_image").style.height="57px";Recaptcha.should_focus=false;
-Recaptcha._set_challenge(b.challenge,"image");if(c.tabindex){a("recaptcha_response_field").tabIndex=c.tabindex;if(Recaptcha.theme!="custom"){a("recaptcha_whatsthis_btn").tabIndex=c.tabindex;a("recaptcha_switch_img_btn").tabIndex=c.tabindex;a("recaptcha_switch_audio_btn").tabIndex=c.tabindex;a("recaptcha_reload_btn").tabIndex=c.tabindex}}if(Recaptcha.widget)Recaptcha.widget.style.display="";c.callback&&c.callback()},switch_type:function(a){var b=Recaptcha;b.type=a;b.reload(b.type=="audio"?"a":"v")},
-reload:function(a){var b=Recaptcha,c=RecaptchaState;if(typeof a=="undefined")a="r";c=c.server+"reload?c="+c.challenge+"&k="+c.site+"&reason="+a+"&type="+b.type+"&lang="+RecaptchaOptions.lang;if(RecaptchaOptions.includeContext)c+="&includeContext=1";if(typeof RecaptchaOptions.extra_challenge_params!="undefined")c+="&"+RecaptchaOptions.extra_challenge_params;if(b.type=="audio")c+=RecaptchaOptions.audio_beta_12_08?"&audio_beta_12_08=1":"&new_audio_default=1";b.should_focus=a!="t";b._add_script(c)},finish_reload:function(a,
-b){RecaptchaState.is_incorrect=false;Recaptcha._set_challenge(a,b)},_set_challenge:function(a,b){var c=Recaptcha,d=RecaptchaState,e=c.$;d.challenge=a;c.type=b;e("recaptcha_challenge_field_holder").innerHTML="<input type='hidden' name='recaptcha_challenge_field' id='recaptcha_challenge_field' value='"+d.challenge+"'/>";if(b=="audio")e("recaptcha_image").innerHTML=Recaptcha.getAudioCaptchaHtml();else if(b=="image"){var f=d.server+"image?c="+d.challenge;e("recaptcha_image").innerHTML="<img style='display:block;' height='57' width='300' src='"+
-f+"'/>"}Recaptcha._css_toggle("recaptcha_had_incorrect_sol","recaptcha_nothad_incorrect_sol",d.is_incorrect);Recaptcha._css_toggle("recaptcha_is_showing_audio","recaptcha_isnot_showing_audio",b=="audio");c._clear_input();c.should_focus&&c.focus_response_field();c._reset_timer()},_reset_timer:function(){var a=RecaptchaState;clearInterval(Recaptcha.timer_id);Recaptcha.timer_id=setInterval("Recaptcha.reload('t');",(a.timeout-300)*1E3)},showhelp:function(){window.open(Recaptcha._get_help_link(),"recaptcha_popup",
-"width=460,height=570,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes")},_clear_input:function(){var a=Recaptcha.$("recaptcha_response_field");a.value=""},_displayerror:function(a){var b=Recaptcha.$;b("recaptcha_image").innerHTML="";b("recaptcha_image").appendChild(document.createTextNode(a))},reloaderror:function(a){Recaptcha._displayerror(a)},_is_ie:function(){return navigator.userAgent.indexOf("MSIE")>0&&!window.opera},_css_toggle:function(a,b,c){var d=Recaptcha.widget;
-if(!d)d=document.body;var e=d.className;e=e.replace(RegExp("(^|\\s+)"+a+"(\\s+|$)")," ");e=e.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," ");e+=" "+(c?a:b);d.className=e},_get_help_link:function(){var a=RecaptchaOptions.lang;return"http://recaptcha.net/popuphelp/"+(a=="en"?"":a+".html")},playAgain:function(){var a=Recaptcha.$;a("recaptcha_image").innerHTML=Recaptcha.getAudioCaptchaHtml()},getAudioCaptchaHtml:function(){var a=Recaptcha,b=RecaptchaState,c=b.server+"image?c="+b.challenge;if(c.indexOf("https://")==
-0)c="http://"+c.substring(8);b=b.server+"/img/audiocaptcha.swf?v2";a=a._is_ie()?'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="audiocaptcha" width="0" height="0" codebase="https://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="'+b+'" /><param name="quality" value="high" /><param name="bgcolor" value="#869ca7" /><param name="allowScriptAccess" value="always" /></object><br/>':'<embed src="'+b+'" quality="high" bgcolor="#869ca7" width="0" height="0" name="audiocaptcha" align="middle" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"></embed> ';
-c=(Recaptcha.checkFlashVer()?'<br/><a class="recaptcha_audio_cant_hear_link" href="#" onclick="Recaptcha.playAgain(); return false;">'+RecaptchaStr.play_again+"</a>":"")+'<br/><a class="recaptcha_audio_cant_hear_link" target="_blank" href="'+c+'">'+RecaptchaStr.cant_hear_this+"</a>";return a+c},gethttpwavurl:function(){var a=RecaptchaState;if(Recaptcha.type=="audio"){a=a.server+"image?c="+a.challenge;if(a.indexOf("https://")==0)a="http://"+a.substring(8);return a}return""},checkFlashVer:function(){var a=
-navigator.appVersion.indexOf("MSIE")!=-1?true:false,b=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,c=navigator.userAgent.indexOf("Opera")!=-1?true:false,d=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){a=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";a=navigator.plugins["Shockwave Flash"+a].description;a=a.split(" ");a=a[2].split(".");d=a[0]}}else if(a&&b&&!c)try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),
-f=e.GetVariable("$version");d=f.split(" ")[1].split(",")[0]}catch(g){}return d>=9},getlang:function(){return RecaptchaOptions.lang}};
-/* jshint ignore:end */
diff --git a/plugins/jetpack/modules/sharedaddy/sharing.php b/plugins/jetpack/modules/sharedaddy/sharing.php
index 7ddd2ac9..74ad1059 100644
--- a/plugins/jetpack/modules/sharedaddy/sharing.php
+++ b/plugins/jetpack/modules/sharedaddy/sharing.php
@@ -24,17 +24,9 @@ class Sharing_Admin {
public function sharing_head() {
wp_enqueue_script( 'sharing-js', WP_SHARING_PLUGIN_URL.'admin-sharing.js', array( 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-form' ), 2 );
-
- // @todo: Remove this opt-out filter in the future
- if ( ( ! defined( 'IS_WPCOM' ) ) || ( ! IS_WPCOM ) || apply_filters( 'wpl_sharing_2014_1', true ) ) {
- wp_enqueue_style( 'sharing-admin', WP_SHARING_PLUGIN_URL.'admin-sharing.css', false, JETPACK__VERSION );
- wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL.'sharing.css', false, JETPACK__VERSION );
- wp_enqueue_style( 'genericons' );
- } else {
- wp_enqueue_style( 'sharing-admin', WP_SHARING_PLUGIN_URL.'admin-sharing-legacy.css', false, JETPACK__VERSION );
- wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL.'sharing-legacy.css', false, JETPACK__VERSION );
- }
-
+ wp_enqueue_style( 'sharing-admin', WP_SHARING_PLUGIN_URL.'admin-sharing.css', false, JETPACK__VERSION );
+ wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL.'sharing.css', false, JETPACK__VERSION );
+ wp_enqueue_style( 'genericons' );
wp_enqueue_script( 'sharing-js-fe', WP_SHARING_PLUGIN_URL . 'sharing.js', array( ), 4 );
add_thickbox();
@@ -52,6 +44,8 @@ class Sharing_Admin {
/**
* Fires when updating sharing settings.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*/
do_action( 'sharing_admin_update' );
@@ -178,12 +172,14 @@ class Sharing_Admin {
<div class="wrap">
<div class="icon32" id="icon-options-general"><br /></div>
- <h2><?php _e( 'Sharing Settings', 'jetpack' ); ?></h2>
+ <h1><?php _e( 'Sharing Settings', 'jetpack' ); ?></h1>
<?php
/**
* Fires at the top of the admin sharing settings screen.
*
+ * @module sharedaddy
+ *
* @since 1.6.0
*/
do_action( 'pre_admin_screen_sharing' );
@@ -192,7 +188,7 @@ class Sharing_Admin {
<?php if ( current_user_can( 'manage_options' ) ) : ?>
<div class="share_manage_options">
- <h3><?php _e( 'Sharing Buttons', 'jetpack' ) ?></h3>
+ <h2><?php _e( 'Sharing Buttons', 'jetpack' ) ?></h2>
<p><?php _e( 'Add sharing buttons to your blog and allow your visitors to share posts with their friends.', 'jetpack' ) ?></p>
<div id="services-config">
@@ -346,6 +342,8 @@ class Sharing_Admin {
/**
* Filters the HTML at the beginning of the "Show button on" row.
*
+ * @module sharedaddy
+ *
* @since 2.1.0
*
* @param string $var Opening HTML tag at the beginning of the "Show button on" row.
@@ -371,6 +369,8 @@ class Sharing_Admin {
/**
* Filters the HTML at the end of the "Show button on" row.
*
+ * @module sharedaddy
+ *
* @since 2.1.0
*
* @param string $var Closing HTML tag at the end of the "Show button on" row.
@@ -382,6 +382,8 @@ class Sharing_Admin {
/**
* Fires at the end of the sharing global options settings table.
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*/
do_action( 'sharing_global_options' );
@@ -434,6 +436,8 @@ class Sharing_Admin {
/**
* Fires after the custom sharing service form
*
+ * @module sharedaddy
+ *
* @since 1.1.0
*/
do_action( 'sharing_new_service_form' );
@@ -445,6 +449,8 @@ class Sharing_Admin {
/**
* Fires at the bottom of the admin sharing settings screen.
*
+ * @module sharedaddy
+ *
* @since 1.6.0
*/
do_action( 'post_admin_screen_sharing' );