Version Description
- added support for share count requests of multilingual sites
- updated button translations for Twitter and Pinterest (thanks to Jessica, @jess78)
- updated to Facebook Graph API v3.0
Download this release
Release Info
Developer | starguide |
Plugin | Shariff Wrapper |
Version | 4.5.2 |
Comparing to | |
See all releases |
Code changes from version 4.5.1 to 4.5.2
- changelog.txt +5 -0
- css/shariff.css +1 -1
- css/shariff.min.css +1 -1
- includes/class-shariff-widget.php +1 -3
- readme.txt +6 -1
- services/shariff-facebook.php +2 -2
- services/shariff-pinterest.php +4 -2
- services/shariff-twitter.php +2 -0
- shariff.php +4 -4
changelog.txt
CHANGED
@@ -2,6 +2,11 @@
|
|
2 |
|
3 |
== Changelog ==
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
= 4.5.1 =
|
6 |
- added support for the new WordPress Privacy Policy Guide added in 4.9.6
|
7 |
- minor css adjustments
|
2 |
|
3 |
== Changelog ==
|
4 |
|
5 |
+
= 4.5.2 =
|
6 |
+
- added support for share count requests of multilingual sites
|
7 |
+
- updated button translations for Twitter and Pinterest (thanks to Jessica, @jess78)
|
8 |
+
- updated to Facebook Graph API v3.0
|
9 |
+
|
10 |
= 4.5.1 =
|
11 |
- added support for the new WordPress Privacy Policy Guide added in 4.9.6
|
12 |
- minor css adjustments
|
css/shariff.css
CHANGED
@@ -351,7 +351,7 @@
|
|
351 |
}
|
352 |
@media only screen and (min-width: 361px) {
|
353 |
.shariff .shariff-buttons.buttonsize-small li { width: 105px; }
|
354 |
-
.shariff .shariff-buttons li { width:
|
355 |
.shariff .shariff-buttons.buttonsize-large li { width: 155px; }
|
356 |
.shariff .shariff-buttons .shariff-text { display: inline; }
|
357 |
.shariff .shariff-buttons .shariff-count { display: inline; }
|
351 |
}
|
352 |
@media only screen and (min-width: 361px) {
|
353 |
.shariff .shariff-buttons.buttonsize-small li { width: 105px; }
|
354 |
+
.shariff .shariff-buttons li { width: 125px; }
|
355 |
.shariff .shariff-buttons.buttonsize-large li { width: 155px; }
|
356 |
.shariff .shariff-buttons .shariff-text { display: inline; }
|
357 |
.shariff .shariff-buttons .shariff-count { display: inline; }
|
css/shariff.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.shariff{display:block !important;clear:both}.shariff ul{display:flex;flex-direction:row;flex-flow:row wrap;padding:0 !important;margin:0 !important}.shariff li{height:35px;box-sizing:border-box;list-style:none !important;overflow:hidden !important;margin:5px !important;padding:0 !important;text-indent:0 !important;border-left:0 none !important}.shariff a{position:relative;display:block !important;height:35px;padding:0;margin:0;box-sizing:border-box;border:0;text-decoration:none;background-image:none !important;text-align:left;box-shadow:none;cursor:pointer}.shariff a:hover{color:#fff;background-color:inherit !important;text-decoration:none !important}.shariff a:visited{color:inherit}.shariff .shariff-count{position:absolute;height:33px;top:0;right:0;margin:1px;padding:0 8px;background-color:rgba(255,255,255,0.5)}.shariff .shariff-count,.shariff .shariff-text{font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:36px;vertical-align:top}.shariff .shariff-text{padding-left:3px}.shariff .shariff-icon svg{width:32px;height:20px;padding:7px 1px;box-sizing:content-box}.shariff-button::before{content:none !important}.shariff .shariff-buttons .shariff-text-white{color:#fff}.shariff .shariff-buttons .shariff-hidezero{opacity:0}.shariff .theme-default a{color:#fff !important}.shariff .theme-default .shariff-icon svg path{fill:#fff}.shariff .theme-color .shariff-count{background-color:transparent !important;color:#fff !important}.shariff .theme-color .shariff-icon svg path{fill:#fff}.shariff .theme-grey a{background-color:#b0b0b0 !important}.shariff .theme-grey a:hover{background-color:inherit !important}.shariff .theme-grey .shariff-count{background-color:transparent;color:#fff !important}.shariff .theme-grey .shariff-icon svg path{fill:#fff}.shariff .theme-white a{background-color:#fff !important;border:1px solid #ddd}.shariff .theme-white a:hover{background-color:#eee !important;color:inherit}.shariff .theme-white svg{fill:currentColor}.shariff .theme-white .shariff-count{background-color:transparent;margin:0}.shariff .shariff-buttons.theme-round li{width:35px !important;height:35px;border-radius:50%;margin:5px}.shariff .theme-round a{position:relative;height:35px;border-radius:50%}.shariff .theme-round .shariff-icon svg{display:block;margin:auto;padding:8px 1px}.shariff .theme-round .shariff-text{display:block}.shariff .theme-round .shariff-count{display:inline;padding:0;right:0;left:0;top:0;background-color:transparent;color:transparent !important;text-align:center}.shariff .theme-round .shariff-count:hover{background-color:inherit !important;color:#fff !important}.shariff .theme-round .shariff-icon svg path{fill:#fff}.shariff .shariff-buttons.buttonsize-small li{height:25px !important}.shariff .shariff-buttons.buttonsize-small a{height:25px !important}.shariff .shariff-buttons.buttonsize-small.orientation-vertical li{width:115px}.shariff .shariff-buttons.buttonsize-small .shariff-icon svg{width:22px;height:15px;padding:5px 1px}.shariff .shariff-buttons.buttonsize-small .shariff-text,.shariff .shariff-buttons.buttonsize-small .shariff-count{font-size:11px;line-height:25px;padding:0 5px;height:23px}.shariff .shariff-buttons.buttonsize-small .shariff-text{padding-left:1px !important}.shariff .shariff-buttons.buttonsize-small.theme-round li{width:25px !important}.shariff .shariff-buttons.buttonsize-small.theme-round a{width:25px !important}.shariff .shariff-buttons.buttonsize-small.theme-round .shariff-count{padding:0 !important;height:25px !important}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li{margin:5px 7px}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li:first-child{margin-left:5px}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li:last-child{margin-right:5px}.shariff .buttonsize-large li{height:45px !important}.shariff .buttonsize-large a{height:45px !important}.shariff .buttonsize-large.orientation-vertical li{width:155px}.shariff .buttonsize-large .shariff-icon svg{width:40px;height:28px;padding:9px 2px}.shariff .buttonsize-large .shariff-text,.shariff .buttonsize-large .shariff-count{font-size:14px;line-height:45px;padding:0 10px;height:43px}.shariff .buttonsize-large .shariff-text{padding-left:1px !important}.shariff .shariff-buttons.buttonsize-large.theme-round li{width:45px !important;height:45px !important}.shariff .buttonsize-large.theme-round a{width:45px !important}.shariff .buttonsize-large.theme-round .shariff-count{padding:0 !important;height:45px !important}.shariff .orientation-vertical{flex-direction:column}.shariff .orientation-vertical li{width:135px}.shariff.shariff-align-flex-start ul{justify-content:flex-start;align-items:flex-start}.shariff.shariff-align-center ul{justify-content:center;align-items:center}.shariff.shariff-align-flex-end ul{justify-content:flex-end;align-items:flex-end}.widget .shariff.shariff-widget-align-flex-start ul{justify-content:flex-start;align-items:flex-start}.widget .shariff.shariff-widget-align-center ul{justify-content:center;align-items:center}.widget .shariff.shariff-widget-align-flex-end ul{justify-content:flex-end;align-items:flex-end}.shariff.shariff-buttonstretch li{flex:1 0 auto !important}.shariff.shariff-buttonstretch .orientation-vertical li{width:100% !important}.widget .shariff li{border:0;font-weight:400}.widget .shariff .theme-default a,.widget .shariff .theme-color a,.widget .shariff .theme-grey a,.widget .shariff .theme-round a{color:#fff;display:block;font-weight:400}.widget .shariff .theme-default a:hover,.widget .shariff .theme-color a:hover,.widget .shariff .theme-grey a:hover,.widget .shariff .theme-round a:hover{color:#fff;font-weight:400}.shariff-warning{background-color:red;color:#fff;font-size:20px;font-weight:700;padding:10px;text-align:center;margin:0 auto;line-height:1.5}.shariff .info a{border:1px solid #ddd;width:35px}.shariff .shariff-button.info{width:35px;flex:0 0 auto !important}.shariff .theme-default .shariff-button.shariff-nocustomcolor.info svg path{fill:#999}.shariff .theme-round .shariff-button.shariff-nocustomcolor.info svg path{fill:#999}.shariff .buttonsize-small .shariff-button.info{width:25px}.shariff .buttonsize-small .info a{width:25px}.shariff .buttonsize-large .shariff-button.info{width:45px}.shariff .buttonsize-large .info a{width:45px}.shariff .info .shariff-icon svg{display:block;margin:auto}@media only screen and (max-width:360px){.shariff .shariff-buttons.buttonsize-small li{width:25px}.shariff .shariff-buttons li{width:35px}.shariff .shariff-buttons.buttonsize-large li{width:45px}.shariff .shariff-buttons .shariff-icon svg{display:block;margin:auto}.shariff .shariff-buttons .shariff-text{display:none}.shariff .shariff-buttons .shariff-count{display:none}}@media only screen and (min-width:361px){.shariff .shariff-buttons.buttonsize-small li{width:105px}.shariff .shariff-buttons li{width:
|
1 |
+
.shariff{display:block !important;clear:both}.shariff ul{display:flex;flex-direction:row;flex-flow:row wrap;padding:0 !important;margin:0 !important}.shariff li{height:35px;box-sizing:border-box;list-style:none !important;overflow:hidden !important;margin:5px !important;padding:0 !important;text-indent:0 !important;border-left:0 none !important}.shariff a{position:relative;display:block !important;height:35px;padding:0;margin:0;box-sizing:border-box;border:0;text-decoration:none;background-image:none !important;text-align:left;box-shadow:none;cursor:pointer}.shariff a:hover{color:#fff;background-color:inherit !important;text-decoration:none !important}.shariff a:visited{color:inherit}.shariff .shariff-count{position:absolute;height:33px;top:0;right:0;margin:1px;padding:0 8px;background-color:rgba(255,255,255,0.5)}.shariff .shariff-count,.shariff .shariff-text{font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:36px;vertical-align:top}.shariff .shariff-text{padding-left:3px}.shariff .shariff-icon svg{width:32px;height:20px;padding:7px 1px;box-sizing:content-box}.shariff-button::before{content:none !important}.shariff .shariff-buttons .shariff-text-white{color:#fff}.shariff .shariff-buttons .shariff-hidezero{opacity:0}.shariff .theme-default a{color:#fff !important}.shariff .theme-default .shariff-icon svg path{fill:#fff}.shariff .theme-color .shariff-count{background-color:transparent !important;color:#fff !important}.shariff .theme-color .shariff-icon svg path{fill:#fff}.shariff .theme-grey a{background-color:#b0b0b0 !important}.shariff .theme-grey a:hover{background-color:inherit !important}.shariff .theme-grey .shariff-count{background-color:transparent;color:#fff !important}.shariff .theme-grey .shariff-icon svg path{fill:#fff}.shariff .theme-white a{background-color:#fff !important;border:1px solid #ddd}.shariff .theme-white a:hover{background-color:#eee !important;color:inherit}.shariff .theme-white svg{fill:currentColor}.shariff .theme-white .shariff-count{background-color:transparent;margin:0}.shariff .shariff-buttons.theme-round li{width:35px !important;height:35px;border-radius:50%;margin:5px}.shariff .theme-round a{position:relative;height:35px;border-radius:50%}.shariff .theme-round .shariff-icon svg{display:block;margin:auto;padding:8px 1px}.shariff .theme-round .shariff-text{display:block}.shariff .theme-round .shariff-count{display:inline;padding:0;right:0;left:0;top:0;background-color:transparent;color:transparent !important;text-align:center}.shariff .theme-round .shariff-count:hover{background-color:inherit !important;color:#fff !important}.shariff .theme-round .shariff-icon svg path{fill:#fff}.shariff .shariff-buttons.buttonsize-small li{height:25px !important}.shariff .shariff-buttons.buttonsize-small a{height:25px !important}.shariff .shariff-buttons.buttonsize-small.orientation-vertical li{width:115px}.shariff .shariff-buttons.buttonsize-small .shariff-icon svg{width:22px;height:15px;padding:5px 1px}.shariff .shariff-buttons.buttonsize-small .shariff-text,.shariff .shariff-buttons.buttonsize-small .shariff-count{font-size:11px;line-height:25px;padding:0 5px;height:23px}.shariff .shariff-buttons.buttonsize-small .shariff-text{padding-left:1px !important}.shariff .shariff-buttons.buttonsize-small.theme-round li{width:25px !important}.shariff .shariff-buttons.buttonsize-small.theme-round a{width:25px !important}.shariff .shariff-buttons.buttonsize-small.theme-round .shariff-count{padding:0 !important;height:25px !important}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li{margin:5px 7px}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li:first-child{margin-left:5px}.shariff .shariff-buttons.theme-round.buttonsize-small.orientation-horizontal li:last-child{margin-right:5px}.shariff .buttonsize-large li{height:45px !important}.shariff .buttonsize-large a{height:45px !important}.shariff .buttonsize-large.orientation-vertical li{width:155px}.shariff .buttonsize-large .shariff-icon svg{width:40px;height:28px;padding:9px 2px}.shariff .buttonsize-large .shariff-text,.shariff .buttonsize-large .shariff-count{font-size:14px;line-height:45px;padding:0 10px;height:43px}.shariff .buttonsize-large .shariff-text{padding-left:1px !important}.shariff .shariff-buttons.buttonsize-large.theme-round li{width:45px !important;height:45px !important}.shariff .buttonsize-large.theme-round a{width:45px !important}.shariff .buttonsize-large.theme-round .shariff-count{padding:0 !important;height:45px !important}.shariff .orientation-vertical{flex-direction:column}.shariff .orientation-vertical li{width:135px}.shariff.shariff-align-flex-start ul{justify-content:flex-start;align-items:flex-start}.shariff.shariff-align-center ul{justify-content:center;align-items:center}.shariff.shariff-align-flex-end ul{justify-content:flex-end;align-items:flex-end}.widget .shariff.shariff-widget-align-flex-start ul{justify-content:flex-start;align-items:flex-start}.widget .shariff.shariff-widget-align-center ul{justify-content:center;align-items:center}.widget .shariff.shariff-widget-align-flex-end ul{justify-content:flex-end;align-items:flex-end}.shariff.shariff-buttonstretch li{flex:1 0 auto !important}.shariff.shariff-buttonstretch .orientation-vertical li{width:100% !important}.widget .shariff li{border:0;font-weight:400}.widget .shariff .theme-default a,.widget .shariff .theme-color a,.widget .shariff .theme-grey a,.widget .shariff .theme-round a{color:#fff;display:block;font-weight:400}.widget .shariff .theme-default a:hover,.widget .shariff .theme-color a:hover,.widget .shariff .theme-grey a:hover,.widget .shariff .theme-round a:hover{color:#fff;font-weight:400}.shariff-warning{background-color:red;color:#fff;font-size:20px;font-weight:700;padding:10px;text-align:center;margin:0 auto;line-height:1.5}.shariff .info a{border:1px solid #ddd;width:35px}.shariff .shariff-button.info{width:35px;flex:0 0 auto !important}.shariff .theme-default .shariff-button.shariff-nocustomcolor.info svg path{fill:#999}.shariff .theme-round .shariff-button.shariff-nocustomcolor.info svg path{fill:#999}.shariff .buttonsize-small .shariff-button.info{width:25px}.shariff .buttonsize-small .info a{width:25px}.shariff .buttonsize-large .shariff-button.info{width:45px}.shariff .buttonsize-large .info a{width:45px}.shariff .info .shariff-icon svg{display:block;margin:auto}@media only screen and (max-width:360px){.shariff .shariff-buttons.buttonsize-small li{width:25px}.shariff .shariff-buttons li{width:35px}.shariff .shariff-buttons.buttonsize-large li{width:45px}.shariff .shariff-buttons .shariff-icon svg{display:block;margin:auto}.shariff .shariff-buttons .shariff-text{display:none}.shariff .shariff-buttons .shariff-count{display:none}}@media only screen and (min-width:361px){.shariff .shariff-buttons.buttonsize-small li{width:105px}.shariff .shariff-buttons li{width:125px}.shariff .shariff-buttons.buttonsize-large li{width:155px}.shariff .shariff-buttons .shariff-text{display:inline}.shariff .shariff-buttons .shariff-count{display:inline}}@media only screen and (min-device-width:1025px){.shariff .shariff-mobile{display:none !important}}
|
includes/class-shariff-widget.php
CHANGED
@@ -148,7 +148,7 @@ class Shariff_Widget extends WP_Widget {
|
|
148 |
// Replace brackets [ and ] with ( and ).
|
149 |
$page_title = str_replace( '[', '(', $page_title );
|
150 |
$page_title = str_replace( ']', ')', $page_title );
|
151 |
-
$page_title = ' title="' .
|
152 |
}
|
153 |
|
154 |
// Same for media.
|
@@ -156,8 +156,6 @@ class Shariff_Widget extends WP_Widget {
|
|
156 |
if ( array_key_exists( 'services', $shariff3uu ) && strstr( $shariff3uu['services'], 'pinterest' ) && ( strpos( $original_shorttag, 'media=' ) === false ) ) {
|
157 |
if ( isset( $shariff3uu['default_pinterest'] ) ) {
|
158 |
$media = ' media="' . $shariff3uu['default_pinterest'] . '"';
|
159 |
-
} else {
|
160 |
-
$media = ' media="' . plugins_url( '/images/defaultHint.png', __FILE__ ) . '"';
|
161 |
}
|
162 |
}
|
163 |
|
148 |
// Replace brackets [ and ] with ( and ).
|
149 |
$page_title = str_replace( '[', '(', $page_title );
|
150 |
$page_title = str_replace( ']', ')', $page_title );
|
151 |
+
$page_title = ' title="' . wp_strip_all_tags( html_entity_decode( $page_title, ENT_COMPAT, 'UTF-8' ) ) . '"';
|
152 |
}
|
153 |
|
154 |
// Same for media.
|
156 |
if ( array_key_exists( 'services', $shariff3uu ) && strstr( $shariff3uu['services'], 'pinterest' ) && ( strpos( $original_shorttag, 'media=' ) === false ) ) {
|
157 |
if ( isset( $shariff3uu['default_pinterest'] ) ) {
|
158 |
$media = ' media="' . $shariff3uu['default_pinterest'] . '"';
|
|
|
|
|
159 |
}
|
160 |
}
|
161 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: Shariff, GDPR, DSGVO, share buttons, sharing
|
|
4 |
Requires at least: 4.7
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 4.5.
|
8 |
License: MIT
|
9 |
License URI: http://opensource.org/licenses/mit
|
10 |
|
@@ -152,6 +152,11 @@ These are bugs or unexpected glitches that we know of, but that do not have an i
|
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
|
|
|
|
155 |
= 4.5.1 =
|
156 |
- added support for the new WordPress Privacy Policy Guide added in 4.9.6
|
157 |
- minor css adjustments
|
4 |
Requires at least: 4.7
|
5 |
Requires PHP: 5.6
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 4.5.2
|
8 |
License: MIT
|
9 |
License URI: http://opensource.org/licenses/mit
|
10 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
= 4.5.2 =
|
156 |
+
- added support for share count requests of multilingual sites
|
157 |
+
- updated button translations for Twitter and Pinterest (thanks to Jessica, @jess78)
|
158 |
+
- updated to Facebook Graph API v3.0
|
159 |
+
|
160 |
= 4.5.1 =
|
161 |
- added support for the new WordPress Privacy Policy Guide added in 4.9.6
|
162 |
- minor css adjustments
|
services/shariff-facebook.php
CHANGED
@@ -69,7 +69,7 @@ if ( isset( $frontend ) && 1 === $frontend ) {
|
|
69 |
// Create the FB access token.
|
70 |
$fb_token = $fb_app_id . '|' . $fb_app_secret;
|
71 |
// Use the token to get the share counts.
|
72 |
-
$facebook = sanitize_text_field( wp_remote_retrieve_body( wp_remote_get( 'https://graph.facebook.com/
|
73 |
// Decode the json response.
|
74 |
$facebook_json = json_decode( $facebook, true );
|
75 |
// Set nofbid in case the page has not yet been crawled by Facebook and no ID is provided.
|
@@ -83,7 +83,7 @@ if ( isset( $frontend ) && 1 === $frontend ) {
|
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
-
* Stores results - uses engagement (Graph API 2.12) if it exists, otherwise uses share_count - ordered based on proximity of occurrence.
|
87 |
* Records errors, if enabled (e.g. request from the status tab).
|
88 |
*/
|
89 |
if ( isset( $facebook_json['engagement'] ) && isset( $facebook_json['engagement']['share_count'] ) ) {
|
69 |
// Create the FB access token.
|
70 |
$fb_token = $fb_app_id . '|' . $fb_app_secret;
|
71 |
// Use the token to get the share counts.
|
72 |
+
$facebook = sanitize_text_field( wp_remote_retrieve_body( wp_remote_get( 'https://graph.facebook.com/v3.0/?access_token=' . $fb_token . '&fields=engagement&id=' . $post_url ) ) );
|
73 |
// Decode the json response.
|
74 |
$facebook_json = json_decode( $facebook, true );
|
75 |
// Set nofbid in case the page has not yet been crawled by Facebook and no ID is provided.
|
83 |
}
|
84 |
|
85 |
/**
|
86 |
+
* Stores results - uses engagement (Graph API > 2.12) if it exists, otherwise uses share_count - ordered based on proximity of occurrence.
|
87 |
* Records errors, if enabled (e.g. request from the status tab).
|
88 |
*/
|
89 |
if ( isset( $facebook_json['engagement'] ) && isset( $facebook_json['engagement']['share_count'] ) ) {
|
services/shariff-pinterest.php
CHANGED
@@ -70,8 +70,10 @@ if ( isset( $frontend ) && 1 === $frontend ) {
|
|
70 |
|
71 |
// Button text label.
|
72 |
$button_text_array = array(
|
73 |
-
'de' => '
|
74 |
-
'en' => '
|
|
|
|
|
75 |
);
|
76 |
|
77 |
// Button alt label.
|
70 |
|
71 |
// Button text label.
|
72 |
$button_text_array = array(
|
73 |
+
'de' => 'merken',
|
74 |
+
'en' => 'save',
|
75 |
+
'fr' => 'enregistrer',
|
76 |
+
'it' => 'salva',
|
77 |
);
|
78 |
|
79 |
// Button alt label.
|
services/shariff-twitter.php
CHANGED
@@ -39,6 +39,8 @@ if ( isset( $frontend ) && 1 === $frontend ) {
|
|
39 |
$button_text_array = array(
|
40 |
'de' => 'twittern',
|
41 |
'en' => 'tweet',
|
|
|
|
|
42 |
'ja' => 'のつぶやき',
|
43 |
'ko' => '짹짹',
|
44 |
'ru' => 'твит',
|
39 |
$button_text_array = array(
|
40 |
'de' => 'twittern',
|
41 |
'en' => 'tweet',
|
42 |
+
'fr' => 'tweeter',
|
43 |
+
'it' => 'twitta',
|
44 |
'ja' => 'のつぶやき',
|
45 |
'ko' => '짹짹',
|
46 |
'ru' => 'твит',
|
shariff.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Shariff Wrapper
|
4 |
* Plugin URI: https://wordpress.org/plugins-wp/shariff/
|
5 |
* Description: Shariff provides share buttons that respect the privacy of your visitors and follow the General Data Protection Regulation (GDPR).
|
6 |
-
* Version: 4.5.
|
7 |
* Author: Jan-Peter Lambeck & 3UU
|
8 |
* Author URI: https://wordpress.org/plugins/shariff/
|
9 |
* License: MIT
|
@@ -998,7 +998,7 @@ function shariff3uu_render( $atts ) {
|
|
998 |
if ( array_key_exists( 'title', $atts ) ) {
|
999 |
$share_title = rawurlencode( wp_strip_all_tags( $atts['title'] ) );
|
1000 |
} else {
|
1001 |
-
$share_title = rawurlencode(
|
1002 |
}
|
1003 |
|
1004 |
// Sets the transient name.
|
@@ -1104,13 +1104,13 @@ function shariff3uu_render( $atts ) {
|
|
1104 |
$output .= ' data-backendurl="' . $shariff3uu['external_host'] . '"';
|
1105 |
} // Elseif test the subapi setting.
|
1106 |
elseif ( isset( $shariff3uu['subapi'] ) && 1 === $shariff3uu['subapi'] ) {
|
1107 |
-
$output .= ' data-backendurl="' . get_bloginfo( 'wpurl' ) . '/wp-json/shariff/v1/share_counts?"';
|
1108 |
} // Elseif pretty permalinks are not activated fall back to manual rest route.
|
1109 |
elseif ( ! get_option( 'permalink_structure' ) ) {
|
1110 |
$output .= ' data-backendurl="?rest_route=/shariff/v1/share_counts&"';
|
1111 |
} // Else use the home url.
|
1112 |
else {
|
1113 |
-
$output .= ' data-backendurl="' . rtrim( home_url(), '/' ) . '/wp-json/shariff/v1/share_counts?"';
|
1114 |
}
|
1115 |
}
|
1116 |
$output .= '>';
|
3 |
* Plugin Name: Shariff Wrapper
|
4 |
* Plugin URI: https://wordpress.org/plugins-wp/shariff/
|
5 |
* Description: Shariff provides share buttons that respect the privacy of your visitors and follow the General Data Protection Regulation (GDPR).
|
6 |
+
* Version: 4.5.2
|
7 |
* Author: Jan-Peter Lambeck & 3UU
|
8 |
* Author URI: https://wordpress.org/plugins/shariff/
|
9 |
* License: MIT
|
998 |
if ( array_key_exists( 'title', $atts ) ) {
|
999 |
$share_title = rawurlencode( wp_strip_all_tags( $atts['title'] ) );
|
1000 |
} else {
|
1001 |
+
$share_title = rawurlencode( wp_strip_all_tags( html_entity_decode( get_the_title(), ENT_COMPAT, 'UTF-8' ) ) );
|
1002 |
}
|
1003 |
|
1004 |
// Sets the transient name.
|
1104 |
$output .= ' data-backendurl="' . $shariff3uu['external_host'] . '"';
|
1105 |
} // Elseif test the subapi setting.
|
1106 |
elseif ( isset( $shariff3uu['subapi'] ) && 1 === $shariff3uu['subapi'] ) {
|
1107 |
+
$output .= ' data-backendurl="' . strtok( get_bloginfo( 'wpurl' ), '?' ) . '/wp-json/shariff/v1/share_counts?"';
|
1108 |
} // Elseif pretty permalinks are not activated fall back to manual rest route.
|
1109 |
elseif ( ! get_option( 'permalink_structure' ) ) {
|
1110 |
$output .= ' data-backendurl="?rest_route=/shariff/v1/share_counts&"';
|
1111 |
} // Else use the home url.
|
1112 |
else {
|
1113 |
+
$output .= ' data-backendurl="' . rtrim( strtok( home_url(), '?' ), '/' ) . '/wp-json/shariff/v1/share_counts?"';
|
1114 |
}
|
1115 |
}
|
1116 |
$output .= '>';
|