Version Description
- new service MeWe
- new service Buffer
- fixed an issue in case the plugin dir has been moved via symlink
Download this release
Release Info
Developer | starguide |
Plugin | Shariff Wrapper |
Version | 4.6.2 |
Comparing to | |
See all releases |
Code changes from version 4.6.1 to 4.6.2
- admin/admin-menu.php +7 -8
- bitcoin.php +1 -1
- changelog.txt +5 -0
- readme.txt +8 -3
- services/shariff-buffer.php +75 -0
- services/shariff-mewe.php +59 -0
- shariff.php +11 -8
admin/admin-menu.php
CHANGED
@@ -12,8 +12,7 @@ if ( ! class_exists( 'WP' ) ) {
|
|
12 |
}
|
13 |
|
14 |
// Set services that have a share count API / backend.
|
15 |
-
$shariff3uu_services_backend = array( 'facebook', 'twitter', 'pinterest', 'xing', 'reddit', 'tumblr', 'vk', 'addthis', 'flattr', 'odnoklassniki' );
|
16 |
-
|
17 |
|
18 |
// Adds the actions for the admin page.
|
19 |
add_action( 'admin_menu', 'shariff3uu_add_admin_menu' );
|
@@ -30,7 +29,8 @@ function shariff3uu_admin_style( $hook ) {
|
|
30 |
if ( 'settings_page_shariff3uu' === $hook ) {
|
31 |
// Scripts for pinterest default image media uploader.
|
32 |
wp_enqueue_media();
|
33 |
-
|
|
|
34 |
$translation_array = array(
|
35 |
'choose_image' => __( 'Choose image', 'shariff' ),
|
36 |
);
|
@@ -836,10 +836,9 @@ function shariff3uu_text_services_render() {
|
|
836 |
$services = '';
|
837 |
}
|
838 |
echo '<input type="text" name="shariff3uu_basic[services]" value="' . esc_html( $services ) . '" size="90" placeholder="twitter|facebook|linkedin|info">';
|
839 |
-
echo '<p><code>addthis|bitcoin|diaspora|facebook|flattr|flipboard|info|linkedin|mailto|mix</code></p>';
|
840 |
-
echo '<p><code>odnoklassniki|patreon|paypal|paypalme|pinterest|pocket|printer|qzone|reddit</code></p>';
|
841 |
-
echo '<p><code>
|
842 |
-
echo '<p><code>whatsapp|xing</code></p>';
|
843 |
echo '<p>' . esc_html__( 'Use the pipe sign | (Alt Gr + < or ⌥ + 7) between two or more services.', 'shariff' ) . '</p>';
|
844 |
}
|
845 |
|
@@ -1733,7 +1732,7 @@ function shariff3uu_help_section_callback() {
|
|
1733 |
// Services.
|
1734 |
echo '<div style="display:table-row">';
|
1735 |
echo '<div style="display:table-cell;border:1px solid;padding:10px">services</div>';
|
1736 |
-
echo '<div style="display:table-cell;border:1px solid;padding:10px">addthis<br>bitcoin<br>diaspora<br>facebook<br>flattr<br>flipboard<br>info<br>linkedin<br>mailto<br>mix<br>odnoklassniki<br>patreon<br>paypal<br>paypalme<br>pinterest<br>pocket<br>printer<br>qzone<br>reddit<br>rss<br>sms<br>telegram<br>tencentweibo<br>threema<br>tumblr<br>twitter<br>vk<br>wallabag<br>weibo<br>whatsapp<br>xing</div>';
|
1737 |
echo '<div style="display:table-cell;border:1px solid;padding:10px">twitter|facebook|linkedin|info</div>';
|
1738 |
echo '<div style="display:table-cell;border:1px solid;padding:10px">[shariff services="facebook|twitter|mailto"]</div>';
|
1739 |
echo '<div style="display:table-cell;border:1px solid;padding:10px">' . esc_html__( 'Determines which buttons to show and in which order.', 'shariff' ) . '</div>';
|
12 |
}
|
13 |
|
14 |
// Set services that have a share count API / backend.
|
15 |
+
$shariff3uu_services_backend = array( 'facebook', 'twitter', 'pinterest', 'xing', 'reddit', 'tumblr', 'vk', 'addthis', 'flattr', 'odnoklassniki', 'buffer' );
|
|
|
16 |
|
17 |
// Adds the actions for the admin page.
|
18 |
add_action( 'admin_menu', 'shariff3uu_add_admin_menu' );
|
29 |
if ( 'settings_page_shariff3uu' === $hook ) {
|
30 |
// Scripts for pinterest default image media uploader.
|
31 |
wp_enqueue_media();
|
32 |
+
$shariff_js_media_url = trailingslashit( plugins_url() ) . 'shariff/js/shariff-media.js';
|
33 |
+
wp_register_script( 'shariff_mediaupload', $shariff_js_media_url, array( 'jquery' ), '1.0', true );
|
34 |
$translation_array = array(
|
35 |
'choose_image' => __( 'Choose image', 'shariff' ),
|
36 |
);
|
836 |
$services = '';
|
837 |
}
|
838 |
echo '<input type="text" name="shariff3uu_basic[services]" value="' . esc_html( $services ) . '" size="90" placeholder="twitter|facebook|linkedin|info">';
|
839 |
+
echo '<p><code>addthis|bitcoin|buffer|diaspora|facebook|flattr|flipboard|info|linkedin|mailto|mewe|mix</code></p>';
|
840 |
+
echo '<p><code>odnoklassniki|patreon|paypal|paypalme|pinterest|pocket|printer|qzone|reddit|rss|sms</code></p>';
|
841 |
+
echo '<p><code>telegram|tencentweibo|threema|tumblr|twitter|vk|wallabag|weibo|whatsapp|xing</code></p>';
|
|
|
842 |
echo '<p>' . esc_html__( 'Use the pipe sign | (Alt Gr + < or ⌥ + 7) between two or more services.', 'shariff' ) . '</p>';
|
843 |
}
|
844 |
|
1732 |
// Services.
|
1733 |
echo '<div style="display:table-row">';
|
1734 |
echo '<div style="display:table-cell;border:1px solid;padding:10px">services</div>';
|
1735 |
+
echo '<div style="display:table-cell;border:1px solid;padding:10px">addthis<br>bitcoin<br>buffer<br>diaspora<br>facebook<br>flattr<br>flipboard<br>info<br>linkedin<br>mailto<br>mewe<br>mix<br>odnoklassniki<br>patreon<br>paypal<br>paypalme<br>pinterest<br>pocket<br>printer<br>qzone<br>reddit<br>rss<br>sms<br>telegram<br>tencentweibo<br>threema<br>tumblr<br>twitter<br>vk<br>wallabag<br>weibo<br>whatsapp<br>xing</div>';
|
1736 |
echo '<div style="display:table-cell;border:1px solid;padding:10px">twitter|facebook|linkedin|info</div>';
|
1737 |
echo '<div style="display:table-cell;border:1px solid;padding:10px">[shariff services="facebook|twitter|mailto"]</div>';
|
1738 |
echo '<div style="display:table-cell;border:1px solid;padding:10px">' . esc_html__( 'Determines which buttons to show and in which order.', 'shariff' ) . '</div>';
|
bitcoin.php
CHANGED
@@ -12,7 +12,7 @@ require './includes/phpqrcode.php';
|
|
12 |
$bitcoinaddress = htmlspecialchars( $_GET['bitcoinaddress'] );
|
13 |
|
14 |
// Creates the page.
|
15 |
-
echo '<html><head><title>Bitcoin</title></head><body>';
|
16 |
echo '<div style="text-align:center;"><h1>Bitcoin</h1></div>';
|
17 |
echo '<p style="text-align:center;"><a href="bitcoin:' . $bitcoinaddress . '">bitcoin:' . $bitcoinaddress . '</a></p>';
|
18 |
echo '<p style="text-align:center;">';
|
12 |
$bitcoinaddress = htmlspecialchars( $_GET['bitcoinaddress'] );
|
13 |
|
14 |
// Creates the page.
|
15 |
+
echo '<html lang="en"><head><title>Bitcoin</title></head><body>';
|
16 |
echo '<div style="text-align:center;"><h1>Bitcoin</h1></div>';
|
17 |
echo '<p style="text-align:center;"><a href="bitcoin:' . $bitcoinaddress . '">bitcoin:' . $bitcoinaddress . '</a></p>';
|
18 |
echo '<p style="text-align:center;">';
|
changelog.txt
CHANGED
@@ -2,6 +2,11 @@
|
|
2 |
|
3 |
== Changelog ==
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
= 4.6.1 =
|
6 |
- replaced Stumbleupon with its successor Mix (thanks to Mark)
|
7 |
- added an option to hide WhatsApp on desktop devices
|
2 |
|
3 |
== Changelog ==
|
4 |
|
5 |
+
= 4.6.2 =
|
6 |
+
- new service MeWe
|
7 |
+
- new service Buffer
|
8 |
+
- fixed an issue in case the plugin dir has been moved via symlink
|
9 |
+
|
10 |
= 4.6.1 =
|
11 |
- replaced Stumbleupon with its successor Mix (thanks to Mark)
|
12 |
- added an option to hide WhatsApp on desktop devices
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: starguide, 3UU
|
3 |
Tags: Shariff, GDPR, DSGVO, share buttons, sharing
|
4 |
Requires at least: 4.9
|
5 |
-
Requires PHP: 7.
|
6 |
Tested up to: 5.1
|
7 |
-
Stable tag: 4.6.
|
8 |
License: MIT
|
9 |
License URI: http://opensource.org/licenses/mit
|
10 |
|
@@ -12,7 +12,7 @@ Shariff provides share buttons that respect the privacy of your visitors and fol
|
|
12 |
|
13 |
== Description ==
|
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
|
16 |
|
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).
|
18 |
|
@@ -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.6.1 =
|
156 |
- replaced Stumbleupon with its successor Mix (thanks to Mark)
|
157 |
- added an option to hide WhatsApp on desktop devices
|
2 |
Contributors: starguide, 3UU
|
3 |
Tags: Shariff, GDPR, DSGVO, share buttons, sharing
|
4 |
Requires at least: 4.9
|
5 |
+
Requires PHP: 7.0
|
6 |
Tested up to: 5.1
|
7 |
+
Stable tag: 4.6.2
|
8 |
License: MIT
|
9 |
License URI: http://opensource.org/licenses/mit
|
10 |
|
12 |
|
13 |
== Description ==
|
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 32 services in 25 languages: AddThis, Bitcoin, Buffer, Diaspora, Facebook, Flattr, Flipboard, LinkedIn, mailto, MeWe, Odnoklassniki, Patreon, PayPal, PayPal.me, Pinterest, Pocket, Printer, Qzone, Reddit, RSS, SMS, Stumbleupon, Telegram, TencentWeibo, Threema, Tumblr, Twitter, VK, Wallabag, Weibo, WhatsApp, Xing.
|
16 |
|
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).
|
18 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
= 4.6.2 =
|
156 |
+
- new service MeWe
|
157 |
+
- new service Buffer
|
158 |
+
- fixed an issue in case the plugin dir has been moved via symlink
|
159 |
+
|
160 |
= 4.6.1 =
|
161 |
- replaced Stumbleupon with its successor Mix (thanks to Mark)
|
162 |
- added an option to hide WhatsApp on desktop devices
|
services/shariff-buffer.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Will be included in the shariff.php only, when Buffer is requested as a service.
|
4 |
+
*
|
5 |
+
* @package Shariff Wrapper
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Prevent direct calls.
|
9 |
+
if ( ! class_exists( 'WP' ) ) {
|
10 |
+
die();
|
11 |
+
}
|
12 |
+
|
13 |
+
// Check if we need the frontend or the backend part.
|
14 |
+
if ( isset( $frontend ) && 1 === $frontend ) {
|
15 |
+
// Service URL.
|
16 |
+
$service_url = esc_url( 'https://buffer.com/add' );
|
17 |
+
|
18 |
+
// Build the button URL.
|
19 |
+
$button_url = $service_url . '?url=' . $share_url . '&text=' . $share_title;
|
20 |
+
|
21 |
+
// Set the Colors (Hexadecimal including the #).
|
22 |
+
$main_color = '#168eea';
|
23 |
+
$secondary_color = '#329ced';
|
24 |
+
$wcag_color = '#0C5B97';
|
25 |
+
|
26 |
+
// SVG icon.
|
27 |
+
$svg_icon = '<svg xmlns="http://www.w3.org/2000/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1-.4-1.6-1.5-1.5h-5.8c-.6 0-1.2.1-1.4-.7a5.7 5.7 0 0 1 5.4-7.6c1.3 0 2.5.4 3.5 1.1s1.5.4 2-.5l2.7-4.1c1-1.8 1-2-.7-3.2a17.7 17.7 0 0 0-8.1-2.7 15 15 0 0 0-15.2 7.2c-1.6 2.8-2 5.8-2 8.9.2 1.3-.3 1.8-1.6 1.7h-4.4c-1 0-1.4.4-1.4 1.3v7.8c0 1.1.5 1.4 1.5 1.4h4.2c1.4-.1 1.7.5 1.7 1.8v15z"/><path fill="' . $main_color . '" d="M.3 14.1L29.3.5c1.7-.7 3.2-.6 4.9.1C43.3 5 52.5 9.1 61.5 13.5c.7.3 1.4.5 1.4 1.3 0 1-.9 1.1-1.5 1.4-8.7 4.2-17.5 8.2-26.2 12.3a7.8 7.8 0 0 1-7 0L.3 15.5v-1.4zM.3 48.8l5.1-2.6c2.2-1 4.2-.9 6.3.1l16.8 8c2.1 1 4.1 1 6.2 0l17.1-8c2.1-1 4.1-1 6.2 0l3.8 1.7c.6.3 1.4.6 1.3 1.3 0 .7-.7 1-1.3 1.3l-12.7 6-14.4 6.7c-1.8.9-3.7 1-5.6 0L2 50.9c-.6-.2-1-.7-1.6-1-.2-.2-.2-.6-.2-1z"/><path fill="' . $main_color . '" d="M.3 31.5l4-1.9c3-1.8 5.7-1.4 8.8.1 5.3 2.7 10.6 5 15.9 7.5 2 .9 3.7.9 5.6 0 5.6-2.7 11.3-5.2 16.9-8a7.2 7.2 0 0 1 6.9 0c1.2.8 2.6 1.3 3.9 2 1 .6 1 1.3 0 2l-1 .4-26.9 12.5c-1.8.9-3.6.9-5.3 0L2.2 33.6c-.7-.3-1.2-.8-1.9-1v-1z"/></svg>';
|
28 |
+
|
29 |
+
// Backend available?
|
30 |
+
$backend_available = 1;
|
31 |
+
|
32 |
+
// Button alt label.
|
33 |
+
$button_title_array = array(
|
34 |
+
'bg' => 'Сподели в buffer',
|
35 |
+
'cs' => 'Sdílet na buffer',
|
36 |
+
'da' => 'Del på buffer',
|
37 |
+
'de' => 'Bei buffer teilen',
|
38 |
+
'en' => 'Share on buffer',
|
39 |
+
'es' => 'Compartir en buffer',
|
40 |
+
'fi' => 'Jaa bufferissä',
|
41 |
+
'fr' => 'Partager sur buffer',
|
42 |
+
'hr' => 'Podijelite na buffer',
|
43 |
+
'hu' => 'Megosztás bufferen',
|
44 |
+
'it' => 'Condividi su buffer',
|
45 |
+
'ja' => 'buffer上で共有',
|
46 |
+
'ko' => 'buffer에서 공유하기',
|
47 |
+
'nl' => 'Delen op buffer',
|
48 |
+
'no' => 'Del på buffer',
|
49 |
+
'pl' => 'Udostępnij przez buffer',
|
50 |
+
'pt' => 'Compartilhar no buffer',
|
51 |
+
'ro' => 'Partajează pe buffer',
|
52 |
+
'ru' => 'Поделиться на buffer',
|
53 |
+
'sk' => 'Zdieľať na buffer',
|
54 |
+
'sl' => 'Deli na buffer',
|
55 |
+
'sr' => 'Podeli na buffer',
|
56 |
+
'sv' => 'Dela på buffer',
|
57 |
+
'tr' => 'buffer\'ta paylaş',
|
58 |
+
'zh' => '在buffer上分享',
|
59 |
+
);
|
60 |
+
} elseif ( isset( $backend ) && 1 === $backend ) {
|
61 |
+
// Get share counts.
|
62 |
+
$buffer = sanitize_text_field( wp_remote_retrieve_body( wp_remote_get( 'https://api.bufferapp.com/1/links/shares.json?url=' . $post_url ) ) );
|
63 |
+
// Decode the json response.
|
64 |
+
$buffer_json = json_decode( $buffer, true );
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Stores results.
|
68 |
+
* Records errors, if enabled (e.g. request from the status tab).
|
69 |
+
*/
|
70 |
+
if ( isset( $buffer_json['shares'] ) ) {
|
71 |
+
$share_counts['buffer'] = intval( $buffer_json['shares'] );
|
72 |
+
} elseif ( isset( $record_errors ) && 1 === $record_errors ) {
|
73 |
+
$service_errors['buffer'] = $buffer;
|
74 |
+
}
|
75 |
+
}; // End if backend.
|
services/shariff-mewe.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Will be included in the shariff.php only, when MeWe is requested as a service.
|
4 |
+
*
|
5 |
+
* @package Shariff Wrapper
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Prevent direct calls.
|
9 |
+
if ( ! class_exists( 'WP' ) ) {
|
10 |
+
die();
|
11 |
+
}
|
12 |
+
|
13 |
+
// Check if we need the frontend or the backend part.
|
14 |
+
if ( isset( $frontend ) && 1 === $frontend ) {
|
15 |
+
// Service URL.
|
16 |
+
$service_url = esc_url( 'https://mewe.com/share' );
|
17 |
+
|
18 |
+
// Build the button URL.
|
19 |
+
$button_url = $service_url . '?link=' . $share_url;
|
20 |
+
|
21 |
+
// Set the Colors (Hexadecimal including the #).
|
22 |
+
$main_color = '#16387D';
|
23 |
+
$secondary_color = '#187ca5';
|
24 |
+
$wcag_color = '#16387D';
|
25 |
+
|
26 |
+
// SVG icon.
|
27 |
+
$svg_icon = '<svg width="32px" height="32px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="' . $main_color . '" d="M7.48,9.21a1.46,1.46,0,1,1-2.92,0h0a1.46,1.46,0,1,1,2.92,0Zm7.3,0a1.52,1.52,0,1,1-1.52-1.52A1.52,1.52,0,0,1,14.78,9.21Zm8.52,0a1.52,1.52,0,1,1-1.52-1.52A1.52,1.52,0,0,1,23.3,9.21Zm8.53,0a1.47,1.47,0,0,1-2.93,0h0a1.47,1.47,0,0,1,2.93,0ZM.17,13.35a1.09,1.09,0,0,1,1.1-1.09h.12a1,1,0,0,1,1,.61L6,18.46l3.65-5.59a.8.8,0,0,1,.85-.61h.25a1,1,0,0,1,1,1.09v9.74a1,1,0,0,1-.7,1.19,1.24,1.24,0,0,1-.27,0,1.11,1.11,0,0,1-1.11-1.09s0-.09,0-.13V16.15l-2.8,4.26a1.08,1.08,0,0,1-1,.61c-.37,0-.61-.24-.86-.61l-2.8-4.26v7.06a1,1,0,0,1-1.09,1,1,1,0,0,1-1-1Zm13.15.37a1.35,1.35,0,0,1,0-.49,1,1,0,0,1,1-1,1.05,1.05,0,0,1,1,.73l2.8,8.15L20.75,13a.92.92,0,0,1,1-.73h.12c.61,0,1,.24,1.1.73l2.68,8.15L28.3,13a1,1,0,0,1,1-.73,1.06,1.06,0,0,1,1.09,1,1,1,0,0,1,0,.49l-3.65,9.74a1,1,0,0,1-1,.85H25.5a1.31,1.31,0,0,1-1.1-.85l-2.56-7.67-2.67,7.67a1.32,1.32,0,0,1-1.1.85h-.24a1,1,0,0,1-1-.85Z"/></svg>';
|
28 |
+
|
29 |
+
// Backend available?
|
30 |
+
$backend_available = 0;
|
31 |
+
|
32 |
+
// Button alt label.
|
33 |
+
$button_title_array = array(
|
34 |
+
'bg' => 'Сподели във MeWe',
|
35 |
+
'cs' => 'Sdílet na MeWeu',
|
36 |
+
'da' => 'Del på MeWe',
|
37 |
+
'de' => 'Bei MeWe teilen',
|
38 |
+
'en' => 'Share on MeWe',
|
39 |
+
'es' => 'Compartir en MeWe',
|
40 |
+
'fi' => 'Jaa MeWeissa',
|
41 |
+
'fr' => 'Partager sur MeWe',
|
42 |
+
'hr' => 'Podijelite na MeWeu',
|
43 |
+
'hu' => 'Megosztás MeWeon',
|
44 |
+
'it' => 'Condividi su MeWe',
|
45 |
+
'ja' => 'フェイスブック上で共有',
|
46 |
+
'ko' => '페이스북에서 공유하기',
|
47 |
+
'nl' => 'Delen op MeWe',
|
48 |
+
'no' => 'Del på MeWe',
|
49 |
+
'pl' => 'Udostępnij na MeWeu',
|
50 |
+
'pt' => 'Compartilhar no MeWe',
|
51 |
+
'ro' => 'Partajează pe MeWe',
|
52 |
+
'ru' => 'Поделиться на MeWe',
|
53 |
+
'sk' => 'Zdieľať na MeWeu',
|
54 |
+
'sl' => 'Deli na MeWeu',
|
55 |
+
'sr' => 'Podeli na MeWe-u',
|
56 |
+
'sv' => 'Dela på MeWe',
|
57 |
+
'tr' => 'MeWe\'ta paylaş',
|
58 |
+
);
|
59 |
+
}
|
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.6.
|
7 |
* Author: Jan-Peter Lambeck & 3UU
|
8 |
* Author URI: https://wordpress.org/plugins/shariff/
|
9 |
* License: MIT
|
@@ -33,7 +33,7 @@ $shariff3uu = array_merge( $shariff3uu_basic, $shariff3uu_design, $shariff3uu_ad
|
|
33 |
*/
|
34 |
function shariff3uu_update() {
|
35 |
// Adjust code version.
|
36 |
-
$code_version = '4.6.
|
37 |
|
38 |
// Get options.
|
39 |
$shariff3uu = $GLOBALS['shariff3uu'];
|
@@ -974,29 +974,32 @@ function shariff3uu_render( $atts ) {
|
|
974 |
// Enqueues the stylesheet (loading it here makes sure that it is only loaded on pages that actually contain shariff buttons).
|
975 |
// If SCRIPT_DEBUG is set to true, the non minified version will be loaded.
|
976 |
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ) {
|
977 |
-
|
978 |
} else {
|
979 |
-
|
980 |
}
|
|
|
981 |
|
982 |
// Enqueues the share count script (the JS should be loaded at the footer - make sure that wp_footer() is present in your theme!)
|
983 |
// If SCRIPT_DEBUG is set to true, the non minified version will be loaded.
|
984 |
if ( array_key_exists( 'backend', $atts ) && 'on' === $atts['backend'] ) {
|
985 |
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ) {
|
986 |
-
|
987 |
} else {
|
988 |
-
|
989 |
}
|
|
|
990 |
}
|
991 |
|
992 |
// Enqueues the popup script (the JS should be loaded at the footer - make sure that wp_footer() is present in your theme!).
|
993 |
// If SCRIPT_DEBUG is set to true, the non minified version will be loaded.
|
994 |
if ( array_key_exists( 'popup', $atts ) && 1 === $atts['popup'] ) {
|
995 |
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ) {
|
996 |
-
|
997 |
} else {
|
998 |
-
|
999 |
}
|
|
|
1000 |
}
|
1001 |
|
1002 |
// Sets the share url.
|
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.6.2
|
7 |
* Author: Jan-Peter Lambeck & 3UU
|
8 |
* Author URI: https://wordpress.org/plugins/shariff/
|
9 |
* License: MIT
|
33 |
*/
|
34 |
function shariff3uu_update() {
|
35 |
// Adjust code version.
|
36 |
+
$code_version = '4.6.2';
|
37 |
|
38 |
// Get options.
|
39 |
$shariff3uu = $GLOBALS['shariff3uu'];
|
974 |
// Enqueues the stylesheet (loading it here makes sure that it is only loaded on pages that actually contain shariff buttons).
|
975 |
// If SCRIPT_DEBUG is set to true, the non minified version will be loaded.
|
976 |
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ) {
|
977 |
+
$shariff_css_url = trailingslashit( plugins_url() ) . 'shariff/css/shariff.css';
|
978 |
} else {
|
979 |
+
$shariff_css_url = trailingslashit( plugins_url() ) . 'shariff/css/shariff.min.css';
|
980 |
}
|
981 |
+
wp_enqueue_style( 'shariffcss', $shariff_css_url, '', $shariff3uu['version'] );
|
982 |
|
983 |
// Enqueues the share count script (the JS should be loaded at the footer - make sure that wp_footer() is present in your theme!)
|
984 |
// If SCRIPT_DEBUG is set to true, the non minified version will be loaded.
|
985 |
if ( array_key_exists( 'backend', $atts ) && 'on' === $atts['backend'] ) {
|
986 |
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ) {
|
987 |
+
$shariff_js_url = trailingslashit( plugins_url() ) . 'shariff/js/shariff.js';
|
988 |
} else {
|
989 |
+
$shariff_js_url = trailingslashit( plugins_url() ) . 'shariff/js/shariff.min.js';
|
990 |
}
|
991 |
+
wp_enqueue_script( 'shariffjs', $shariff_js_url, '', $shariff3uu['version'], true );
|
992 |
}
|
993 |
|
994 |
// Enqueues the popup script (the JS should be loaded at the footer - make sure that wp_footer() is present in your theme!).
|
995 |
// If SCRIPT_DEBUG is set to true, the non minified version will be loaded.
|
996 |
if ( array_key_exists( 'popup', $atts ) && 1 === $atts['popup'] ) {
|
997 |
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true ) {
|
998 |
+
$shariff_js_popup_url = trailingslashit( plugins_url() ) . 'shariff/js/shariff-popup.js';
|
999 |
} else {
|
1000 |
+
$shariff_js_popup_url = trailingslashit( plugins_url() ) . 'shariff/js/shariff-popup.min.js';
|
1001 |
}
|
1002 |
+
wp_enqueue_script( 'shariff_popup', $shariff_js_popup_url, '', $shariff3uu['version'], true );
|
1003 |
}
|
1004 |
|
1005 |
// Sets the share url.
|