Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer - Version 1.2

Version Description

New to Buttonizer: Repositionize the button easier! You are able to reposition the button from the left bottom corner, or from the right bottom corner. We have added button mirroring also: Mirror the style of the button and change the position of the label from the right side of the button, to the left side of the button.

New features this release: - Button placing: Align the button to the left, or allign to right - Button mirroring: The button animation style can be mirrored

Bug fixes: - Conflict with Postman SMTP fixed - Label text was used for labeling Google Analytics events. Now we've changed it to use the button title as it should be. Sorry for the inconvenience - Other small fixes

Download this release

Release Info

Developer buttonizer
Plugin Icon wp plugin Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer
Version 1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.2

buttonizer.php CHANGED
@@ -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.1.1
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.1.1');
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.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.2');
38
 
39
  # No script kiddies
40
  defined( 'ABSPATH' ) or die('No script kiddies please!');
classes/admin/Buttons.php CHANGED
@@ -426,7 +426,12 @@ class Buttons
426
  return '<input type="text" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="' . $fieldValue . '" class="button_input" placeholder="URL/Phone number" />';
427
  }
428
 
429
- // Only show this button on phone?
 
 
 
 
 
430
  function buttonGetNewTab( $iButtonId = 0 )
431
  {
432
  $fieldName = 'button_' . $iButtonId . '_url_newtab';
@@ -434,7 +439,12 @@ class Buttons
434
  return '<input type="checkbox" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="1" class="button_isnewtab" ' . (( $is_selected == '1' ? 'checked="checked"' : '' )) . ' />';
435
  }
436
 
437
- // Button colors
 
 
 
 
 
438
  function buttonColors( $iButtonId = 0 )
439
  {
440
  // Default button colors
@@ -461,13 +471,21 @@ class Buttons
461
  return $sColorPalet;
462
  }
463
 
464
- // Button custom class
 
 
 
 
 
465
  public function buttonCustomClass( $iButtonId )
466
  {
467
  return '<input type="text" class="buttonizer-click-to-pro" value="Use PRO for custom classes" readonly>';
468
  }
469
 
470
- // Show the pro message
 
 
 
471
  public function showPro()
472
  {
473
  return '<span class="buttonizer-pro-feature buttonizer-click-to-pro">PRO</span>';
426
  return '<input type="text" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="' . $fieldValue . '" class="button_input" placeholder="URL/Phone number" />';
427
  }
428
 
429
+ /**
430
+ * New tab
431
+ *
432
+ * @param int $iButtonId
433
+ * @return string
434
+ */
435
  function buttonGetNewTab( $iButtonId = 0 )
436
  {
437
  $fieldName = 'button_' . $iButtonId . '_url_newtab';
439
  return '<input type="checkbox" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="1" class="button_isnewtab" ' . (( $is_selected == '1' ? 'checked="checked"' : '' )) . ' />';
440
  }
441
 
442
+ /**
443
+ * Button colors
444
+ *
445
+ * @param int $iButtonId
446
+ * @return string
447
+ */
448
  function buttonColors( $iButtonId = 0 )
449
  {
450
  // Default button colors
471
  return $sColorPalet;
472
  }
473
 
474
+ /**
475
+ * Button custom class
476
+ *
477
+ * @param $iButtonId
478
+ * @return string
479
+ */
480
  public function buttonCustomClass( $iButtonId )
481
  {
482
  return '<input type="text" class="buttonizer-click-to-pro" value="Use PRO for custom classes" readonly>';
483
  }
484
 
485
+ /**
486
+ * Show the pro message
487
+ * @return string
488
+ */
489
  public function showPro()
490
  {
491
  return '<span class="buttonizer-pro-feature buttonizer-click-to-pro">PRO</span>';
classes/admin/General.php CHANGED
@@ -78,8 +78,14 @@ class General
78
  <h2>Placing &amp; animations</h2>
79
  <p>You can change here the button position and the button animation.</p>
80
  </td></tr>';
81
- $this->aSubPages['placing'] .= $this->createFormField( 'Right', array( &$this, 'field_position_right' ), 'intro-position' );
 
82
  $this->aSubPages['placing'] .= $this->createFormField( 'Bottom', array( &$this, 'field_position_bottom' ) );
 
 
 
 
 
83
  $this->aSubPages['placing'] .= $this->createFormField( 'Button animation', array( &$this, 'field_button_animation' ), 'intro-animaton' );
84
  $this->aSubPages['placing'] .= $this->createFormField( 'Attention animation', array( &$this, 'field_attention_animation' ), 'intro-attention' );
85
  $this->aSubPages['placing'] .= '</tbody></table>';
@@ -285,10 +291,32 @@ class General
285
  return '<input type="text" name="buttonizer_general_settings[icon_label]" value="' . $icon_label . '" placeholder="Fill in some text" />';
286
  }
287
 
288
- function field_position_right()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  {
290
- $position_right = ( isset( $this->aSavedData['position_right'] ) ? $this->aSavedData['position_right'] : '5' );
291
- return '<input type="text" name="buttonizer_general_settings[position_right]" value="' . $position_right . '" placeholder="Fill in a number from 0 to 100"/><small><i class="after-input">%</i><br />Recommended 5% then it will position itself on the right corner</small>';
 
292
  }
293
 
294
  function field_position_bottom()
@@ -297,6 +325,22 @@ class General
297
  return '<input type="text" name="buttonizer_general_settings[position_bottom]" value="' . $position_bottom . '" placeholder="Fill in a number from 0 to 100"/><small><i class="after-input">%</i><br>Recommended 5% then it will position itself on the bottom corner</small>';
298
  }
299
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  function field_button_animation()
301
  {
302
  $button_animation = ( isset( $this->aSavedData['buttons_animation'] ) ? $this->aSavedData['buttons_animation'] : 'default' );
78
  <h2>Placing &amp; animations</h2>
79
  <p>You can change here the button position and the button animation.</p>
80
  </td></tr>';
81
+ $this->aSubPages['placing'] .= $this->createFormField( 'Button placing', array( &$this, 'field_button_placing' ) );
82
+ $this->aSubPages['placing'] .= $this->createFormField( 'Horizontal placing', array( &$this, 'field_position_horizontal' ), 'intro-position' );
83
  $this->aSubPages['placing'] .= $this->createFormField( 'Bottom', array( &$this, 'field_position_bottom' ) );
84
+ $this->aSubPages['placing'] .= $this->createFormField( 'Label placing', array( &$this, 'field_label_placing' ) );
85
+ $this->aSubPages['placing'] .= '<tr>
86
+ <td colspan="2">
87
+ <hr style="margin: 20px 0;">
88
+ </td></tr>';
89
  $this->aSubPages['placing'] .= $this->createFormField( 'Button animation', array( &$this, 'field_button_animation' ), 'intro-animaton' );
90
  $this->aSubPages['placing'] .= $this->createFormField( 'Attention animation', array( &$this, 'field_attention_animation' ), 'intro-attention' );
91
  $this->aSubPages['placing'] .= '</tbody></table>';
291
  return '<input type="text" name="buttonizer_general_settings[icon_label]" value="' . $icon_label . '" placeholder="Fill in some text" />';
292
  }
293
 
294
+ /**
295
+ * Button placing
296
+ *
297
+ * @return string
298
+ */
299
+ function field_button_placing()
300
+ {
301
+ $button_placing = ( isset( $this->aSavedData['buttons_placing'] ) ? $this->aSavedData['buttons_placing'] : 'default' );
302
+ return '
303
+ <select name="buttonizer_general_settings[buttons_placing]" style="width: 100%; padding: 0 10px; height: 40px;">
304
+ <option value="default" ' . (( $button_placing == 'default' ? 'selected' : '' )) . '>Right bottom corner (default)</option>
305
+ <option value="left" ' . (( $button_placing == 'left' ? 'selected' : '' )) . '>Left bottom corner</option>
306
+ </select>';
307
+ }
308
+
309
+ /**
310
+ * Horizontal placing
311
+ * When the button placing is set on 'right', this will be the space between the button and the right page corner.
312
+ *
313
+ * @return string
314
+ */
315
+ function field_position_horizontal()
316
  {
317
+ $position_right = ( isset( $this->aSavedData['position_horizontal'] ) ? $this->aSavedData['position_horizontal'] : (( isset( $this->aSavedData['position_right'] ) ? $this->aSavedData['position_right'] : '5' )) );
318
+ return '<input type="text" name="buttonizer_general_settings[position_horizontal]" value="' . $position_right . '" placeholder="Fill in a number from 0 to 100"/><small><i class="after-input">%</i>
319
+ <div class="buttonizer-note">When the button placing is set on \'right\', this will be the space between the button and the right page corner. When your button placing is at the left corner, this will be the left space of your button. Recommended value is 5%.</div> ';
320
  }
321
 
322
  function field_position_bottom()
325
  return '<input type="text" name="buttonizer_general_settings[position_bottom]" value="' . $position_bottom . '" placeholder="Fill in a number from 0 to 100"/><small><i class="after-input">%</i><br>Recommended 5% then it will position itself on the bottom corner</small>';
326
  }
327
 
328
+ /**
329
+ * Mirroring the button style
330
+ *
331
+ * @return string
332
+ */
333
+ function field_label_placing()
334
+ {
335
+ $button_placing = ( isset( $this->aSavedData['buttons_label_placing'] ) ? $this->aSavedData['buttons_label_placing'] : 'default' );
336
+ return '
337
+ <select name="buttonizer_general_settings[buttons_label_placing]" style="width: 100%; padding: 0 10px; height: 40px;">
338
+ <option value="default" ' . (( $button_placing == 'default' ? 'selected' : '' )) . '>Label left, icon right</option>
339
+ <option value="mirrored" ' . (( $button_placing == 'mirrored' ? 'selected' : '' )) . '>Icon left, label right (mirrored)</option>
340
+ </select>
341
+ <div class="buttonizer-note">When you change the label place, you will mirror the style &amp; animation of the button also.</div>';
342
+ }
343
+
344
  function field_button_animation()
345
  {
346
  $button_animation = ( isset( $this->aSavedData['buttons_animation'] ) ? $this->aSavedData['buttons_animation'] : 'default' );
classes/admin/InitializeAdmin.php CHANGED
@@ -29,12 +29,18 @@ class InitializeAdmin {
29
  private $oIconManager = null;
30
  private $aFontAwesome = null;
31
 
32
- // Construct
 
 
33
  public function __construct() {
34
- if(!function_exists('wp_get_current_user')) {
35
- include(ABSPATH . "wp-includes/pluggable.php");
36
- }
37
 
 
 
 
 
38
  $this->createButtonizerAdminMenu();
39
  $this->getFontAwesome();
40
 
@@ -45,11 +51,11 @@ class InitializeAdmin {
45
  add_action('wp_print_scripts', array(&$this, 'getPluginScripts'));
46
  }
47
 
48
- add_action( 'admin_init', array( &$this, 'register_allSettings') );
49
  }
50
 
51
- /*
52
- * Create menus
53
  */
54
  private function createButtonizerAdminMenu() {
55
  add_menu_page(
@@ -72,7 +78,9 @@ class InitializeAdmin {
72
  });
73
  }
74
 
75
- /* Get media */
 
 
76
  public function getPluginScripts() {
77
  wp_enqueue_media();
78
  wp_enqueue_style(array('wp-color-picker'));
@@ -96,8 +104,10 @@ class InitializeAdmin {
96
 
97
  }
98
 
99
- /* Register tabs */
100
- public function register_allSettings() {
 
 
101
  $this->register_buttonizer_buttons();
102
  $this->register_buttonizer_general_settings();
103
  $this->register_buttonizer_page_categories();
@@ -105,8 +115,8 @@ class InitializeAdmin {
105
  $this->register_buttonizer_reset_everything();
106
  }
107
 
108
- /*
109
- * Tabs and things
110
  */
111
  function plugin_options_page() {
112
  // Add IconManager
@@ -201,7 +211,7 @@ class InitializeAdmin {
201
  echo '</h1>';
202
  }
203
 
204
- /* =============================
205
  * Add the tabs
206
  * =============================
207
  */
29
  private $oIconManager = null;
30
  private $aFontAwesome = null;
31
 
32
+ /**
33
+ * InitializeAdmin constructor.
34
+ */
35
  public function __construct() {
36
+ // Let's wait for Wordpress to initialize... Otherways we are way to early
37
+ add_action( 'init', array( &$this, 'wordpress_initialized') );
38
+ }
39
 
40
+ /**
41
+ * Wordpress initialized
42
+ */
43
+ public function wordpress_initialized() {
44
  $this->createButtonizerAdminMenu();
45
  $this->getFontAwesome();
46
 
51
  add_action('wp_print_scripts', array(&$this, 'getPluginScripts'));
52
  }
53
 
54
+ add_action( 'admin_init', array( &$this, 'register_settings_pages') );
55
  }
56
 
57
+ /**
58
+ * Create admin menu
59
  */
60
  private function createButtonizerAdminMenu() {
61
  add_menu_page(
78
  });
79
  }
80
 
81
+ /**
82
+ * Get media and add scripts/styles that Buttonizer uses
83
+ */
84
  public function getPluginScripts() {
85
  wp_enqueue_media();
86
  wp_enqueue_style(array('wp-color-picker'));
104
 
105
  }
106
 
107
+ /**
108
+ * Register the Buttonizer settings pages
109
+ */
110
+ public function register_settings_pages() {
111
  $this->register_buttonizer_buttons();
112
  $this->register_buttonizer_general_settings();
113
  $this->register_buttonizer_page_categories();
115
  $this->register_buttonizer_reset_everything();
116
  }
117
 
118
+ /**
119
+ * Default setting page template
120
  */
121
  function plugin_options_page() {
122
  // Add IconManager
211
  echo '</h1>';
212
  }
213
 
214
+ /** ============================
215
  * Add the tabs
216
  * =============================
217
  */
classes/default/main.php CHANGED
@@ -61,6 +61,9 @@ class Button
61
  add_action( 'wp_print_styles', array( &$this, 'siteLoadStyles' ) );
62
  }
63
 
 
 
 
64
  private function setup()
65
  {
66
  // Timezone
@@ -105,6 +108,12 @@ class Button
105
  }
106
  }
107
 
 
 
 
 
 
 
108
  private function generateB( $bNmbr )
109
  {
110
  // Check if this one must be showed when the company is open:
@@ -197,45 +206,69 @@ class Button
197
  color: ' . $this->aButtons['button_' . $bNmbr . '_colors_icon'] . ';
198
  } ';
199
  }
200
- return '<a href="' . $sButtonActionLink . '" class="' . $sButtonClasses . ' buttonizer_' . $bNmbr . '" ' . $linkNewTab . ' onclick="onButtonizerClickEvent(\'' . $buttonText . '\')">' . (( $buttonText != "" ? '<div class="text"' . (( $hideLabel == '1' ? 'style="display: none;"' : '' )) . '><div>' . $buttonText . '</div></div>' : '' )) . $sButtonIcon . '</a>';
201
  // Thanks, end
202
  }
203
 
204
- // Show on timeout
 
 
 
 
205
  private function showOnTimeout()
206
  {
207
  return '0';
208
  }
209
 
210
- // Show on scroll
 
 
 
 
211
  private function showOnScroll()
212
  {
213
  return '0';
214
  }
215
 
216
- // Exit intent
 
 
 
 
217
  private function enableExitIntent()
218
  {
219
  return '0';
220
  }
221
 
222
- // Exit intent
 
 
 
 
223
  private function enableExitIntentText()
224
  {
225
  return '';
226
  }
227
 
228
- // Custom class
 
 
 
 
 
229
  private function getCustomClass( $iButtonId )
230
  {
231
  return '';
232
  }
233
 
234
- // Is the store opened right now?
 
 
 
 
235
  private function isOpened()
236
  {
237
  $sDayOfWeek = $this->getDay( date( 'N' ) );
238
- $bIsOpened = true;
239
  // Result
240
  $bTodayOpened = ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] : '' );
241
  // If result == 1 => Opened
@@ -262,7 +295,12 @@ class Button
262
  return $bIsOpened;
263
  }
264
 
265
- // Day-number to text
 
 
 
 
 
266
  private function getDay( $sDay )
267
  {
268
  switch ( $sDay ) {
@@ -293,7 +331,9 @@ class Button
293
  }
294
  }
295
 
296
- // Share buttons
 
 
297
  private function share_btns()
298
  {
299
 
@@ -319,12 +359,23 @@ class Button
319
 
320
  }
321
 
322
- // Output
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  public function output()
324
  {
325
- $bShowOnScroll = ( isset( $this->aSettings['show_on_scroll'] ) ? true : false );
326
- $bShowOnProcent = ( isset( $this->aSettings['procent_to_scroll'] ) ? $this->aSettings['procent_to_scroll'] : '0' );
327
- $sGoogleAnalyticsCode = ( isset( $this->aSettings['google_analytics'] ) ? $this->aSettings['google_analytics'] : false );
328
  $showAfterTimeout = $this->showOnTimeout();
329
  $showOnScroll = $this->showOnScroll();
330
  // Main button image or icon
@@ -369,7 +420,12 @@ class Button
369
 
370
  list( $sShadowColorRed, $sShadowColorGreen, $sShadowColorBlue ) = sscanf( $this->aSettings['button_unpushed'], "#%02x%02x%02x" );
371
  echo '<style>.buttonizer-button a:hover, .buttonizer-button a:focus{ background:' . $this->aSettings['button_pushed'] . '; } .buttonizer-button a { background:' . $this->aSettings['button_unpushed'] . '; } .buttonizer-button a i { color: ' . $this->aSettings['icon_color'] . '; } ' . $this->sButtonCss . '</style>
372
- <div class="buttonizer-button ' . (( $showOnScroll > 0 || $showAfterTimeout > 0 ? 'hide' : '' )) . ' ' . (( isset( $this->aSettings['buttons_label_show_on_hover'] ) && $this->aSettings['buttons_label_show_on_hover'] == '1' ? ' show_labels_on_hover' : '' )) . '" button-animation="' . $sButtonAnimation . '" attention-animation="' . $sAttentionAnimation . '" style=" right: ' . $this->aSettings['position_right'] . '%; bottom: ' . $this->aSettings['position_bottom'] . '%;" id="buttonizer-button"><div class="buttonizer_inner" id="buttonizer-sys">' . $output . '</div></div>' ;
 
 
 
 
 
373
  echo '
374
  <script defer type="text/javascript" src="' . plugins_url( '/js/buttonizer.js?v=' . md5( BUTTONIZER_VERSION ), BUTTONIZER_PLUGIN_DIR ) . '"></script>
375
  <script type="text/javascript">
61
  add_action( 'wp_print_styles', array( &$this, 'siteLoadStyles' ) );
62
  }
63
 
64
+ /**
65
+ * Buttonizer setup
66
+ */
67
  private function setup()
68
  {
69
  // Timezone
108
  }
109
  }
110
 
111
+ /**
112
+ * Button generator
113
+ *
114
+ * @param $bNmbr
115
+ * @return string
116
+ */
117
  private function generateB( $bNmbr )
118
  {
119
  // Check if this one must be showed when the company is open:
206
  color: ' . $this->aButtons['button_' . $bNmbr . '_colors_icon'] . ';
207
  } ';
208
  }
209
+ return '<a href="' . $sButtonActionLink . '" class="' . $sButtonClasses . ' is_btzn_btn buttonizer_' . $bNmbr . '" ' . $linkNewTab . ' onclick="onButtonizerClickEvent(\'' . $buttonTitle . '\')">' . (( $buttonText != "" ? '<div class="text"' . (( $hideLabel == '1' ? 'style="display: none;"' : '' )) . '><div>' . $buttonText . '</div></div>' : '' )) . $sButtonIcon . '</a>';
210
  // Thanks, end
211
  }
212
 
213
+ /**
214
+ * Show on timeout
215
+ *
216
+ * @return float|int|string
217
+ */
218
  private function showOnTimeout()
219
  {
220
  return '0';
221
  }
222
 
223
+ /**
224
+ * Show on scroll
225
+ *
226
+ * @return string|int
227
+ */
228
  private function showOnScroll()
229
  {
230
  return '0';
231
  }
232
 
233
+ /**
234
+ * Exit intent
235
+ *
236
+ * @return string
237
+ */
238
  private function enableExitIntent()
239
  {
240
  return '0';
241
  }
242
 
243
+ /**
244
+ * Exit intent
245
+ *
246
+ * @return mixed|string
247
+ */
248
  private function enableExitIntentText()
249
  {
250
  return '';
251
  }
252
 
253
+ /**
254
+ * Custom class
255
+ *
256
+ * @param $iButtonId
257
+ * @return string
258
+ */
259
  private function getCustomClass( $iButtonId )
260
  {
261
  return '';
262
  }
263
 
264
+ /**
265
+ * Is the store opened right now?
266
+ *
267
+ * @return bool
268
+ */
269
  private function isOpened()
270
  {
271
  $sDayOfWeek = $this->getDay( date( 'N' ) );
 
272
  // Result
273
  $bTodayOpened = ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] : '' );
274
  // If result == 1 => Opened
295
  return $bIsOpened;
296
  }
297
 
298
+ /**
299
+ * Day-number to text
300
+ *
301
+ * @param $sDay
302
+ * @return string
303
+ */
304
  private function getDay( $sDay )
305
  {
306
  switch ( $sDay ) {
331
  }
332
  }
333
 
334
+ /**
335
+ * Share buttons
336
+ */
337
  private function share_btns()
338
  {
339
 
359
 
360
  }
361
 
362
+ /**
363
+ * Get the positioning of the buttons
364
+ * @param string $sPositioning
365
+ * @return string
366
+ */
367
+ public function buttonPositioning( $sPositioning = '' )
368
+ {
369
+ $sPositioning .= (( isset( $this->aSettings['buttons_placing'] ) && $this->aSettings['buttons_placing'] == 'left' ? 'left' : 'right' )) . ': ' . (( isset( $this->aSettings['position_horizontal'] ) ? $this->aSettings['position_horizontal'] : (( isset( $this->aSettings['position_right'] ) ? $this->aSettings['position_right'] : '5' )) )) . '%;';
370
+ $sPositioning .= 'bottom: ' . (( isset( $this->aSettings['position_bottom'] ) ? $this->aSettings['position_bottom'] : '5' )) . '%;';
371
+ return $sPositioning;
372
+ }
373
+
374
+ /**
375
+ * Output of the button
376
+ */
377
  public function output()
378
  {
 
 
 
379
  $showAfterTimeout = $this->showOnTimeout();
380
  $showOnScroll = $this->showOnScroll();
381
  // Main button image or icon
420
 
421
  list( $sShadowColorRed, $sShadowColorGreen, $sShadowColorBlue ) = sscanf( $this->aSettings['button_unpushed'], "#%02x%02x%02x" );
422
  echo '<style>.buttonizer-button a:hover, .buttonizer-button a:focus{ background:' . $this->aSettings['button_pushed'] . '; } .buttonizer-button a { background:' . $this->aSettings['button_unpushed'] . '; } .buttonizer-button a i { color: ' . $this->aSettings['icon_color'] . '; } ' . $this->sButtonCss . '</style>
423
+ <div class="buttonizer-button ' . (( $showOnScroll > 0 || $showAfterTimeout > 0 ? 'hide' : '' )) . ' ' . (( isset( $this->aSettings['buttons_label_show_on_hover'] ) && $this->aSettings['buttons_label_show_on_hover'] == '1' ? ' show_labels_on_hover' : '' )) . '"
424
+ button-animation="' . $sButtonAnimation . '"
425
+ attention-animation="' . $sAttentionAnimation . '"
426
+ label-style="' . (( isset( $this->aSettings['buttons_label_placing'] ) ? $this->aSettings['buttons_label_placing'] : 'default' )) . '"
427
+ style="' . $this->buttonPositioning() . '"
428
+ id="buttonizer-button"><div class="buttonizer_inner" id="buttonizer-sys">' . $output . '</div></div>' ;
429
  echo '
430
  <script defer type="text/javascript" src="' . plugins_url( '/js/buttonizer.js?v=' . md5( BUTTONIZER_VERSION ), BUTTONIZER_PLUGIN_DIR ) . '"></script>
431
  <script type="text/javascript">
css/buttonizer.css CHANGED
@@ -1,7 +1,5 @@
1
  .buttonizer-button{
2
  position:fixed;
3
- right: 40px;
4
- bottom: 40px;
5
  z-index: 9999;
6
  transition: all 0.2s ease-in-out;
7
  -moz-transition: all 0.2s ease-in-out;
@@ -73,6 +71,11 @@
73
  right: 0;
74
  }
75
 
 
 
 
 
 
76
  .buttonizer-button .buttonizer_inner a.buttonizer_head i {
77
  font-size: 28px !important;
78
  font-style: normal;
@@ -250,37 +253,60 @@
250
  top: -410px;
251
  }
252
 
253
- .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .share_1 {
254
  opacity: 1;
255
  left: -105px;
256
  top: -53px;
257
  }
258
 
259
- .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .share_2 {
260
  opacity: 1;
261
  left: -154px;
262
  top: -53px;
263
  }
264
 
265
- .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .share_3 {
266
  opacity: 1;
267
  left: -202px;
268
  top: -53px;
269
  }
270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  /* Circle animation */
272
- .buttonizer-button[button-animation="circle"] a.is_extra {
273
  top: -50px;
274
  right: 0px;
275
  }
276
 
277
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .bt_0 {
278
  opacity: 1;
279
  top: -49px;
280
  right: 150px;
281
  }
282
 
283
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .bt_1 {
284
  opacity: 1;
285
  top: -100px;
286
  right: 137px;
@@ -289,7 +315,7 @@
289
  transition-delay: 150ms;
290
  }
291
 
292
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .bt_2 {
293
  opacity: 1;
294
  top: -150px;
295
  right: 108px;
@@ -298,7 +324,7 @@
298
  transition-delay: 300ms;
299
  }
300
 
301
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .bt_3 {
302
  opacity: 1;
303
  top: -186px;
304
  right: 63px;
@@ -307,7 +333,7 @@
307
  transition-delay: 450ms;
308
  }
309
 
310
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .bt_4 {
311
  opacity: 1;
312
  top: -208px;
313
  right: 10px;
@@ -316,13 +342,13 @@
316
  transition-delay: 600ms;
317
  }
318
 
319
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_1 {
320
  opacity: 1;
321
  left: -125px;
322
  top: -53px;
323
  }
324
 
325
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_2 {
326
  opacity: 1;
327
  left: -95px;
328
  top: -104px;
@@ -331,7 +357,7 @@
331
  transition-delay: 150ms;
332
  }
333
 
334
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_3 {
335
  opacity: 1;
336
  left: -48px;
337
  top: -137px;
@@ -340,13 +366,86 @@
340
  transition-delay: 300ms;
341
  }
342
 
343
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_1 .text,
344
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_2 .text,
345
- .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_3 .text {
346
  top: 7px;
347
  right: 48px;
348
  }
349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  .buttonizer-button.show_labels_on_hover a > .text,
351
  .buttonizer-button.show_labels_on_hover .buttonizer_head.onlyone > .text,
352
  .buttonizer-button .buttonizer_inner a.show_on_hover .text {
@@ -371,11 +470,21 @@
371
  animation: buttonizer-bounce 1.4s linear;
372
  }
373
 
 
 
 
 
 
 
374
  /* Fade right to left animation */
375
- .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .is_extra {
376
  margin-right: -40px;
377
  }
378
 
 
 
 
 
379
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner.opened .is_extra {
380
  opacity: 1;
381
  }
@@ -432,12 +541,17 @@
432
  margin-bottom: -40px;
433
  }
434
 
435
- .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner .share_1 {
 
 
 
 
 
436
  left: -105px;
437
  top: -53px;
438
  }
439
 
440
- .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner .share_2 {
441
  left: -154px;
442
  top: -53px;
443
  -moz-transition-delay: 150ms;
@@ -445,7 +559,7 @@
445
  transition-delay: 150ms;
446
  }
447
 
448
- .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner .share_3 {
449
  left: -202px;
450
  top: -53px;
451
  -moz-transition-delay: 300ms;
@@ -453,6 +567,46 @@
453
  transition-delay: 300ms;
454
  }
455
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
  /* Animation */
457
  @-webkit-keyframes buttonizer-hello {
458
  0% {
1
  .buttonizer-button{
2
  position:fixed;
 
 
3
  z-index: 9999;
4
  transition: all 0.2s ease-in-out;
5
  -moz-transition: all 0.2s ease-in-out;
71
  right: 0;
72
  }
73
 
74
+ .buttonizer-button[label-style="mirrored"] a.buttonizer_head {
75
+ left: 0;
76
+ right: auto;
77
+ }
78
+
79
  .buttonizer-button .buttonizer_inner a.buttonizer_head i {
80
  font-size: 28px !important;
81
  font-style: normal;
253
  top: -410px;
254
  }
255
 
256
+ .buttonizer-button[button-animation="default"][label-style='default'] .buttonizer_inner.opened .share_1 {
257
  opacity: 1;
258
  left: -105px;
259
  top: -53px;
260
  }
261
 
262
+ .buttonizer-button[button-animation="default"][label-style='default'] .buttonizer_inner.opened .share_2 {
263
  opacity: 1;
264
  left: -154px;
265
  top: -53px;
266
  }
267
 
268
+ .buttonizer-button[button-animation="default"][label-style='default'] .buttonizer_inner.opened .share_3 {
269
  opacity: 1;
270
  left: -202px;
271
  top: -53px;
272
  }
273
 
274
+ .buttonizer-button[button-animation="default"][label-style='mirrored'] a.is_extra {
275
+ left: 9px;
276
+ right: auto;
277
+ }
278
+
279
+ .buttonizer-button[button-animation="default"][label-style='mirrored'] .buttonizer_inner.opened .share_1 {
280
+ opacity: 1;
281
+ left: 65px;
282
+ top: -51px;
283
+ }
284
+
285
+ .buttonizer-button[button-animation="default"][label-style='mirrored'] .buttonizer_inner.opened .share_2 {
286
+ opacity: 1;
287
+ left: 114px;
288
+ top: -51px;
289
+ }
290
+
291
+ .buttonizer-button[button-animation="default"][label-style='mirrored'] .buttonizer_inner.opened .share_3 {
292
+ opacity: 1;
293
+ left: 163px;
294
+ top: -51px;
295
+ }
296
+
297
  /* Circle animation */
298
+ .buttonizer-button[button-animation="circle"][label-style='default'] a.is_extra {
299
  top: -50px;
300
  right: 0px;
301
  }
302
 
303
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .bt_0 {
304
  opacity: 1;
305
  top: -49px;
306
  right: 150px;
307
  }
308
 
309
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .bt_1 {
310
  opacity: 1;
311
  top: -100px;
312
  right: 137px;
315
  transition-delay: 150ms;
316
  }
317
 
318
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .bt_2 {
319
  opacity: 1;
320
  top: -150px;
321
  right: 108px;
324
  transition-delay: 300ms;
325
  }
326
 
327
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .bt_3 {
328
  opacity: 1;
329
  top: -186px;
330
  right: 63px;
333
  transition-delay: 450ms;
334
  }
335
 
336
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .bt_4 {
337
  opacity: 1;
338
  top: -208px;
339
  right: 10px;
342
  transition-delay: 600ms;
343
  }
344
 
345
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .share_1 {
346
  opacity: 1;
347
  left: -125px;
348
  top: -53px;
349
  }
350
 
351
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .share_2 {
352
  opacity: 1;
353
  left: -95px;
354
  top: -104px;
357
  transition-delay: 150ms;
358
  }
359
 
360
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .share_3 {
361
  opacity: 1;
362
  left: -48px;
363
  top: -137px;
366
  transition-delay: 300ms;
367
  }
368
 
369
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .share_1 .text,
370
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .share_2 .text,
371
+ .buttonizer-button[button-animation="circle"][label-style='default'] .buttonizer_inner.opened .share_3 .text {
372
  top: 7px;
373
  right: 48px;
374
  }
375
 
376
+ /* Mirrored circle */
377
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] a.is_extra {
378
+ top: -50px;
379
+ left: 0px;
380
+ }
381
+
382
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] .buttonizer_inner.opened .bt_0 {
383
+ opacity: 1;
384
+ top: -49px;
385
+ left: 150px;
386
+ }
387
+
388
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] .buttonizer_inner.opened .bt_1 {
389
+ opacity: 1;
390
+ top: -100px;
391
+ left: 137px;
392
+ -moz-transition-delay: 150ms;
393
+ -webkit-transition-delay: 150ms;
394
+ transition-delay: 150ms;
395
+ }
396
+
397
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] .buttonizer_inner.opened .bt_2 {
398
+ opacity: 1;
399
+ top: -150px;
400
+ left: 108px;
401
+ -moz-transition-delay: 300ms;
402
+ -webkit-transition-delay: 300ms;
403
+ transition-delay: 300ms;
404
+ }
405
+
406
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] .buttonizer_inner.opened .bt_3 {
407
+ opacity: 1;
408
+ top: -186px;
409
+ left: 63px;
410
+ -moz-transition-delay: 450ms;
411
+ -webkit-transition-delay: 450ms;
412
+ transition-delay: 450ms;
413
+ }
414
+
415
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] .buttonizer_inner.opened .bt_4 {
416
+ opacity: 1;
417
+ top: -208px;
418
+ left: 10px;
419
+ -moz-transition-delay: 600ms;
420
+ -webkit-transition-delay: 600ms;
421
+ transition-delay: 600ms;
422
+ }
423
+
424
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] .buttonizer_inner.opened .share_1 {
425
+ opacity: 1;
426
+ left: 85px;
427
+ top: -53px;
428
+ }
429
+
430
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] .buttonizer_inner.opened .share_2 {
431
+ opacity: 1;
432
+ left: 55px;
433
+ top: -104px;
434
+ -moz-transition-delay: 150ms;
435
+ -webkit-transition-delay: 150ms;
436
+ transition-delay: 150ms;
437
+ }
438
+
439
+ .buttonizer-button[button-animation="circle"][label-style='mirrored'] .buttonizer_inner.opened .share_3 {
440
+ opacity: 1;
441
+ left: 8px;
442
+ top: -137px;
443
+ -moz-transition-delay: 300ms;
444
+ -webkit-transition-delay: 300ms;
445
+ transition-delay: 300ms;
446
+ }
447
+
448
+ /* Label things */
449
  .buttonizer-button.show_labels_on_hover a > .text,
450
  .buttonizer-button.show_labels_on_hover .buttonizer_head.onlyone > .text,
451
  .buttonizer-button .buttonizer_inner a.show_on_hover .text {
470
  animation: buttonizer-bounce 1.4s linear;
471
  }
472
 
473
+ /* Mirroring */
474
+ .buttonizer-button[label-style='mirrored'] a.is_btzn_btn .text {
475
+ left: 55px;
476
+ right: auto;
477
+ }
478
+
479
  /* Fade right to left animation */
480
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='default'] .buttonizer_inner:not(.opened) .is_extra {
481
  margin-right: -40px;
482
  }
483
 
484
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner:not(.opened) .is_extra {
485
+ margin-right: 40px;
486
+ }
487
+
488
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner.opened .is_extra {
489
  opacity: 1;
490
  }
541
  margin-bottom: -40px;
542
  }
543
 
544
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .is_extra {
545
+ left: 9px;
546
+ right: auto;
547
+ }
548
+
549
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='default'] .buttonizer_inner .share_1 {
550
  left: -105px;
551
  top: -53px;
552
  }
553
 
554
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='default'] .buttonizer_inner .share_2 {
555
  left: -154px;
556
  top: -53px;
557
  -moz-transition-delay: 150ms;
559
  transition-delay: 150ms;
560
  }
561
 
562
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='default'] .buttonizer_inner .share_3 {
563
  left: -202px;
564
  top: -53px;
565
  -moz-transition-delay: 300ms;
567
  transition-delay: 300ms;
568
  }
569
 
570
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner .share_1 {
571
+ left: 66px;
572
+ top: -51px;
573
+ }
574
+
575
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner .share_2 {
576
+ left: 115px;
577
+ top: -51px;
578
+
579
+ -moz-transition-delay: 150ms;
580
+ -webkit-transition-delay: 150ms;
581
+ transition-delay: 150ms;
582
+ }
583
+
584
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner .share_3 {
585
+ left: 164px;
586
+ top: -51px;
587
+
588
+ -moz-transition-delay: 300ms;
589
+ -webkit-transition-delay: 300ms;
590
+ transition-delay: 300ms;
591
+ }
592
+
593
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner .is_extra {
594
+ margin-left: -40px;
595
+ }
596
+
597
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner.opened .is_extra {
598
+ margin-left: 0;
599
+ }
600
+
601
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner .share_1,
602
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner .share_2,
603
+ .buttonizer-button[button-animation="fade-left-to-right"][label-style='mirrored'] .buttonizer_inner .share_3 {
604
+ margin-right: 0 !important;
605
+ margin-left: 0 !important;
606
+ }
607
+
608
+
609
+
610
  /* Animation */
611
  @-webkit-keyframes buttonizer-hello {
612
  0% {
css/style.css CHANGED
@@ -619,6 +619,16 @@ h2 .button {
619
  cursor: pointer;
620
  }
621
 
 
 
 
 
 
 
 
 
 
 
622
  /* FontAwesome searcher */
623
  .fontawesome-searcher-clicker {
624
  display: inline-block;
619
  cursor: pointer;
620
  }
621
 
622
+ .buttonizer-note {
623
+ padding: 12px 21px;
624
+ color: #484848;
625
+ background: #f1f1f1;
626
+ border: 1px solid #c8c8c8;
627
+ font-size: 13px;
628
+ line-height: 22px;
629
+ margin-top: 10px;
630
+ }
631
+
632
  /* FontAwesome searcher */
633
  .fontawesome-searcher-clicker {
634
  display: inline-block;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Buy plugin: https://buttonizer.pro
4
  Tags: floating menu, action button, call button, floating action button, Social Sharing button
5
  Requires at least: 4.2
6
  Tested up to: 4.9.1
7
- Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -117,6 +117,18 @@ In fact the Buttonizer is an addiction to use. You&#39;re website visitors will
117
 
118
  == Changelog ==
119
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  = 1.1 =
121
  Bug fix:
122
  - Wordpress 4.9 fix for changing colors. The window closed when you tried to change colors. It should work now.
4
  Tags: floating menu, action button, call button, floating action button, Social Sharing button
5
  Requires at least: 4.2
6
  Tested up to: 4.9.1
7
+ Stable tag: 1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
117
 
118
  == Changelog ==
119
 
120
+ = 1.2 =
121
+ New to Buttonizer: Repositionize the button easier! You are able to reposition the button from the left bottom corner, or from the right bottom corner. We have added button mirroring also: Mirror the style of the button and change the position of the label from the right side of the button, to the left side of the button.
122
+
123
+ New features this release:
124
+ - Button placing: Align the button to the left, or allign to right
125
+ - Button mirroring: The button animation style can be mirrored
126
+
127
+ Bug fixes:
128
+ - Conflict with Postman SMTP fixed
129
+ - Label text was used for labeling Google Analytics events. Now we've changed it to use the button title as it should be. Sorry for the inconvenience
130
+ - Other small fixes
131
+
132
  = 1.1 =
133
  Bug fix:
134
  - Wordpress 4.9 fix for changing colors. The window closed when you tried to change colors. It should work now.