diff --git a/app/assets/javascripts/discourse/initializers/sharing-sources.js.es6 b/app/assets/javascripts/discourse/initializers/sharing-sources.js.es6
index ccdb15f0f..e48f4a9d1 100644
--- a/app/assets/javascripts/discourse/initializers/sharing-sources.js.es6
+++ b/app/assets/javascripts/discourse/initializers/sharing-sources.js.es6
@@ -14,7 +14,7 @@ export default {
Sharing.addSource({
id: 'twitter',
- iconClass: 'fa-twitter-square',
+ faIcon: 'fa-twitter-square',
generateUrl: function(link, title) {
return "http://twitter.com/intent/tweet?url=" + encodeURIComponent(link) + "&text=" + encodeURIComponent(title);
},
@@ -24,7 +24,7 @@ export default {
Sharing.addSource({
id: 'facebook',
- iconClass: 'fa-facebook-square',
+ faIcon: 'fa-facebook-square',
generateUrl: function(link, title) {
return "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(link) + '&t=' + encodeURIComponent(title);
},
@@ -33,7 +33,7 @@ export default {
Sharing.addSource({
id: 'google+',
- iconClass: 'fa-google-plus-square',
+ faIcon: 'fa-google-plus-square',
generateUrl: function(link) {
return "https://plus.google.com/share?url=" + encodeURIComponent(link);
},
@@ -43,7 +43,7 @@ export default {
Sharing.addSource({
id: 'email',
- iconClass: 'fa-envelope-square',
+ faIcon: 'fa-envelope-square',
generateUrl: function(link, title) {
return "mailto:?to=&subject=" + encodeURIComponent('[' + Discourse.SiteSettings.title + '] ' + title) + "&body=" + encodeURIComponent(link);
}
diff --git a/app/assets/javascripts/discourse/lib/sharing.js.es6 b/app/assets/javascripts/discourse/lib/sharing.js.es6
index e695119c7..955618f07 100644
--- a/app/assets/javascripts/discourse/lib/sharing.js.es6
+++ b/app/assets/javascripts/discourse/lib/sharing.js.es6
@@ -9,8 +9,10 @@
// This id must be present in the `share_links` site setting too
id: 'twitter',
- // The icon that will be displayed
- iconClass: 'fa-twitter-square',
+ // The icon that will be displayed, choose between font awesome class name `faIcon` and custom HTML `htmlIcon`.
+ // When both provided, prefer `faIcon`
+ faIcon: 'fa-twitter-square'
+ htmlIcon: '',
// A callback for generating the remote link from the `link` and `title`
generateUrl: function(link, title) {
diff --git a/app/assets/javascripts/discourse/templates/components/share-source.hbs b/app/assets/javascripts/discourse/templates/components/share-source.hbs
index 252538793..aca17c8b7 100644
--- a/app/assets/javascripts/discourse/templates/components/share-source.hbs
+++ b/app/assets/javascripts/discourse/templates/components/share-source.hbs
@@ -1 +1,7 @@
-
+
+ {{#if source.faIcon}}
+
+ {{else}}
+ {{{source.htmlIcon}}}
+ {{/if}}
+
diff --git a/app/assets/javascripts/discourse/templates/share.hbs b/app/assets/javascripts/discourse/templates/share.hbs
index 0797ac723..2270c3778 100644
--- a/app/assets/javascripts/discourse/templates/share.hbs
+++ b/app/assets/javascripts/discourse/templates/share.hbs
@@ -6,7 +6,7 @@
{{/if}}