Version Description
Release date: 8 March 2018
New update, one new function added! It is now possible to change the size of the button on mobile devices as they are smaller then desktop. If you like a big button on desktop, you can still use the small one for mobile devices.
Bug fixes: - Some users experienced that when saving, results in the message 'do you want to leave this page' everywhere on Wordpress where, fixed now! - CSS fix for the button when buttons are hided (they were still clickable sometimes)
New features: - It's now possible to change the button-size for mobile devices
New features for our Buttonizer PRO users: - Added new page-rule options: - URL contains - URL Begins with - URL Ends with
Idea, bug or feature? Please let us know! We're always happy with all the feedback we get!
Release Info
Developer | buttonizer |
Plugin | Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.2
- assets/screenshot-3.png +0 -0
- assets/screenshot-4.png +0 -0
- assets/screenshot-5.png +0 -0
- buttonizer.php +2 -2
- classes/Admin/Buttons.php +5 -4
- classes/Admin/General.php +18 -2
- classes/Button.php +20 -9
- css/buttonizer.css +8 -0
- js/dashboard.js +11 -3
- readme.txt +28 -6
Binary file
|
Binary file
|
Binary file
|
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Buttonizer - Smart Floating Action Button
|
4 |
Plugin URI: https://buttonizer.pro
|
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: 1.4.
|
7 |
Author: Buttonizer
|
8 |
Author URI: https://buttonizer.pro
|
9 |
License: GPL2
|
@@ -34,7 +34,7 @@ define('BUTTONIZER_NAME', 'buttonizer');
|
|
34 |
define('BUTTONIZER_DIR', dirname(__FILE__));
|
35 |
define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
|
36 |
define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
|
37 |
-
define('BUTTONIZER_VERSION','1.4.
|
38 |
|
39 |
# No script kiddies
|
40 |
defined( 'ABSPATH' ) or die('No script kiddies please!');
|
3 |
Plugin Name: Buttonizer - Smart Floating Action Button
|
4 |
Plugin URI: https://buttonizer.pro
|
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: 1.4.2
|
7 |
Author: Buttonizer
|
8 |
Author URI: https://buttonizer.pro
|
9 |
License: GPL2
|
34 |
define('BUTTONIZER_DIR', dirname(__FILE__));
|
35 |
define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
|
36 |
define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
|
37 |
+
define('BUTTONIZER_VERSION','1.4.2');
|
38 |
|
39 |
# No script kiddies
|
40 |
defined( 'ABSPATH' ) or die('No script kiddies please!');
|
@@ -413,10 +413,11 @@ class Buttons
|
|
413 |
function buttonGetType( $iButtonId = 0 )
|
414 |
{
|
415 |
$aTypes = [
|
416 |
-
'url'
|
417 |
-
'phone'
|
418 |
-
'mail'
|
419 |
-
'backtotop'
|
|
|
420 |
];
|
421 |
$aTypes = array_merge( $aTypes, [
|
422 |
'disabled_whatsapp' => 'Open whatsapp (phone number) - PRO ONLY',
|
413 |
function buttonGetType( $iButtonId = 0 )
|
414 |
{
|
415 |
$aTypes = [
|
416 |
+
'url' => 'Website URL',
|
417 |
+
'phone' => 'Phone number',
|
418 |
+
'mail' => 'E-mail',
|
419 |
+
'backtotop' => 'Back to top',
|
420 |
+
'gobackpage' => 'Go back one page',
|
421 |
];
|
422 |
$aTypes = array_merge( $aTypes, [
|
423 |
'disabled_whatsapp' => 'Open whatsapp (phone number) - PRO ONLY',
|
@@ -109,6 +109,7 @@ class General
|
|
109 |
$this->aSubPages['design'] .= $this->createFormField( 'Color button pushed', array( &$this, 'field_button_pushed' ) );
|
110 |
$this->aSubPages['design'] .= $this->createFormField( 'Icon color', array( &$this, 'field_icon_color' ) );
|
111 |
$this->aSubPages['design'] .= $this->createFormField( 'Button size<br/><br/><small>The default size of the button is 56px.</small>', array( &$this, 'field_icon_size' ) );
|
|
|
112 |
$this->aSubPages['design'] .= '</tbody></table>';
|
113 |
$this->aSubPages['design'] .= '<table class="form-table" style="margin-top: 0;"><tbody>';
|
114 |
$this->aSubPages['design'] .= $this->createFormField( 'Main icon<br /><br /><small>This icon will appear in a button when you have multiple floating action buttons on one page. When you click on the icon the other floating action button will \'pop\' open.</small>', array( &$this, 'field_icon_icon' ), 'intro-icon' );
|
@@ -303,8 +304,23 @@ class General
|
|
303 |
slider.oninput = function() {
|
304 |
output.innerHTML = this.value;
|
305 |
}
|
306 |
-
|
307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
}
|
309 |
|
310 |
function field_icon_icon()
|
109 |
$this->aSubPages['design'] .= $this->createFormField( 'Color button pushed', array( &$this, 'field_button_pushed' ) );
|
110 |
$this->aSubPages['design'] .= $this->createFormField( 'Icon color', array( &$this, 'field_icon_color' ) );
|
111 |
$this->aSubPages['design'] .= $this->createFormField( 'Button size<br/><br/><small>The default size of the button is 56px.</small>', array( &$this, 'field_icon_size' ) );
|
112 |
+
$this->aSubPages['design'] .= $this->createFormField( 'Button size mobile<br/><br/><small>Recommended is 56px (phones are small).</small>', array( &$this, 'field_icon_mobile_size' ) );
|
113 |
$this->aSubPages['design'] .= '</tbody></table>';
|
114 |
$this->aSubPages['design'] .= '<table class="form-table" style="margin-top: 0;"><tbody>';
|
115 |
$this->aSubPages['design'] .= $this->createFormField( 'Main icon<br /><br /><small>This icon will appear in a button when you have multiple floating action buttons on one page. When you click on the icon the other floating action button will \'pop\' open.</small>', array( &$this, 'field_icon_icon' ), 'intro-icon' );
|
304 |
slider.oninput = function() {
|
305 |
output.innerHTML = this.value;
|
306 |
}
|
307 |
+
</script>';
|
308 |
+
}
|
309 |
+
|
310 |
+
function field_icon_mobile_size()
|
311 |
+
{
|
312 |
+
$icon_size = ( isset( $this->aSavedData['mobile_icon_size'] ) ? $this->aSavedData['mobile_icon_size'] : '56' );
|
313 |
+
return '<input type="range" name="buttonizer_general_settings[mobile_icon_size]" value="' . $icon_size . '" id="mobile_icon_size" min="45" max="80" data-default-value="50" /> <br/>
|
314 |
+
<p>Size: <span id="mobile_icon_size_output"></span>px</p>
|
315 |
+
<script>
|
316 |
+
var slider_mobile = document.getElementById("mobile_icon_size");
|
317 |
+
var output_mobile = document.getElementById("mobile_icon_size_output");
|
318 |
+
output_mobile.innerHTML = slider_mobile.value;
|
319 |
+
|
320 |
+
slider_mobile.oninput = function() {
|
321 |
+
output_mobile.innerHTML = this.value;
|
322 |
+
}
|
323 |
+
</script>';
|
324 |
}
|
325 |
|
326 |
function field_icon_icon()
|
@@ -72,7 +72,7 @@ class Button
|
|
72 |
private function setup()
|
73 |
{
|
74 |
// Timezone
|
75 |
-
date_default_timezone_set(
|
76 |
// Get options
|
77 |
$this->aButtons = (array) get_option( 'buttonizer_buttons' );
|
78 |
$this->pageCategories = (array) get_option( 'buttonizer_page_categories' );
|
@@ -181,9 +181,15 @@ class Button
|
|
181 |
if ( 'mail' == $sButtonAction ) {
|
182 |
$sButtonActionLink = 'mailto:' . $sButtonActionLink;
|
183 |
} else {
|
|
|
184 |
if ( 'backtotop' == $sButtonAction ) {
|
185 |
$sButtonActionLink = "javascript: window.scroll({top: 0, left: 0, behavior: 'smooth' });";
|
|
|
|
|
|
|
|
|
186 |
}
|
|
|
187 |
}
|
188 |
|
189 |
}
|
@@ -197,21 +203,19 @@ class Button
|
|
197 |
}
|
198 |
|
199 |
$sButtonClasses = 'is_extra bt_' . $this->iAmountOfButtons;
|
200 |
-
// Show label on hover
|
201 |
-
|
202 |
-
// $sButtonClasses .= ' show_on_hover';
|
203 |
-
// }
|
204 |
|
205 |
-
if ( $
|
206 |
$sButtonClasses .= ' show_on_hover';
|
207 |
} else {
|
208 |
|
209 |
-
if ( $
|
210 |
if ( $this->bIsMobile == false ) {
|
211 |
$sButtonClasses .= ' show_on_hover';
|
212 |
}
|
213 |
} else {
|
214 |
-
if ( $
|
215 |
if ( $this->bIsMobile == true ) {
|
216 |
$sButtonClasses .= ' show_on_hover';
|
217 |
}
|
@@ -516,7 +520,14 @@ class Button
|
|
516 |
}
|
517 |
|
518 |
list( $sShadowColorRed, $sShadowColorGreen, $sShadowColorBlue ) = sscanf( $this->aSettings['button_unpushed'], "#%02x%02x%02x" );
|
519 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
echo '
|
521 |
<style>
|
522 |
.buttonizer-button a:hover,
|
72 |
private function setup()
|
73 |
{
|
74 |
// Timezone
|
75 |
+
// date_default_timezone_set(get_option('timezone_string') != '' ? get_option('timezone_string') : "Europe/Amsterdam");
|
76 |
// Get options
|
77 |
$this->aButtons = (array) get_option( 'buttonizer_buttons' );
|
78 |
$this->pageCategories = (array) get_option( 'buttonizer_page_categories' );
|
181 |
if ( 'mail' == $sButtonAction ) {
|
182 |
$sButtonActionLink = 'mailto:' . $sButtonActionLink;
|
183 |
} else {
|
184 |
+
|
185 |
if ( 'backtotop' == $sButtonAction ) {
|
186 |
$sButtonActionLink = "javascript: window.scroll({top: 0, left: 0, behavior: 'smooth' });";
|
187 |
+
} else {
|
188 |
+
if ( 'gobackpage' == $sButtonAction ) {
|
189 |
+
$sButtonActionLink = "javascript: window.history.back(); ";
|
190 |
+
}
|
191 |
}
|
192 |
+
|
193 |
}
|
194 |
|
195 |
}
|
203 |
}
|
204 |
|
205 |
$sButtonClasses = 'is_extra bt_' . $this->iAmountOfButtons;
|
206 |
+
// Show label on hover (per button)
|
207 |
+
$showOnHover = ( isset( $this->aButtons['button_' . $bNmbr . '_show_label_on_hover'] ) ? $this->aButtons['button_' . $bNmbr . '_show_label_on_hover'] : '' );
|
|
|
|
|
208 |
|
209 |
+
if ( $showOnHover == 'showOnHover' ) {
|
210 |
$sButtonClasses .= ' show_on_hover';
|
211 |
} else {
|
212 |
|
213 |
+
if ( $showOnHover == 'showOnHoverDesktop' ) {
|
214 |
if ( $this->bIsMobile == false ) {
|
215 |
$sButtonClasses .= ' show_on_hover';
|
216 |
}
|
217 |
} else {
|
218 |
+
if ( $showOnHover == 'showOnHoverMobile' ) {
|
219 |
if ( $this->bIsMobile == true ) {
|
220 |
$sButtonClasses .= ' show_on_hover';
|
221 |
}
|
520 |
}
|
521 |
|
522 |
list( $sShadowColorRed, $sShadowColorGreen, $sShadowColorBlue ) = sscanf( $this->aSettings['button_unpushed'], "#%02x%02x%02x" );
|
523 |
+
// Mobile button size vs Desktop button size
|
524 |
+
|
525 |
+
if ( $this->bIsMobile ) {
|
526 |
+
$iconSize = ( isset( $this->aSettings['mobile_icon_size'] ) ? $this->aSettings['mobile_icon_size'] : 56 );
|
527 |
+
} else {
|
528 |
+
$iconSize = ( isset( $this->aSettings['icon_size'] ) ? $this->aSettings['icon_size'] : 56 );
|
529 |
+
}
|
530 |
+
|
531 |
echo '
|
532 |
<style>
|
533 |
.buttonizer-button a:hover,
|
@@ -77,6 +77,10 @@
|
|
77 |
right: 0;
|
78 |
}
|
79 |
|
|
|
|
|
|
|
|
|
80 |
.buttonizer-button[label-style="mirrored"] a.buttonizer_head {
|
81 |
left: 0;
|
82 |
right: auto;
|
@@ -486,6 +490,10 @@
|
|
486 |
}
|
487 |
|
488 |
/* Fade right to left animation */
|
|
|
|
|
|
|
|
|
489 |
.buttonizer-button[button-animation="fade-left-to-right"][label-style='default'] .buttonizer_inner:not(.opened) .is_extra {
|
490 |
margin-right: -40px;
|
491 |
}
|
77 |
right: 0;
|
78 |
}
|
79 |
|
80 |
+
.buttonizer-button .buttonizer_head .text {
|
81 |
+
width: 100% !important
|
82 |
+
}
|
83 |
+
|
84 |
.buttonizer-button[label-style="mirrored"] a.buttonizer_head {
|
85 |
left: 0;
|
86 |
right: auto;
|
490 |
}
|
491 |
|
492 |
/* Fade right to left animation */
|
493 |
+
.buttonizer-button .buttonizer_inner:not(.opened) .is_extra {
|
494 |
+
visibility: hidden !important;
|
495 |
+
}
|
496 |
+
|
497 |
.buttonizer-button[button-animation="fade-left-to-right"][label-style='default'] .buttonizer_inner:not(.opened) .is_extra {
|
498 |
margin-right: -40px;
|
499 |
}
|
@@ -18,6 +18,10 @@ var buttonizer = {
|
|
18 |
},
|
19 |
|
20 |
init: function() {
|
|
|
|
|
|
|
|
|
21 |
buttonizer.overwriteFavIcon();
|
22 |
buttonizer.faInit();
|
23 |
buttonizer.initButtons();
|
@@ -732,10 +736,11 @@ var buttonizer = {
|
|
732 |
var currentAction = currentButtonType.val();
|
733 |
var currentValueText = currentButtonInput.val();
|
734 |
|
735 |
-
if(currentAction == 'backtotop')
|
736 |
-
{
|
737 |
currentButtonInput.attr("disabled", "disabled");
|
738 |
-
}else {
|
|
|
|
|
739 |
currentButtonInput.removeAttr("disabled", "disabled");
|
740 |
}
|
741 |
|
@@ -1408,6 +1413,9 @@ function checkSelection()
|
|
1408 |
document.addEventListener('DOMContentLoaded', buttonizer.init, false);
|
1409 |
|
1410 |
window.onbeforeunload = function(){
|
|
|
|
|
|
|
1411 |
if(buttonizer.settings.hasChanges && !buttonizer.settings.clickedButton) {
|
1412 |
return 'You have unsaved data. Are you sure you want to leave?';
|
1413 |
}
|
18 |
},
|
19 |
|
20 |
init: function() {
|
21 |
+
if(document.location.href.indexOf('page=Buttonizer') === -1) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
buttonizer.overwriteFavIcon();
|
26 |
buttonizer.faInit();
|
27 |
buttonizer.initButtons();
|
736 |
var currentAction = currentButtonType.val();
|
737 |
var currentValueText = currentButtonInput.val();
|
738 |
|
739 |
+
if(currentAction == 'backtotop') {
|
|
|
740 |
currentButtonInput.attr("disabled", "disabled");
|
741 |
+
}else if(currentAction == 'gobackpage'){
|
742 |
+
currentButtonInput.attr("disabled", "disabled");
|
743 |
+
} else {
|
744 |
currentButtonInput.removeAttr("disabled", "disabled");
|
745 |
}
|
746 |
|
1413 |
document.addEventListener('DOMContentLoaded', buttonizer.init, false);
|
1414 |
|
1415 |
window.onbeforeunload = function(){
|
1416 |
+
if(document.location.href.indexOf('page=Buttonizer') === -1) {
|
1417 |
+
return;
|
1418 |
+
}
|
1419 |
if(buttonizer.settings.hasChanges && !buttonizer.settings.clickedButton) {
|
1420 |
return 'You have unsaved data. Are you sure you want to leave?';
|
1421 |
}
|
@@ -4,7 +4,7 @@ Buy plugin: https://buttonizer.pro
|
|
4 |
Tags: Conversion, action button, call, marketing, Social Sharing
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.9.4
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -29,13 +29,13 @@ Download the Buttonizer for free and make your first Smart Conversion Button in
|
|
29 |
* **Positioning** - Easily choose the position of your button;
|
30 |
* **Font-Awesome** - Choose your favorite icon with our icon picker;
|
31 |
* **Mobile and/or dekstop** - Show your Floating Action Buttons on mobile and/or desktop;
|
32 |
-
* **Opening hours** - Choose to show your button only between, or outside opening hours;
|
33 |
-
* **Page categories & Rules** - Add page categories so you can choose to show buttons on specific pages;
|
34 |
* **Event tracking Google Analytics** - Each Button is automatically tracked in Google Analytics so you can track how your visitors interact with your buttons are;
|
35 |
* **Social Sharing** - Add Social Sharing Buttons;
|
36 |
-
* **
|
|
|
|
|
37 |
* **Button animations** - Give your Action Buttons small animations to convince web visitors to click on it;
|
38 |
-
* **Add your own** - Image, logo or moving icon to your button.
|
39 |
|
40 |
Download the free version or go premium and get to add an infinite number of buttons and page rules.
|
41 |
|
@@ -122,6 +122,26 @@ In fact the Buttonizer is an addiction to use. You're website visitors will
|
|
122 |
|
123 |
== Changelog ==
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
= 1.4 =
|
126 |
Release date: 1 March 2018
|
127 |
|
@@ -130,9 +150,11 @@ We're happy and thankful for all the feedback, and we really try to implement al
|
|
130 |
New features:
|
131 |
-You can now assign a back to top function to your button.
|
132 |
-There is mail sharing feature implemented. With this there is validation with a maximum of 3 social sharing options.
|
133 |
-
-Page rules and categories are improved and implemented into Buttonizer (you can make different buttons for different pages )
|
134 |
-Video tutorials are now added to the dashboard.
|
135 |
|
|
|
|
|
|
|
136 |
Styling:
|
137 |
-You can now change the size of the Buttonizer!
|
138 |
-The label hovering can be set to mobile only, desktop only, both or default!
|
4 |
Tags: Conversion, action button, call, marketing, Social Sharing
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.9.4
|
7 |
+
Stable tag: 1.4.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
29 |
* **Positioning** - Easily choose the position of your button;
|
30 |
* **Font-Awesome** - Choose your favorite icon with our icon picker;
|
31 |
* **Mobile and/or dekstop** - Show your Floating Action Buttons on mobile and/or desktop;
|
|
|
|
|
32 |
* **Event tracking Google Analytics** - Each Button is automatically tracked in Google Analytics so you can track how your visitors interact with your buttons are;
|
33 |
* **Social Sharing** - Add Social Sharing Buttons;
|
34 |
+
* PRO: **Opening hours** - Choose to show your button only between, or outside opening hours;
|
35 |
+
* PRO: **Page categories & Rules** - Add page categories so you can choose to show buttons on specific pages;
|
36 |
+
* PRO: **Webvisitor behaviour** - Let your buttons show on your webvisitors behaviour (show you button on scroll depth of session duration);
|
37 |
* **Button animations** - Give your Action Buttons small animations to convince web visitors to click on it;
|
38 |
+
* PRO: **Add your own** - Image, logo or moving icon to your button.
|
39 |
|
40 |
Download the free version or go premium and get to add an infinite number of buttons and page rules.
|
41 |
|
122 |
|
123 |
== Changelog ==
|
124 |
|
125 |
+
= 1.4.2 =
|
126 |
+
Release date: 8 March 2018
|
127 |
+
|
128 |
+
New update, one new function added! It is now possible to change the size of the button on mobile devices as they are smaller then desktop. If you like a big button on desktop, you can still use the small one for mobile devices.
|
129 |
+
|
130 |
+
Bug fixes:
|
131 |
+
- Some users experienced that when saving, results in the message 'do you want to leave this page' everywhere on Wordpress where, fixed now!
|
132 |
+
- CSS fix for the button when buttons are hided (they were still clickable sometimes)
|
133 |
+
|
134 |
+
New features:
|
135 |
+
- It's now possible to change the button-size for mobile devices
|
136 |
+
|
137 |
+
New features for our Buttonizer PRO users:
|
138 |
+
- Added new page-rule options:
|
139 |
+
- URL contains
|
140 |
+
- URL Begins with
|
141 |
+
- URL Ends with
|
142 |
+
|
143 |
+
Idea, bug or feature? Please let us know! We're always happy with all the feedback we get!
|
144 |
+
|
145 |
= 1.4 =
|
146 |
Release date: 1 March 2018
|
147 |
|
150 |
New features:
|
151 |
-You can now assign a back to top function to your button.
|
152 |
-There is mail sharing feature implemented. With this there is validation with a maximum of 3 social sharing options.
|
|
|
153 |
-Video tutorials are now added to the dashboard.
|
154 |
|
155 |
+
New features for our Buttonizer PRO users:
|
156 |
+
-Page rules and categories are improved and implemented into Buttonizer (you can make different buttons for different pages)
|
157 |
+
|
158 |
Styling:
|
159 |
-You can now change the size of the Buttonizer!
|
160 |
-The label hovering can be set to mobile only, desktop only, both or default!
|