Add Viber to the "Share Buttons" widget. #29332
Pantelaz
started this conversation in
Feature Request
Replies: 1 comment 1 reply
-
Is Viber still alive? XD |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
What problem is your feature request going to solve? Please describe..
In Elementor Pro "Share Buttons" widget, there are plenty of options to choose, so you can share your pages and posts to many platforms, however, Viber is missing.
Describe the solution you'd like.
Considering WhatsApp is already being there, why not add a Viber as well. I think many people who have strong Viber communities will find it useful. On top of that, Elementor already supports Viber in some other parts of application - for example:
Button widget > Link > Dynamic Tags > Contact URL > Type > Viber
Describe alternatives you've considered.
No response
Additional context
Upon inspecting the Elementor and Elementor Pro plugins, I was able to modify 2 files in total to add this feature, and it took under than 5 minutes.
In Elementor plugin we have file 'elementor/assets/lib/share-link/share-link.js'.
In this file we have a JavaScript object:
ShareLink.networkTemplates
Inside this object, we can add:
viber: 'viber://forward?text={text}\x20{url}',
Note: This file also have minified version, so I had to add it there as well.
In Elementor Pro plugin, we have file 'elementor-pro/modules/share-buttons/module.php'
In this file we have a PHP associative array
$networks
inModule
class:Inside this array we should add:
'viber' => [ 'title' => 'Viber', ],
I have tested this code and I can verify that it works on android devices and I think that it should also work on iOS.
Viber application must be installed on the device in order for it to work.
Hope this helps!
Agreement
Beta Was this translation helpful? Give feedback.
All reactions