Plugin Directory

Changeset 3030487 for shariff


Ignore:
Timestamp:
02/02/2024 10:19:38 AM (2 years ago)
Author:
starguide
Message:

Release 4.6.10

Location:
shariff/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • shariff/trunk/admin/admin-menu.php

    r2836757 r3030487  
    1313
    1414// 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' );
    1616
    1717// Adds the actions for the admin page.
     
    840840    }
    841841    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>';
    843843    echo '<p><code>odnoklassniki|patreon|paypal|paypalme|pinterest|pocket|printer|reddit|rss|sms</code></p>';
    844844    echo '<p><code>telegram|threema|tumblr|twitter|vk|wallabag|weibo|whatsapp|xing</code></p>';
     
    17181718        echo '<div style="display:table-row">';
    17191719            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>';
    17211721            echo '<div style="display:table-cell;border:1px solid;padding:10px">mastodon|facebook|linkedin|info</div>';
    17221722            echo '<div style="display:table-cell;border:1px solid;padding:10px">[shariff services="facebook|mastodon|mailto"]</div>';
  • shariff/trunk/changelog.txt

    r2836764 r3030487  
    22
    33== 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
    411
    512= 4.6.9 =
  • shariff/trunk/readme.txt

    r2995570 r3030487  
    55Requires PHP: 7.4
    66Tested up to: 6.4
    7 Stable tag: 4.6.9
     7Stable tag: 4.6.10
    88License: MIT
    99License URI: http://opensource.org/licenses/mit
     
    1313== Description ==
    1414
    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.
     15The "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.
    1616
    1717For 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).
     
    145145
    146146== 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
    147154
    148155= 4.6.9 =
  • shariff/trunk/services/shariff-facebook.php

    r2836757 r3030487  
    7171        $fb_token = $fb_app_id . '|' . $fb_app_secret;
    7272        // Use the token to get the share counts.
    73         $facebook = sanitize_text_field( wp_remote_retrieve_body( wp_remote_get( 'https://graph.facebook.com/v15.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 ) ) );
    7474        // Decode the json response.
    7575        $facebook_json = json_decode( $facebook, true );
  • shariff/trunk/services/shariff-info.php

    r2035136 r3030487  
    4545    // Button alt label.
    4646    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'] ) );
    4848    } else {
    4949        $button_title_array = array(
  • shariff/trunk/services/shariff-linkedin.php

    r2836757 r3030487  
    3535        'cs' => 'sdílet',
    3636        'da' => 'del',
    37         'de' => 'mitteilen',
     37        'de' => 'teilen',
    3838        'en' => 'share',
    3939        'es' => 'compartir',
  • shariff/trunk/services/shariff-twitter.php

    r2836757 r3030487  
    2727
    2828    // 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';
    3232
    3333    // 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>';
    3535
    3636    // Backend available?
    3737    $backend_available = 0;
    3838
    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 
    5239    // Button alt label.
    5340    $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ş',
    7963    );
    8064}
  • shariff/trunk/shariff.php

    r2836757 r3030487  
    44 * Plugin URI: https://wordpress.org/plugins-wp/shariff/
    55 * Description: Shariff provides share buttons that respect the privacy of your visitors and follow the General Data Protection Regulation (GDPR).
    6  * Version: 4.6.9
     6 * Version: 4.6.10
    77 * Author: Jan-Peter Lambeck & 3UU
    88 * Author URI: https://wordpress.org/plugins/shariff/
     
    3535function shariff3uu_update() {
    3636    // Adjust code version.
    37     $code_version = '4.6.9';
     37    $code_version = '4.6.10';
    3838
    3939    // Get basic options.
     
    6565On 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>
    6666
    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.',
     67On 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.',
    6868            'shariff'
    6969        );
     
    887887
    888888    // Stops all further actions if we are on an admin page.
    889     if ( is_admin() ) {
     889    if ( is_admin() && ! wp_doing_ajax() ) {
    890890        return null;
    891891    }
     
    12561256                    if ( array_key_exists( 'secondarycolor', $atts ) ) {
    12571257                        $output .= ' shariff-secondary-color';
    1258                         $css     = '.shariff-secondary-color{background-color:' . $atts['secondarycolor'] . '}';
     1258                        $css     = '.shariff-secondary-color{background-color:' . esc_attr( $atts['secondarycolor'] ) . '}';
    12591259                    } else {
    12601260                        $output .= ' shariff-' . $service . '-secondary-color';
     
    12761276                    // Custom colors?
    12771277                    if ( array_key_exists( 'secondarycolor', $atts ) ) {
    1278                         $output .= 'background-color:' . $atts['secondarycolor'];
     1278                        $output .= 'background-color:' . esc_attr( $atts['secondarycolor'] );
    12791279                    } else {
    12801280                        $output .= 'background-color:' . $secondary_color;
     
    13461346                    if ( array_key_exists( 'maincolor', $atts ) ) {
    13471347                        $output .= ' shariff-main-color';
    1348                         $css     = '.shariff-main-color{background-color:' . $atts['maincolor'] . '}';
     1348                        $css     = '.shariff-main-color{background-color:' . esc_attr( $atts['maincolor'] ) . '}';
    13491349                    } else {
    13501350                        $output .= ' shariff-' . $service . '-main-color';
     
    13581358                        if ( array_key_exists( 'maincolor', $atts ) ) {
    13591359                            $output .= ' shariff-text-color"';
    1360                             $css     = '.shariff-text-color{color:' . $atts['maincolor'] . '}';
     1360                            $css     = '.shariff-text-color{color:' . esc_attr( $atts['maincolor'] ) . '}';
    13611361                        } else {
    13621362                            $output .= ' shariff-' . $service . '-text-color"';
     
    13741374                    // Custom color?
    13751375                    if ( array_key_exists( 'maincolor', $atts ) ) {
    1376                         $output .= '; background-color:' . $atts['maincolor'];
     1376                        $output .= '; background-color:' . esc_attr( $atts['maincolor'] );
    13771377                    } else {
    13781378                        $output .= '; background-color:' . $main_color;
     
    13811381                    if ( isset( $atts['theme'] ) && 'white' === $atts['theme'] ) {
    13821382                        if ( array_key_exists( 'maincolor', $atts ) ) {
    1383                             $output .= '; color:' . $atts['maincolor'] . '"';
     1383                            $output .= '; color:' . esc_attr( $atts['maincolor'] ) . '"';
    13841384                        } else {
    13851385                            $output .= '; color:' . $main_color . '"';
     
    14061406                        if ( array_key_exists( 'maincolor', $atts ) ) {
    14071407                            $output .= ' shariff-svg-color';
    1408                             $css     = '.shariff-svg-color{fill:' . $atts['maincolor'] . '}';
     1408                            $css     = '.shariff-svg-color{fill:' . esc_attr( $atts['maincolor'] ) . '}';
    14091409                        } else {
    14101410                            $output .= ' shariff-' . $service . '-svg-color';
     
    14201420                    if ( isset( $atts['theme'] ) && 'white' === $atts['theme'] ) {
    14211421                        if ( array_key_exists( 'maincolor', $atts ) ) {
    1422                             $output .= 'fill:' . $atts['maincolor'];
     1422                            $output .= 'fill:' . esc_attr( $atts['maincolor'] );
    14231423                        } else {
    14241424                            $output .= 'fill:' . $main_color;
     
    14371437                            if ( array_key_exists( 'maincolor', $atts ) ) {
    14381438                                $output .= ' shariff-text-color';
    1439                                 $css     = '.shariff-text-color{color:' . $atts['maincolor'] . '}';
     1439                                $css     = '.shariff-text-color{color:' . esc_attr( $atts['maincolor'] ) . '}';
    14401440                            } else {
    14411441                                $output .= ' shariff-' . $service . '-text-color';
     
    14501450                        if ( isset( $atts['theme'] ) && 'white' === $atts['theme'] ) {
    14511451                            if ( array_key_exists( 'maincolor', $atts ) ) {
    1452                                 $output .= '" style="color:' . $atts['maincolor'];
     1452                                $output .= '" style="color:' . esc_attr( $atts['maincolor'] );
    14531453                            } else {
    14541454                                $output .= '" style="color:' . $main_color;
Note: See TracChangeset for help on using the changeset viewer.