Shariff Wrapper


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,, Pinterest, Pocket, Printer, Reddit, RSS, SMS, Stumbleupon, Telegram, Threema, Tumblr, Twitter, VK, Wallabag, Weibo, WhatsApp, Xing.

Mehr Informationen über das Shariff-Projekt können im original Github-Projekt gefunden werden oder auf der Informationsseite des c’t-Magazins.

Die Teilenbuttons können mit diesem Plugin automatisch zu Beiträgen, Seiten, der Blogseite, Produktseiten und vielen mehr hinzugefügt werden. Außerdem ist es möglich diese mittels eines Widgets oder manuell mit Hilfe des Shortcodes [shariff] in Seiten und im Theme einzubinden.


  • Unterschiedlich dargestellte Buttons.
  • Basis-Einstellungen.
  • Design-Einstellungen.
  • Erweiterte Einstellungen.
  • Statistik-Einstellungen


  1. Lade alles per FTP in das Verzeichnis /wp-content/plugins/ hoch.
  2. Aktiviere den Shariff Wrapper im Plugin-Menü von WordPress.
  3. Jetzt kann [shariff] überall in Beiträgen oder auf Seiten verwendet werden.

Um die Teilen-Buttons für alle Beiträge oder Seiten zu aktivieren, wirf einen Blick in die Plugin-Einstellungen.


Kann ich die Shariff-Buttons in meinem Theme nutzen?

Ja. Verwende einfach die Shortcode-Funktion:
Du kannst alle Optionen verwendet, die auf dem Hilfe-Reiter in den Plugin-Einstellungen aufgeführt sind.

Kann ich die gesamte Anzahl an Teilungen in meinem Theme ausgeben?

Ja. Du kannst do_shortcode('[shariff services="totalnumber"]') verwenden, um die Gesamtanzahl der Teilungen für einen Beitrag in der Schleife auszugeben. Es gibt die Anzahl aus und ist von <span class="shariff-totalnumber"></span> umhüllt, damit die shariff.js die Zählung aktualisieren kann. Zusätzlich werden nur zwischengespeicherte Daten verwendet, um die Webseite nicht zu verlangsamen.

Is there an action hook to use the share counts every time they get updated?

Yes. You can use
function your_awesome_function( $share_counts ) {
// $share_counts is an array including all enabled services,
// the timestamp of the update and the url of the post.
// do stuff
add_action( ’shariff_share_counts‘, ‚your_awesome_function‘ );
WARNING: This hook will get called A LOT. So be sure you know what you are doing.

Wie kann ich das Widget konfigurieren?

It uses the same options that have been configured on the plugin options page. However, you can put in a shorttag that overwrites the default options. It has the same format as you use in posts. Take a look at the help section of the plugin options page for more information.

Kann ich die Einstellungen für einen einzelnen Beitrag ändern?

A: Ja. Alle Optionen können mittels des Shorttags in der Shariff-Metabox auf der rechten Seite des Beitragsbearbeitungsseite geändert werden.

Wieso sind die Shares nicht gelistet?

A: Shariff tries to protect the privacy of your visitors. In order to do this, the statistics have to be requested by your server, so social networks only see a request of your server and not from your visitor. However, we do not know, if you want this. Therefore it is not enabled by default.

Wie können die Zähler aktiviert bzw. angezeigt werden?

Enable it on the plugin options page in general or add backend="on" to the shariff shorttag in your post.

Die Zähler werden immer noch nicht angezeigt.

Please have a look at the status tab on the plugin options page. It states whether share counts are enabled and if there is a problem with a service. Please also keep in mind that the plugin has a minimum refresh time of 60 seconds and that each service has their own cache as well.

Warum kann ich die TTL nicht auf einen kleineren oder größeren Wert setzen?

The time to live (TTL) value determines, if a share count of a post or page gets refreshed when someone visits this specific page / post of your blog. Too small values create too much useless traffic, too high values negate the goal of motivating visitors to also share a post. The value can be adjusted between 60 and 7200 seconds. Keep in mind, the actual lifespan depends on the age of the post as well.

Wie kann ich die Position aller Buttons ändern?

Have a look at the alignment options in the admin menu or checkout the style option.

Wie kann ich das Design ändern?

Have a look at the parameters „theme“, „orientation“ and „buttonsize“. They work mostly like the original code parameters that are explained at Or you can have a look at the test page at to get an overview. But please be warned: This is a test page! It is possible that you find features that are only provided in the development version. Use it only to get an impression of the design options.

Wie kann ich das Design eines einzelnen Buttons ändern?

A: If you are a CSS guru please feel free to modify the css file. But of course this is a bad idea, because all changes will be destroyed with the next update! Instead take a look at the style and class attribute of the shorttag. If you put in any value it will create a DIV container with the ID „ShariffSC“ around the buttons. If you are really a CSS guru you will know what does the magic from here on out. 😉

Wie können die Buttons während dem Scrollen fixiert bleiben?

No problem. Just use the style attribute to add some CSS to the shorttag. For example in a widget (adjust the width as needed):
[shariff style=“position:fixed;width:250px“]
Of course you can use all other options in that shorttag as well. It also works with the CSS style option on the plugins design options page, if you really want this applied to all buttons on your page.

Ich möchte eine horizontale Linie über meinen Shariff-Buttons!

You can use the headline option on the design tab. For example, enter the following code to create a horizontal line and a headline:

Bitte teile diesen Beitrag:

Ich möchte eine andere oder keine Überschrift in einem einzigen Widget, Beitrag oder Seite!

Use the headline attribute to add or remove it. For example, you can use the following shorttag to remove a headline set on the plugins options page in a single widget:
[shariff headline=““]
Of course you can use all other options in that shorttag as well.

Can I add [shariff] on all posts?

Ja, sieh dir die Plugin-Einstellungen an.

Ich will es aber auf einem einzelnen Beitrag verstecken!

Do you really know what you want? 😉 However, it is possible. Write anywhere in your post „hideshariff“. It will be removed and Shariff will not be added. You can also use „/hideshariff“ to write „hideshariff“ in your post. You might also want to take a look at the Shariff meta box on the right side of your post edit screen.

Funktioniert es mit einem CDN (Content Delivery Network)?


Pinterest zeigt kein Bild an!

You can add media="" within the [shariff] shorttag or add it in on the plugin options page – of course with the link to your image.

Kann ich eine feste URL zum Teilen festlegen?

You can use the „url“ parameter within the shortcode
[shariff url=““]
This is also available within widgets. However, it is not a good idea to manipulate the URI, because it could mislead your visitors. So you should only use it, if this is really needed and you do really know what you are doing. Therefore it is not available on the plugin options page in general.

What happened to the Twitter share counts?

Twitter does not offer official share counts anymore. As an alternative, share counts for Twitter can be requested via You will need to register with them for it to work. Otherwise the count will always be zero.

Die Buttons werden unter meinem selbst erstellten Theme nicht richtig angezeigt!

Bitte stelle sicher, dass wp_footer(); in deinem Theme vorhanden ist. Für weitere Informationen besuche bitte:

Was ist die externe API-Funktion?

First of all: Usually you do not need it! The plugin requests all share counts itself. However, there are some reasons to put the backend on another server:
– avoid requests from you WP server to all the social networks
– use a more powerful server for the statistic
– use the original backend implementation of Heise or your own solution
– make your own backend available for more than one WP installation
But please have in mind that there are also some good reasons not to use external servers:
– you need an additional installation of WP and the plugin or have to create your own implementation of a Shariff backend
– some plugin settings (backend checks, statistic, etc.) will only work on the external server
– you have to use SHARIFF_FRONTENDS as an array with all your frontend domains to enable the backend or find your own solution
– we CANNOT provide support for your own implementation

Wie kann die externe API konfiguriert werden?

In the statistic settings fill in the URL to the API of the external server. For the WordPress installation on the external server you have to create a „constant“ called SHARIFF_FRONTENDS to permit other domains to use it. Please have in mind that you have to fill in all subdomains you want to use! The domains must be defined like this:
define( ‚SHARIFF_FRONTENDS‘, ‚|||‘ );

Was bedeutet „Kontaktiere die externe API direkt.“?

By default, the browser request the share counts from the server your site is running on. If you have entered an external API your server will then request the counts from this external API instead of fetching them itself. Therefore, the external server will only see the IP from your server and not the one from your visitors. If you check this option, the browser of your visitors will instead directly request the share counts from the external API and therefore reveal their IP address to them. This might be faster, but it is less secure. Please also make sure to set the Access-Control-Allow-Origin header right. If your site is available using https, your external API will need to be reached by https as well. Otherwise the request will get blocked for security reasons. All options and features (e.g. the ranking tab) regarding the statistic will only work on the external server.


These are bugs or unexpected glitches that we know of, but that do not have an impact on the majority of users, are not security relevant and will perhaps be fixed in the future – if we have time to spend or you provide us with a lot of „Kölsch“ 😉

  • Wenn der erste Beitrag auf der Startseite passwortgeschützt ist und Shariff auf passwortgeschützten Beiträgen deaktiviert ist, wird ein Widget am Ende der Schleife nicht dargestellt.


27. November 2023
I have used the original Shariff on a number of custom built website. Using it inside WordPress for the first time, and I am amazed by the work you have put in, to continue the life this important GDPR safe social media code. Thank you very much indeed!
2. Juli 2022
I only complain of some unnecessary use of JavaScript, and its inline colocation that makes it difficult to implement a strict CSP-SOP and keep it working. In the meanwhile the main principle of this project is the important: Avoid 3rd party stuff to fulfill a real self-hosting and have a legal conformance.
30. August 2020
This plugin adds very little overhead to your load time, unlike some of the other similar plugins we tried. Easily tailored to fit your site requirements. Would really recommend it.  
Alle 99 Rezensionen lesen

Mitwirkende & Entwickler

„Shariff Wrapper“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:


„Shariff Wrapper“ wurde in 3 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „Shariff Wrapper“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.



  • removed Reddit from the share counts because requests without API keys are
    blocked now
  • fix to avoid unauthenticated local file inclusion. Many thanks to haidv35


  • cleanup code (please check the basic options menu. We changed some
    internal names of variables that differ from original WP namings for
    post/page/custom type. This should have been migrated with this update but
    please have a look on your ‚baisc options‘.
  • fix possible XSS with the (internal) variabe ‚timestamp‘ (thanks to Ngo Thien An for the hint)


  • French translation for some service corrected (thanks to Ensam57)
  • additional security fix after code review


  • Sicherheitsupdate


  • security fix (thanks to Dmitrii Ignatyev from CleanTalk inc.)
  • updated Twitter icon and text to reflect the name change to X (thanks to @gerobe)
  • updated to Facebook Graph API v19.0
  • updated to allow calls to Shariff from AJAX callbacks (thanks to @jchnkl)
  • removed deprecated service AddThis


  • new service Mastodon (thanks to Nikita by providing
  • updated LinkedIn share link


  • updated to Facebook Graph API v15.0
  • removed deprecated services Flattr, QZone and TencientWeibo
  • removed Twitter share counts via Twitcount
  • removed broken links from help tab


  • updated to Facebook Graph API v11.0
  • changed FB request to og_object (thanks to richard67)


  • Fix sanitize_callback parameter to avoid warnings with api requests
  • tested for 5.7


  • updated to Facebook Graph API v6.0
  • fixed minor bug
  • tested for WordPress 5.4


  • fixed the settings link on the plugin overview page for certain environments (thanks to @midgard)
  • updated to Facebook Graph API v5.0
  • updated the WhatsApp link to swap url and title for a working image preview
  • removed nofollow from the info button
  • removed Xing share counts due to Xing disabling the API


  • updated the WhatsApp share link to work with all devices again (thanks to @hanshansenxxx)
  • updated to Facebook Graph API v3.3
  • updated the Flattr button to reflect the new Flattr (thanks to Chris, @camthor)
  • fixed an update issue with WP CLI
  • removed the Facebook share counts request without APP ID and Secret
  • Facebook now always requires an APP ID and Secret for share counts
  • removed Flattr counts due to Flattr removing the API


  • new service MeWe
  • new service Buffer
  • fixed an issue in case the plugin dir has been moved via symlink


  • replaced Stumbleupon with its successor Mix (thanks to Mark)
  • added an option to hide WhatsApp on desktop devices
  • updated Odnoklassniki API
  • fixed an issue with WPML and some older Shariff setups


  • new high contrast theme (WCAG)
  • improved support for WPML for easier translation of headlines and info button texts
  • updated WhatsApp share link to support WhatsApp Web (thanks to Oliver, @oliverpw)
  • updated Spanish translations (thanks to Torsten, @torstenbulk)
  • updated Pinterest Share Count API
  • updated VK Share Count API
  • updated Pocket API
  • updated XING API
  • removed GooglePlus due to Google shutting GooglePlus down
  • fixed a PHP notice in regards to Tumblr (thanks to Mario, @mariobartlack)
  • fixed a conflict with another plugin (thanks to David, @daveshine)
  • tested with WordPress 5.1


  • removed LinkedIn Share Counts due to LinkedIn removing them completely
  • removed GooglePlus Share Counts due to Google shutting GooglePlus down
  • removed OpenShareCount due to the service having shut down
  • removed NewShareCount due to the service having shut down
  • removed Mastodon temporarily until a new working solution is available
  • deprecated GooglePlus as a service, will be removed with the next release
  • added TwitCount ( as an alternative for Twitter share counts
  • updated to Facebook Graph API v3.2
  • updated to WordPress Coding Standards 2.0
  • corrected minor typos
  • added the new logo thanks to Philipp Wildfeuer (@phil_sauvage)


  • 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


  • Unterstützung für den in WordPress 4.9.6 neu hinzugekommenen Leitfaden zur Datenschutzerklärung hinzugefügt
  • Kleinere CSS-Anpassungen
  • Kleinere Fehler behoben


  • new option to add Shariff to custom WordPress hooks
  • new option to support multilingual sites using WPML and other plugins
  • new support for WooCommerce products on the ranking table
  • new option to show different headlines based on share counts
  • updated button languages, now supporting 25 languages
  • fixed a bug causing share counts to not being displayed properly

Das vollständige Änderungsprotokoll kann hier eingesehen werden: