Skip to content

Instantly share code, notes, and snippets.

@IT-Cru
Created August 11, 2015 08:15
Show Gist options
  • Save IT-Cru/8a975fd0a9b2be268c51 to your computer and use it in GitHub Desktop.
Save IT-Cru/8a975fd0a9b2be268c51 to your computer and use it in GitHub Desktop.
WhatsApp support for D7 minimal_share
diff --git a/css/minimal-share.css b/css/minimal-share.css
index 1044c4c..d8bc5d8 100644
--- a/css/minimal-share.css
+++ b/css/minimal-share.css
@@ -50,6 +50,10 @@
background-color: #32506d;
}
+.minimal-share > .whatsapp {
+ background-color: #4dc247;
+}
+
.minimal-share > .email,
.minimal-share > .print {
color: #666;
diff --git a/minimal_share.module b/minimal_share.module
index c469409..12a8d2b 100644
--- a/minimal_share.module
+++ b/minimal_share.module
@@ -166,6 +166,12 @@ function minimal_share_minimal_share_services() {
'unicode' => '59394',
'count_callback' => 'minimal_share_twitter_count',
),
+ 'whatsapp' => array(
+ 'enabled' => FALSE,
+ 'title' => t('WhatsApp'),
+ 'url' => 'whatsapp://send?text=[title]%20-%20[url]',
+ 'icon' => FALSE,
+ ),
'gplus' => array(
'title' => t('Google+'),
'url' => 'https://plus.google.com/share?url=[url]',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment