- Timestamp:
- 02/02/2024 10:19:38 AM (2 years ago)
- Location:
- shariff/trunk
- Files:
-
- 8 edited
-
admin/admin-menu.php (modified) (3 diffs)
-
changelog.txt (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
services/shariff-facebook.php (modified) (1 diff)
-
services/shariff-info.php (modified) (1 diff)
-
services/shariff-linkedin.php (modified) (1 diff)
-
services/shariff-twitter.php (modified) (1 diff)
-
shariff.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shariff/trunk/admin/admin-menu.php
r2836757 r3030487 13 13 14 14 // Set services that have a share count API / backend. 15 $shariff3uu_services_backend = array( 'facebook', 'pinterest', 'reddit', 'tumblr', 'vk', ' addthis', 'odnoklassniki', 'buffer' );15 $shariff3uu_services_backend = array( 'facebook', 'pinterest', 'reddit', 'tumblr', 'vk', 'odnoklassniki', 'buffer' ); 16 16 17 17 // Adds the actions for the admin page. … … 840 840 } 841 841 echo '<input type="text" name="shariff3uu_basic[services]" value="' . esc_html( $services ) . '" size="90" placeholder="mastodon|facebook|linkedin|info">'; 842 echo '<p><code> addthis|bitcoin|buffer|diaspora|facebook|flipboard|info|linkedin|mailto|mastodon|mewe|mix</code></p>';842 echo '<p><code>bitcoin|buffer|diaspora|facebook|flipboard|info|linkedin|mailto|mastodon|mewe|mix</code></p>'; 843 843 echo '<p><code>odnoklassniki|patreon|paypal|paypalme|pinterest|pocket|printer|reddit|rss|sms</code></p>'; 844 844 echo '<p><code>telegram|threema|tumblr|twitter|vk|wallabag|weibo|whatsapp|xing</code></p>'; … … 1718 1718 echo '<div style="display:table-row">'; 1719 1719 echo '<div style="display:table-cell;border:1px solid;padding:10px">services</div>'; 1720 echo '<div style="display:table-cell;border:1px solid;padding:10px"> addthis<br>bitcoin<br>buffer<br>diaspora<br>facebook<br>flipboard<br>info<br>linkedin<br>mailto<br>mastodon<br>mewe<br>mix<br>odnoklassniki<br>patreon<br>paypal<br>paypalme<br>pinterest<br>pocket<br>printer<br>reddit<br>rss<br>sms<br>telegram<br>threema<br>tumblr<br>twitter<br>vk<br>wallabag<br>weibo<br>whatsapp<br>xing</div>';1720 echo '<div style="display:table-cell;border:1px solid;padding:10px">bitcoin<br>buffer<br>diaspora<br>facebook<br>flipboard<br>info<br>linkedin<br>mailto<br>mastodon<br>mewe<br>mix<br>odnoklassniki<br>patreon<br>paypal<br>paypalme<br>pinterest<br>pocket<br>printer<br>reddit<br>rss<br>sms<br>telegram<br>threema<br>tumblr<br>twitter<br>vk<br>wallabag<br>weibo<br>whatsapp<br>xing</div>'; 1721 1721 echo '<div style="display:table-cell;border:1px solid;padding:10px">mastodon|facebook|linkedin|info</div>'; 1722 1722 echo '<div style="display:table-cell;border:1px solid;padding:10px">[shariff services="facebook|mastodon|mailto"]</div>'; -
shariff/trunk/changelog.txt
r2836764 r3030487 2 2 3 3 == Changelog == 4 5 = 4.6.10 = 6 - security fix (thanks to Dmitrii Ignatyev from CleanTalk inc.) 7 - updated Twitter icon and text to reflect the name change to X (thanks to @gerobe) 8 - updated to Facebook Graph API v19.0 9 - updated to allow calls to Shariff from AJAX callbacks (thanks to @jchnkl) 10 - removed deprecated service AddThis 4 11 5 12 = 4.6.9 = -
shariff/trunk/readme.txt
r2995570 r3030487 5 5 Requires PHP: 7.4 6 6 Tested up to: 6.4 7 Stable tag: 4.6. 97 Stable tag: 4.6.10 8 8 License: MIT 9 9 License URI: http://opensource.org/licenses/mit … … 13 13 == Description == 14 14 15 The "original" share buttons automatically transmit data of your visitors to the social network sites as soon as they visit your website. They do not need to click on a share button for this and therefore have no choice, if they want their data to be send. The German computer magazine c't has developed "Shariff" `(ʃɛɹɪf)` that follows the General Data Protection Regulation (GDPR - Regulation (EU) 2016/679). This plugin adapts the Shariff concept and provides an easy to use solution for WordPress. We currently support 30 services in 25 languages: AddThis,Bitcoin, Buffer, Diaspora, Facebook, Flipboard, LinkedIn, mailto, Mastodon, MeWe, Odnoklassniki, Patreon, PayPal, PayPal.me, Pinterest, Pocket, Printer, Reddit, RSS, SMS, Stumbleupon, Telegram, Threema, Tumblr, Twitter, VK, Wallabag, Weibo, WhatsApp, Xing.15 The "original" share buttons automatically transmit data of your visitors to the social network sites as soon as they visit your website. They do not need to click on a share button for this and therefore have no choice, if they want their data to be send. The German computer magazine c't has developed "Shariff" `(ʃɛɹɪf)` that follows the General Data Protection Regulation (GDPR - Regulation (EU) 2016/679). This plugin adapts the Shariff concept and provides an easy to use solution for WordPress. We currently support 29 services in 25 languages: Bitcoin, Buffer, Diaspora, Facebook, Flipboard, LinkedIn, mailto, Mastodon, MeWe, Odnoklassniki, Patreon, PayPal, PayPal.me, Pinterest, Pocket, Printer, Reddit, RSS, SMS, Stumbleupon, Telegram, Threema, Tumblr, Twitter, VK, Wallabag, Weibo, WhatsApp, Xing. 16 16 17 17 For more information about the Shariff project check out the original [GitHub project](https://github.com/heiseonline/shariff) and read about the project itself [c’t information page](http://ct.de/shariff) (in German). … … 145 145 146 146 == Changelog == 147 148 = 4.6.10 = 149 - security fix (thanks to Dmitrii Ignatyev from CleanTalk inc.) 150 - updated Twitter icon and text to reflect the name change to X (thanks to @gerobe) 151 - updated to Facebook Graph API v19.0 152 - updated to allow calls to Shariff from AJAX callbacks (thanks to @jchnkl) 153 - removed deprecated service AddThis 147 154 148 155 = 4.6.9 = -
shariff/trunk/services/shariff-facebook.php
r2836757 r3030487 71 71 $fb_token = $fb_app_id . '|' . $fb_app_secret; 72 72 // Use the token to get the share counts. 73 $facebook = sanitize_text_field( wp_remote_retrieve_body( wp_remote_get( 'https://graph.facebook.com/v1 5.0/?access_token=' . $fb_token . '&fields=og_object%7Bengagement%7D&id=' . $post_url ) ) );73 $facebook = sanitize_text_field( wp_remote_retrieve_body( wp_remote_get( 'https://graph.facebook.com/v19.0/?access_token=' . $fb_token . '&fields=og_object%7Bengagement%7D&id=' . $post_url ) ) ); 74 74 // Decode the json response. 75 75 $facebook_json = json_decode( $facebook, true ); -
shariff/trunk/services/shariff-info.php
r2035136 r3030487 45 45 // Button alt label. 46 46 if ( array_key_exists( 'info_text', $atts ) ) { 47 $button_title_array = array( 'en' => $atts['info_text']);47 $button_title_array = array( 'en' => esc_html( $atts['info_text'] ) ); 48 48 } else { 49 49 $button_title_array = array( -
shariff/trunk/services/shariff-linkedin.php
r2836757 r3030487 35 35 'cs' => 'sdílet', 36 36 'da' => 'del', 37 'de' => ' mitteilen',37 'de' => 'teilen', 38 38 'en' => 'share', 39 39 'es' => 'compartir', -
shariff/trunk/services/shariff-twitter.php
r2836757 r3030487 27 27 28 28 // Colors. 29 $main_color = '# 55acee';30 $secondary_color = '# 32bbf5';31 $wcag_color = '# 115A92';29 $main_color = '#000'; 30 $secondary_color = '#595959'; 31 $wcag_color = '#595959'; 32 32 33 33 // SVG icon. 34 $svg_icon = '<svg width="32px" height="20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 32"><path fill="' . $main_color . '" d="M29.7 6.8q-1.2 1.8-3 3.1 0 0.3 0 0.8 0 2.5-0.7 4.9t-2.2 4.7-3.5 4-4.9 2.8-6.1 1q-5.1 0-9.3-2.7 0.6 0.1 1.5 0.1 4.3 0 7.6-2.6-2-0.1-3.5-1.2t-2.2-3q0.6 0.1 1.1 0.1 0.8 0 1.6-0.2-2.1-0.4-3.5-2.1t-1.4-3.9v-0.1q1.3 0.7 2.8 0.8-1.2-0.8-2-2.2t-0.7-2.9q0-1.7 0.8-3.1 2.3 2.8 5.5 4.5t7 1.9q-0.2-0.7-0.2-1.4 0-2.5 1.8-4.3t4.3-1.8q2.7 0 4.5 1.9 2.1-0.4 3.9-1.5-0.7 2.2-2.7 3.4 1.8-0.2 3.5-0.9z"/></svg>';34 $svg_icon = '<svg width="32px" height="20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="' . $main_color . '" d="M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0"/></svg>'; 35 35 36 36 // Backend available? 37 37 $backend_available = 0; 38 38 39 // Button text label.40 $button_text_array = array(41 'de' => 'twittern',42 'en' => 'tweet',43 'fr' => 'tweeter',44 'it' => 'twitta',45 'ja' => 'のつぶやき',46 'ko' => '짹짹',47 'ru' => 'твит',48 'sr' => 'твеет',49 'zh' => '鸣叫',50 );51 52 39 // Button alt label. 53 40 $button_title_array = array( 54 'bg' => 'Сподели в Twitter', 55 'cs' => 'Sdílet na Twiiteru', 56 'da' => 'Del på Twitter', 57 'de' => 'Bei Twitter teilen', 58 'en' => 'Share on Twitter', 59 'es' => 'Compartir en Twitter', 60 'fi' => 'Jaa Twitterissä', 61 'fr' => 'Partager sur Twitter', 62 'hr' => 'Podijelite na Twitteru', 63 'hu' => 'Megosztás Twitteren', 64 'it' => 'Condividi su Twitter', 65 'ja' => 'ツイッター上で共有', 66 'ko' => '트위터에서 공유하기', 67 'nl' => 'Delen op Twitter', 68 'no' => 'Del på Twitter', 69 'pl' => 'Udostępnij na Twitterze', 70 'pt' => 'Compartilhar no Twitter', 71 'ro' => 'Partajează pe Twitter', 72 'ru' => 'Поделиться на Twitter', 73 'sk' => 'Zdieľať na Twitteri', 74 'sl' => 'Deli na Twitterju', 75 'sr' => 'Podeli na Twitter-u', 76 'sv' => 'Dela på Twitter', 77 'tr' => 'Twitter\'da paylaş', 78 'zh' => '在Twitter上分享', 41 'bg' => 'Сподели във X', 42 'cs' => 'Sdílet na X', 43 'da' => 'Del på X', 44 'de' => 'Bei X teilen', 45 'en' => 'Share on X', 46 'es' => 'Compartir en X', 47 'fi' => 'Jaa X', 48 'fr' => 'Partager sur X', 49 'hr' => 'Podijelite na X', 50 'hu' => 'Megosztás X', 51 'it' => 'Condividi su X', 52 'nl' => 'Delen op X', 53 'no' => 'Del på X', 54 'pl' => 'Udostępnij na X', 55 'pt' => 'Compartilhar no X', 56 'ro' => 'Partajează pe X', 57 'ru' => 'Поделиться на X', 58 'sk' => 'Zdieľať na X', 59 'sl' => 'Deli na X', 60 'sr' => 'Podeli na X', 61 'sv' => 'Dela på X', 62 'tr' => 'X\'ta paylaş', 79 63 ); 80 64 } -
shariff/trunk/shariff.php
r2836757 r3030487 4 4 * Plugin URI: https://wordpress.org/plugins-wp/shariff/ 5 5 * Description: Shariff provides share buttons that respect the privacy of your visitors and follow the General Data Protection Regulation (GDPR). 6 * Version: 4.6. 96 * Version: 4.6.10 7 7 * Author: Jan-Peter Lambeck & 3UU 8 8 * Author URI: https://wordpress.org/plugins/shariff/ … … 35 35 function shariff3uu_update() { 36 36 // Adjust code version. 37 $code_version = '4.6. 9';37 $code_version = '4.6.10'; 38 38 39 39 // Get basic options. … … 65 65 On our website we offer you the possibility to use so called "Social Media Buttons". To protect your data, we use a solution called "Shariff". Hereby the share buttons are implemented as static images, which contain a link to the corresponding social network site. If you click on such a button, you will be redirected to the respective social network site in the same way, as normal links would do as well. Only in that moment of time the provider of the social network site will get information about you, for example your IP address. If you do not click on such a share button, no data will be transmitted. Information about the collection and usage of your date on the social network sites can be found in the corresponding terms of use of the respective provider. More information about the plugin and the Shariff solution can be found here: <a href="https://wordpress.org/plugins/shariff/">https://wordpress.org/plugins/shariff/</a> 66 66 67 On our website we offer share buttons for the following services / companies: AddThis,Diaspora, Facebook, Flattr, Flipboard, LinkedIn, Mastodon, Mix, Odnoklassniki, Patreon, PayPal, Pinterest, Pocket, Qzone, Reddit, Telegram, TencentWeibo, Threema, Tumblr, Twitter, VK, Wallabag, Weibo, WhatsApp, Xing.',67 On our website we offer share buttons for the following services / companies: Diaspora, Facebook, Flattr, Flipboard, LinkedIn, Mastodon, Mix, Odnoklassniki, Patreon, PayPal, Pinterest, Pocket, Qzone, Reddit, Telegram, TencentWeibo, Threema, Tumblr, Twitter, VK, Wallabag, Weibo, WhatsApp, Xing.', 68 68 'shariff' 69 69 ); … … 887 887 888 888 // Stops all further actions if we are on an admin page. 889 if ( is_admin() ) {889 if ( is_admin() && ! wp_doing_ajax() ) { 890 890 return null; 891 891 } … … 1256 1256 if ( array_key_exists( 'secondarycolor', $atts ) ) { 1257 1257 $output .= ' shariff-secondary-color'; 1258 $css = '.shariff-secondary-color{background-color:' . $atts['secondarycolor']. '}';1258 $css = '.shariff-secondary-color{background-color:' . esc_attr( $atts['secondarycolor'] ) . '}'; 1259 1259 } else { 1260 1260 $output .= ' shariff-' . $service . '-secondary-color'; … … 1276 1276 // Custom colors? 1277 1277 if ( array_key_exists( 'secondarycolor', $atts ) ) { 1278 $output .= 'background-color:' . $atts['secondarycolor'];1278 $output .= 'background-color:' . esc_attr( $atts['secondarycolor'] ); 1279 1279 } else { 1280 1280 $output .= 'background-color:' . $secondary_color; … … 1346 1346 if ( array_key_exists( 'maincolor', $atts ) ) { 1347 1347 $output .= ' shariff-main-color'; 1348 $css = '.shariff-main-color{background-color:' . $atts['maincolor']. '}';1348 $css = '.shariff-main-color{background-color:' . esc_attr( $atts['maincolor'] ) . '}'; 1349 1349 } else { 1350 1350 $output .= ' shariff-' . $service . '-main-color'; … … 1358 1358 if ( array_key_exists( 'maincolor', $atts ) ) { 1359 1359 $output .= ' shariff-text-color"'; 1360 $css = '.shariff-text-color{color:' . $atts['maincolor']. '}';1360 $css = '.shariff-text-color{color:' . esc_attr( $atts['maincolor'] ) . '}'; 1361 1361 } else { 1362 1362 $output .= ' shariff-' . $service . '-text-color"'; … … 1374 1374 // Custom color? 1375 1375 if ( array_key_exists( 'maincolor', $atts ) ) { 1376 $output .= '; background-color:' . $atts['maincolor'];1376 $output .= '; background-color:' . esc_attr( $atts['maincolor'] ); 1377 1377 } else { 1378 1378 $output .= '; background-color:' . $main_color; … … 1381 1381 if ( isset( $atts['theme'] ) && 'white' === $atts['theme'] ) { 1382 1382 if ( array_key_exists( 'maincolor', $atts ) ) { 1383 $output .= '; color:' . $atts['maincolor']. '"';1383 $output .= '; color:' . esc_attr( $atts['maincolor'] ) . '"'; 1384 1384 } else { 1385 1385 $output .= '; color:' . $main_color . '"'; … … 1406 1406 if ( array_key_exists( 'maincolor', $atts ) ) { 1407 1407 $output .= ' shariff-svg-color'; 1408 $css = '.shariff-svg-color{fill:' . $atts['maincolor']. '}';1408 $css = '.shariff-svg-color{fill:' . esc_attr( $atts['maincolor'] ) . '}'; 1409 1409 } else { 1410 1410 $output .= ' shariff-' . $service . '-svg-color'; … … 1420 1420 if ( isset( $atts['theme'] ) && 'white' === $atts['theme'] ) { 1421 1421 if ( array_key_exists( 'maincolor', $atts ) ) { 1422 $output .= 'fill:' . $atts['maincolor'];1422 $output .= 'fill:' . esc_attr( $atts['maincolor'] ); 1423 1423 } else { 1424 1424 $output .= 'fill:' . $main_color; … … 1437 1437 if ( array_key_exists( 'maincolor', $atts ) ) { 1438 1438 $output .= ' shariff-text-color'; 1439 $css = '.shariff-text-color{color:' . $atts['maincolor']. '}';1439 $css = '.shariff-text-color{color:' . esc_attr( $atts['maincolor'] ) . '}'; 1440 1440 } else { 1441 1441 $output .= ' shariff-' . $service . '-text-color'; … … 1450 1450 if ( isset( $atts['theme'] ) && 'white' === $atts['theme'] ) { 1451 1451 if ( array_key_exists( 'maincolor', $atts ) ) { 1452 $output .= '" style="color:' . $atts['maincolor'];1452 $output .= '" style="color:' . esc_attr( $atts['maincolor'] ); 1453 1453 } else { 1454 1454 $output .= '" style="color:' . $main_color;
Note: See TracChangeset
for help on using the changeset viewer.