Repository navigation
Releases
Releases · owebstudio/kirby-whatsapp-button
2.0.0
WhatsApp Button 2.0 works with Kirby 5 and Kirby 6, can be set up in the Panel and knows your office hours.
New
- Panel settings. Add
tabs/whatsapp-buttonto your site blueprint, and editors can change the number, the name, the avatar, the messages, the agents and the office hours. Empty fields keep the values from your config. - Multiple agents. List several people or teams, each with their own number, status and avatar. Visitors choose who they want to chat with.
- Office hours. Set the days and times you are available. Outside of them, the button shows an offline status and its own messages, or hides itself. The check runs in the browser of the visitor, so it also works with Kirby's page cache.
- Page placeholders. Messages can contain
{{ page.title }}and{{ page.url }}, so you know which page a visitor wrote from. - Translations. All texts are available in English, German and Turkish and follow the language of the page.
- Keyboard and screen readers. The buttons are real buttons with labels, Enter sends the message and Escape closes the chat window.
Fixed
- Messages with
&,#,+or%arrived cut off in WhatsApp. - The default avatar was loaded from ui-avatars.com with the name of your site for every visitor. It now shows the initials of the name, without a request to another service.
- The message input used the default font of the browser instead of the font of your site.
- Two buttons on one page got in each other's way.
- The chat window didn't fit on small screens.
- The plugin read the site title while it was loaded, before other plugins and the current language.
doNotDisturbopened the chat window even withautoOpenturned off.
Changed
- The widget starts without an inline script, so it works with a Content Security Policy.
- The stylesheet and the script are loaded with a cache busting URL. The plugin has no build step anymore.
- WhatsApp links use
https://wa.me/. - The plugin sets no cookies anymore.
doNotDisturbremembers the opened chat window in the session storage.
Breaking changes
- Requires Kirby 5 or 6 and PHP 8.2 or newer. For Kirby 3.4 to 4, keep using 1.0.3.
- Without an
avatar, the chat window shows the initials of the name instead of an image from ui-avatars.com. - The assets moved to
assets/whatsapp-button.cssandassets/whatsapp-button.js, the container has nowhatsapp-buttonID anymore, and the open chat window only uses theis-openclass. If you styled the widget, check your CSS.
See the README for all options and the upgrade notes.
Repository: https://github.com/owebstudio/kirby-whatsapp-button
License: MIT, see LICENSE
1.0.3
Security
- The chat name, status, messages and badge text are now always shown as plain text. Before, HTML in these options was rendered on the page. Because the name defaults to the site title, anyone who could edit the site title in the Panel could run scripts for every visitor of your site. Please update.
- A value like
<!--in one of the options no longer breaks the rest of the page.
Upgrade notes
- If you used HTML in these options (for example
<br>in a message), it is now shown as text. HTML was never documented as supported. - No other changes. Replace the plugin folder to update.