Version Description
Release date: September 19, 2022
Changelog: - Fix: Link to correct page in correct language (if site is multilingual)
Download this release
Release Info
Developer | buttonizer |
Plugin | Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer |
Version | 3.2.1 |
Comparing to | |
See all releases |
Code changes from version 3.2.0 to 3.2.1
- buttonizer.php +2 -2
- init.php +75 -9
- readme.txt +13 -8
buttonizer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Buttonizer - Smart Floating Action Button
|
4 |
* Plugin URI: https://buttonizer.io
|
5 |
* Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
|
6 |
-
* Version: 3.2.
|
7 |
* Author: Buttonizer
|
8 |
* Author URI: https://buttonizer.pro
|
9 |
* License: GPLv3
|
@@ -24,7 +24,7 @@
|
|
24 |
*/
|
25 |
|
26 |
// Define current Buttonizer version
|
27 |
-
define('BUTTONIZER_VERSION', '3.2.
|
28 |
define('BUTTONIZER_PLUGIN_FILE', __FILE__);
|
29 |
|
30 |
// Get environment vars
|
3 |
* Plugin Name: Buttonizer - Smart Floating Action Button
|
4 |
* Plugin URI: https://buttonizer.io
|
5 |
* Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
|
6 |
+
* Version: 3.2.1
|
7 |
* Author: Buttonizer
|
8 |
* Author URI: https://buttonizer.pro
|
9 |
* License: GPLv3
|
24 |
*/
|
25 |
|
26 |
// Define current Buttonizer version
|
27 |
+
define('BUTTONIZER_VERSION', '3.2.1');
|
28 |
define('BUTTONIZER_PLUGIN_FILE', __FILE__);
|
29 |
|
30 |
// Get environment vars
|
init.php
CHANGED
@@ -14,8 +14,65 @@
|
|
14 |
use Buttonizer\Admin\Admin;
|
15 |
use Buttonizer\Utils\Settings;
|
16 |
use Buttonizer\Api\Api;
|
|
|
17 |
use Buttonizer\Utils\PermissionCheck;
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
// Check Buttonizer Legacy enabled
|
20 |
if (
|
21 |
// Check if legacy was forced
|
@@ -36,9 +93,13 @@ if (
|
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
-
*
|
40 |
*/
|
|
|
41 |
|
|
|
|
|
|
|
42 |
add_action('wp_enqueue_scripts', function () {
|
43 |
// Add Google Analytics (old setting from Buttonizer 2.x)
|
44 |
if (Settings::isset("google_analytics")) {
|
@@ -58,6 +119,11 @@ if (
|
|
58 |
if (Settings::getSetting("site_id")) {
|
59 |
wp_register_script('buttonizer_integration_script', 'https://cdn.buttonizer.io/embed.js', [], BUTTONIZER_VERSION, true);
|
60 |
|
|
|
|
|
|
|
|
|
|
|
61 |
// Add Buttonize page data
|
62 |
if (Settings::getSetting("include_page_data", false)) {
|
63 |
// Get page categories
|
@@ -66,21 +132,21 @@ if (
|
|
66 |
}, get_the_category());
|
67 |
|
68 |
// Collect page data
|
69 |
-
$pageData = [
|
70 |
"page_id" => get_the_ID(),
|
71 |
"categories" => $pageCategories,
|
72 |
"is_frontpage" => is_front_page(),
|
73 |
"is_404" => is_404(),
|
74 |
"user_roles" => PermissionCheck::getUserRoles()
|
75 |
-
];
|
|
|
76 |
|
77 |
-
|
78 |
-
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
}
|
84 |
|
85 |
// Add Buttonizer integration script
|
86 |
wp_add_inline_script('buttonizer_integration_script', "
|
14 |
use Buttonizer\Admin\Admin;
|
15 |
use Buttonizer\Utils\Settings;
|
16 |
use Buttonizer\Api\Api;
|
17 |
+
use Buttonizer\Utils\PageLanguage;
|
18 |
use Buttonizer\Utils\PermissionCheck;
|
19 |
|
20 |
+
/**
|
21 |
+
* Get current languages
|
22 |
+
*/
|
23 |
+
function getCurrentLanguage()
|
24 |
+
{
|
25 |
+
// Polylang
|
26 |
+
if (function_exists("pll_current_language")) {
|
27 |
+
return pll_current_language("slug");
|
28 |
+
}
|
29 |
+
|
30 |
+
// Weglot
|
31 |
+
if (function_exists("weglot_get_current_language")) {
|
32 |
+
return weglot_get_current_language();
|
33 |
+
}
|
34 |
+
|
35 |
+
// WMPL
|
36 |
+
$currentLanguage = apply_filters('wpml_current_language', NULL);
|
37 |
+
|
38 |
+
// Try to fall back on current language
|
39 |
+
if (!$currentLanguage) return substr(get_bloginfo('language'), 0, 2);
|
40 |
+
|
41 |
+
return $currentLanguage;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Custom language
|
46 |
+
*
|
47 |
+
* Automatically redirects to the page in current language
|
48 |
+
*/
|
49 |
+
function buttonizer_redirect_to_page()
|
50 |
+
{
|
51 |
+
// Validate params
|
52 |
+
if (!isset($_GET['page_id']) || !is_numeric($_GET['page_id']) || !isset($_GET['is_buttonizer_redirect'])) {
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
|
56 |
+
$id = $_GET['page_id'];
|
57 |
+
$page = null;
|
58 |
+
|
59 |
+
// Polylang
|
60 |
+
if (function_exists("pll_get_post")) {
|
61 |
+
$page = pll_get_post($id);
|
62 |
+
}
|
63 |
+
|
64 |
+
// Check WPML translated page
|
65 |
+
if (!$page && $wpmlObject = apply_filters('wpml_object_id', $id)) {
|
66 |
+
$page = $wpmlObject;
|
67 |
+
}
|
68 |
+
|
69 |
+
// Redirect if post was found
|
70 |
+
if ($redirectUrl = get_the_permalink($page ?? $id)) {
|
71 |
+
wp_redirect($redirectUrl);
|
72 |
+
exit;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
// Check Buttonizer Legacy enabled
|
77 |
if (
|
78 |
// Check if legacy was forced
|
93 |
}
|
94 |
|
95 |
/**
|
96 |
+
* Redirect to page in correct language
|
97 |
*/
|
98 |
+
add_action('template_redirect', 'buttonizer_redirect_to_page', 0);
|
99 |
|
100 |
+
/**
|
101 |
+
* Add Buttonizer scripts
|
102 |
+
*/
|
103 |
add_action('wp_enqueue_scripts', function () {
|
104 |
// Add Google Analytics (old setting from Buttonizer 2.x)
|
105 |
if (Settings::isset("google_analytics")) {
|
119 |
if (Settings::getSetting("site_id")) {
|
120 |
wp_register_script('buttonizer_integration_script', 'https://cdn.buttonizer.io/embed.js', [], BUTTONIZER_VERSION, true);
|
121 |
|
122 |
+
// Get current page language
|
123 |
+
$pageData = [
|
124 |
+
"language" => getCurrentLanguage()
|
125 |
+
];
|
126 |
+
|
127 |
// Add Buttonize page data
|
128 |
if (Settings::getSetting("include_page_data", false)) {
|
129 |
// Get page categories
|
132 |
}, get_the_category());
|
133 |
|
134 |
// Collect page data
|
135 |
+
$pageData = array_merge([
|
136 |
"page_id" => get_the_ID(),
|
137 |
"categories" => $pageCategories,
|
138 |
"is_frontpage" => is_front_page(),
|
139 |
"is_404" => is_404(),
|
140 |
"user_roles" => PermissionCheck::getUserRoles()
|
141 |
+
], $pageData);
|
142 |
+
}
|
143 |
|
144 |
+
// Define page data
|
145 |
+
$buttonizerData = "if(!window._buttonizer) { window._buttonizer = {}; };var _buttonizer_page_data = " . json_encode($pageData) . ";window._buttonizer.data = { ..._buttonizer_page_data, ...window._buttonizer.data };";
|
146 |
|
147 |
+
wp_register_script('buttonizer_data', "");
|
148 |
+
wp_add_inline_script('buttonizer_data', $buttonizerData);
|
149 |
+
wp_enqueue_script('buttonizer_data');
|
|
|
150 |
|
151 |
// Add Buttonizer integration script
|
152 |
wp_add_inline_script('buttonizer_integration_script', "
|
readme.txt
CHANGED
@@ -1,20 +1,19 @@
|
|
1 |
-
=== Smart Floating / Sticky Buttons - Call, Sharing, Chat Widgets
|
2 |
Contributors: Buttonizer, freemius
|
3 |
Buy plugin: https://buttonizer.io
|
4 |
Tags: Conversion, action button, call, marketing, Social Sharing
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 6.0
|
7 |
-
Stable tag: 3.2.
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
12 |
-
|
13 |
#1 Button builder. WhatsApp Chat, Facebook Messenger, Telegram, Call, SMS, Email & More. Unlimited Click to Chat, Floating Buttons, Contact Forms & Sticky Menus. With dynamic Page Rules. Use the WhatsApp widget Pop-up to convert your visitors.
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
-
From WhatsApp Chat, Facebook Messenger, Floating contactform, WhatsApp widgets (New: WhatsApp Business), Click to Chat, Call, Email etc. Buttonizer is the most versatile <strong>Smart Floating Action (Sticky) Button plugin</strong> for WordPress.
|
18 |
|
19 |
* Choose **from over 40 click actions and chat buttons**
|
20 |
* Setup within 10 seconds + smart front-end interface (WYSIWYG Editor)
|
@@ -26,7 +25,7 @@ From WhatsApp Chat, Facebook Messenger, Floating contactform, WhatsApp widgets (
|
|
26 |
|
27 |
= WhatsApp Chat, Business and 40+ click to chat channels 💬 =
|
28 |
|
29 |
-
Buttonizer is specially designed in creating easy, smart floating chat buttons. You can connect your visitors with WhatsApp or WhatsApp Business with ease. You can even create a WhatsApp Popup, work with multiple whatsapp phone numbers (agents), manage opening and closing times and use page rules.
|
30 |
|
31 |
📱 Mobile: Navigates to WhatsApp Mobile App.
|
32 |
|
@@ -79,7 +78,7 @@ https://www.youtube.com/watch?v=uDMrSkBLsic
|
|
79 |
|
80 |
= STYLING OPTIONS 💎 =
|
81 |
|
82 |
-
With Buttonizer you can customize almost everything. Create a floating text button (without icon), floating text button with icon or only a floating button with an icon.
|
83 |
|
84 |
+ Import and export your button templates easily (very nice if you have multiple websites)
|
85 |
+ Change the position of you button
|
@@ -122,7 +121,7 @@ With Buttonizer it is possible to add multiple floating action buttons to one po
|
|
122 |
<strong>+ Show different action buttons for different pages </strong> You can use this feature to show separate widgets for different products on your website, show different buttons based on URL for WPML or multi-language sites, display different channels for your landing pages, and more.
|
123 |
|
124 |
= WHATSAPP CHAT POP UP =
|
125 |
-
You can use WhatsApp as a regular chat button, but you can also add the WhatsApp pop up and let your visitors start the conversation while the visitors are on your website. You can also easily integrate with WhatsApp Business or your regular WhatsApp account. Once the visitors click on the send button, they’ll be redirected to WhatsApp to continue the conversation there.
|
126 |
|
127 |
= Advanced JavaScript API =
|
128 |
Buttonizer is equipped with an advanced **Free JavaScript API** which you can use to interact with your Buttonizer menus. Trigger custom functions on particular events or just open the menu when clicking a button on your site. It's enabled instantly and can be used out of the box!
|
@@ -237,6 +236,12 @@ Languages can have a different direction of writing and reading? While languages
|
|
237 |
|
238 |
== Changelog ==
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
= 3.2.0 =
|
241 |
Release date: August 23, 2022
|
242 |
|
@@ -1265,4 +1270,4 @@ Added new feature:
|
|
1265 |
- Exit intent: Let you Floating Action Buttons with a clean ’pop’ when your visitor tries to leave your website. By adding exit intent you can increase the number of conversions and keep your leaving webvisitors
|
1266 |
|
1267 |
= 1.0.2 =
|
1268 |
-
Launch of the Buttonizer Floating Action Button Plugin!
|
1 |
+
=== Smart Floating / Sticky Buttons - Call, Sharing, Chat Widgets & More – Buttonizer ===
|
2 |
Contributors: Buttonizer, freemius
|
3 |
Buy plugin: https://buttonizer.io
|
4 |
Tags: Conversion, action button, call, marketing, Social Sharing
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 3.2.1
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
|
|
12 |
#1 Button builder. WhatsApp Chat, Facebook Messenger, Telegram, Call, SMS, Email & More. Unlimited Click to Chat, Floating Buttons, Contact Forms & Sticky Menus. With dynamic Page Rules. Use the WhatsApp widget Pop-up to convert your visitors.
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
From WhatsApp Chat, Facebook Messenger, Floating contactform, WhatsApp widgets (New: WhatsApp Business), Click to Chat, Call, Email etc. Buttonizer is the most versatile <strong>Smart Floating Action (Sticky) Button plugin</strong> for WordPress.
|
17 |
|
18 |
* Choose **from over 40 click actions and chat buttons**
|
19 |
* Setup within 10 seconds + smart front-end interface (WYSIWYG Editor)
|
25 |
|
26 |
= WhatsApp Chat, Business and 40+ click to chat channels 💬 =
|
27 |
|
28 |
+
Buttonizer is specially designed in creating easy, smart floating chat buttons. You can connect your visitors with WhatsApp or WhatsApp Business with ease. You can even create a WhatsApp Popup, work with multiple whatsapp phone numbers (agents), manage opening and closing times and use page rules.
|
29 |
|
30 |
📱 Mobile: Navigates to WhatsApp Mobile App.
|
31 |
|
78 |
|
79 |
= STYLING OPTIONS 💎 =
|
80 |
|
81 |
+
With Buttonizer you can customize almost everything. Create a floating text button (without icon), floating text button with icon or only a floating button with an icon.
|
82 |
|
83 |
+ Import and export your button templates easily (very nice if you have multiple websites)
|
84 |
+ Change the position of you button
|
121 |
<strong>+ Show different action buttons for different pages </strong> You can use this feature to show separate widgets for different products on your website, show different buttons based on URL for WPML or multi-language sites, display different channels for your landing pages, and more.
|
122 |
|
123 |
= WHATSAPP CHAT POP UP =
|
124 |
+
You can use WhatsApp as a regular chat button, but you can also add the WhatsApp pop up and let your visitors start the conversation while the visitors are on your website. You can also easily integrate with WhatsApp Business or your regular WhatsApp account. Once the visitors click on the send button, they’ll be redirected to WhatsApp to continue the conversation there.
|
125 |
|
126 |
= Advanced JavaScript API =
|
127 |
Buttonizer is equipped with an advanced **Free JavaScript API** which you can use to interact with your Buttonizer menus. Trigger custom functions on particular events or just open the menu when clicking a button on your site. It's enabled instantly and can be used out of the box!
|
236 |
|
237 |
== Changelog ==
|
238 |
|
239 |
+
= 3.2.1 =
|
240 |
+
Release date: September 19, 2022
|
241 |
+
|
242 |
+
**Changelog:**
|
243 |
+
- Fix: Link to correct page in correct language (if site is multilingual)
|
244 |
+
|
245 |
= 3.2.0 =
|
246 |
Release date: August 23, 2022
|
247 |
|
1270 |
- Exit intent: Let you Floating Action Buttons with a clean ’pop’ when your visitor tries to leave your website. By adding exit intent you can increase the number of conversions and keep your leaving webvisitors
|
1271 |
|
1272 |
= 1.0.2 =
|
1273 |
+
Launch of the Buttonizer Floating Action Button Plugin!
|