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

Version Description

There are multiple changes inside Buttonizer. Like the settings page is better organised now and re-styled.

Added to Buttonizer: - We are introducing 'Attention animations': There 2 animations to let the button jumping out of the background - It is now possible to give the main button a label - You can enable the option 'Show label on hover'

Fixed: - Social sharing fix for the circle button menu - Some php notices warnings people 'noticed' - Style fix - Some bugs

Download this release

Release Info

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

Code changes from version 1.0.7 to 1.0.8

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.0.7
7
  Author: Buttonizer
8
  Author URI: https://buttonizer.pro
9
  License: GPL2
@@ -30,8 +30,9 @@ Copyright 2017 Buttonizer
30
 
31
  define('BUTTONIZER_NAME', 'buttonizer');
32
  define('BUTTONIZER_DIR', dirname(__FILE__));
 
33
  define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
34
- define('BUTTONIZER_VERSION','1.0.7');
35
 
36
  # No script kiddies
37
  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.0.8
7
  Author: Buttonizer
8
  Author URI: https://buttonizer.pro
9
  License: GPL2
30
 
31
  define('BUTTONIZER_NAME', 'buttonizer');
32
  define('BUTTONIZER_DIR', dirname(__FILE__));
33
+ define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
34
  define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
35
+ define('BUTTONIZER_VERSION','1.0.8');
36
 
37
  # No script kiddies
38
  defined( 'ABSPATH' ) or die('No script kiddies please!');
classes/admin/CompanyOpened.php CHANGED
@@ -57,12 +57,12 @@ class CompanyOpened
57
  echo '<div class="buttonizer-pro-text"><i class="fa fa-lock"></i> You are missing the fun! When upgrading to <a href="admin.php?page=Buttonizer-pricing">Buttonizer Pro</a> you will unlock opening hours.</div>' ;
58
  }
59
 
60
- public function fieldOpeningTimeSelector( $sDay )
61
  {
62
  return '<div class="buttonizer-slider buttonizer-click-to-pro" data-day="' . $sDay . '"></div>';
63
  }
64
 
65
- public function fieldOpenedToday( $sDay = 'monday' )
66
  {
67
  return '<input type="checkbox" class="buttonizer-click-to-pro" readonly /> <span class="buttonizer-click-to-pro">Opened on ' . $sDay . ' (<span class="opening-' . $sDay . '"></span>)</span>';
68
  }
57
  echo '<div class="buttonizer-pro-text"><i class="fa fa-lock"></i> You are missing the fun! When upgrading to <a href="admin.php?page=Buttonizer-pricing">Buttonizer Pro</a> you will unlock opening hours.</div>' ;
58
  }
59
 
60
+ function fieldOpeningTimeSelector( $sDay )
61
  {
62
  return '<div class="buttonizer-slider buttonizer-click-to-pro" data-day="' . $sDay . '"></div>';
63
  }
64
 
65
+ function fieldOpenedToday( $sDay = 'monday' )
66
  {
67
  return '<input type="checkbox" class="buttonizer-click-to-pro" readonly /> <span class="buttonizer-click-to-pro">Opened on ' . $sDay . ' (<span class="opening-' . $sDay . '"></span>)</span>';
68
  }
classes/admin/General.php CHANGED
@@ -34,7 +34,8 @@ class General
34
  $this->aFontAwesome = $aFontAwesome;
35
  $this->oIconManager = $oIconManager;
36
  $this->loadData();
37
- $this->registerStylingSettings();
 
38
  $this->registerAdvancedSettings();
39
  $this->registerSocialSettings();
40
  $this->registerOther();
@@ -68,24 +69,52 @@ class General
68
  /*
69
  * Register settings
70
  */
71
- public function registerStylingSettings()
72
  {
73
- $this->aSubCatagories['styling'] = 'Styling settings';
74
- $this->aSubPages['styling'] = '<table class="form-table"><tbody>';
75
- $this->aSubPages['styling'] .= $this->createFormField( 'Right', array( &$this, 'field_position_right' ) );
76
- $this->aSubPages['styling'] .= $this->createFormField( 'Bottom', array( &$this, 'field_position_bottom' ) );
77
- $this->aSubPages['styling'] .= $this->createFormField( 'Button animation', array( &$this, 'field_button_animation' ) );
78
- $this->aSubPages['styling'] .= $this->createFormField( 'Color button unpushed', array( &$this, 'field_button_unpushed' ) );
79
- $this->aSubPages['styling'] .= $this->createFormField( 'Color button pushed', array( &$this, 'field_button_pushed' ) );
80
- $this->aSubPages['styling'] .= $this->createFormField( 'Icon color', array( &$this, 'field_icon_color' ) );
81
- $this->aSubPages['styling'] .= $this->createFormField( 'Main icon<br /><br /><small>Used only when more then one button and there is a menu.</small>', array( &$this, 'field_icon_icon' ) );
82
- $this->aSubPages['styling'] .= '</tbody></table>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
  public function registerAdvancedSettings()
86
  {
87
- $this->aSubCatagories['advanced'] = 'Advanced settings';
88
  $this->aSubPages['advanced'] = '<table class="form-table"><tbody>';
 
 
 
 
 
89
  $this->aSubPages['advanced'] .= $this->createFormField( '
90
  <span class="info-class">
91
  <i class="fa fa-info-circle"></i>
@@ -93,63 +122,69 @@ class General
93
  </span>
94
  </span>
95
  Google Analytics', array( &$this, 'field_analytics_code' ) );
 
96
  // Show on scroll
97
  $this->aSubPages['advanced'] .= $this->createFormField( '
98
- <span class="info-class">
99
- <i class="fa fa-info-circle"></i>
100
- <span>
101
- When selected, the buttons will be shown after the user has scrolled a percentage of the page.
 
102
  </span>
103
- </span>
104
- Show on scroll?', array( &$this, 'field_show_on_scroll' ) );
105
  $this->aSubPages['advanced'] .= $this->createFormField( '
106
- <span class="info-class">
107
- <i class="fa fa-info-circle"></i>
108
- <span>
109
- Enter a percentage, starting from 0, up to 100.
 
110
  </span>
111
- </span>
112
- % from top to show:', array( &$this, 'field_procent_to_scroll' ) );
113
  // Show after timeout
 
114
  $this->aSubPages['advanced'] .= $this->createFormField( '
115
- <span class="info-class">
116
- <i class="fa fa-info-circle"></i>
117
- <span>
118
- When selected, the buttons will be shown when the user browsers more than the given seconds. So when you say: Show after 20<i>000</i>ms, the button shows after the user browsed on the website for 20 seconds.
 
119
  </span>
120
- </span>
121
- Show after timeout?', array( &$this, 'field_show_on_timeout' ) );
122
  $this->aSubPages['advanced'] .= $this->createFormField( '
123
- <span class="info-class">
124
- <i class="fa fa-info-circle"></i>
125
- <span>
126
- Enter the miliseconds from when the buttons must get shown to the user.<br />
127
- <br />
128
- 1 second = 1000 miliseconds<br />
129
- 10 seconds = 10000 miliseconds<br />
130
- 1 minute = 60000 miliseconds<br />
 
131
  </span>
132
- </span>
133
- Milliseconds: ', array( &$this, 'field_time_to_timeout' ) );
134
  // Exit intent
 
135
  $this->aSubPages['advanced'] .= $this->createFormField( '
136
- <span class="info-class">
137
- <i class="fa fa-info-circle"></i>
138
- <span>
139
- When selected, the buttons will open with a effect when your guest/user tries to escape from your website. The user gets attracted from your buttons.
 
140
  </span>
141
- </span>
142
- Exit intent', array( &$this, 'field_exit_intent' ) );
143
  $this->aSubPages['advanced'] .= $this->createFormField( '
144
- <span class="info-class">
145
- <i class="fa fa-info-circle"></i>
146
- <span>
147
- When the exit intent activates, there will be shown some text next to the head-button. You can edit that here.<br />
148
- <br />
149
- When empty, no message will be shown.
 
150
  </span>
151
- </span>
152
- Exit intent text', array( &$this, 'field_exit_intent_text' ) );
153
  $this->aSubPages['advanced'] .= '</tbody></table>';
154
  if ( !ButtonizerLicense()->is_not_paying() && !ButtonizerLicense()->is_plan( 'premium' ) ) {
155
  $this->aSubPages['advanced'] .= '<div class="buttonizer-pro-text"><i class="fa fa-lock"></i> You are missing the fun! When upgrading to <a href="admin.php?page=Buttonizer-pricing">Buttonizer Pro</a> you will get these features.</div>';
@@ -158,75 +193,107 @@ class General
158
 
159
  public function registerSocialSettings()
160
  {
161
- $this->aSubCatagories['social'] = 'Social share settings';
162
  $this->aSubPages['social'] = '<table class="form-table"><tbody>';
 
 
 
 
 
 
163
  // Facebook share button
164
  $this->aSubPages['social'] .= $this->createFormField( 'Share on Facebook', array( &$this, 'field_share_facebook' ) );
165
  // Twitter share button
166
  $this->aSubPages['social'] .= $this->createFormField( 'Share on Twitter', array( &$this, 'field_share_twitter' ) );
167
  // LinkedIn share button
168
  $this->aSubPages['social'] .= $this->createFormField( 'Share on LinkedIn', array( &$this, 'field_share_linkedin' ) );
 
 
 
 
169
  $this->aSubPages['social'] .= '</tbody></table>';
170
  }
171
 
172
  public function registerOther()
173
  {
174
- $this->aSubCatagories['other'] = 'Other';
175
  $this->aSubPages['other'] = '<table class="form-table"><tbody>';
176
- $this->aSubPages['other'] .= '<tr><th scope="row">Reset Buttonizer</th><td><a href="?page=Buttonizer&tab=buttonizer_page_reset">More info</a></td></tr>';
 
 
 
 
 
 
177
  $this->aSubPages['other'] .= '</tbody></table>';
178
  }
179
 
180
  private function createFormField( $sLabel, $aFunction )
181
  {
182
- return '<tr><th scope="row">' . $sLabel . '</th><td>' . $aFunction() . '</td></tr>';
 
 
 
 
 
 
 
 
 
 
183
  }
184
 
185
  /*
186
  * Form
187
  */
188
- public function field_button_unpushed()
189
  {
190
  $button_unpushed = ( isset( $this->aSavedData['button_unpushed'] ) ? $this->aSavedData['button_unpushed'] : '#48A4DC' );
191
  return '<input type="text" name="buttonizer_general_settings[button_unpushed]" value="' . $button_unpushed . '" id="button_unpushed" data-default-color="#fffff" />';
192
  }
193
 
194
- public function field_button_pushed()
195
  {
196
  $button_pushed = ( isset( $this->aSavedData['button_pushed'] ) ? $this->aSavedData['button_pushed'] : '#1D9BDB' );
197
  return '<input type="text" name="buttonizer_general_settings[button_pushed]" value="' . $button_pushed . '" id="button_pushed" data-default-color="#fffff" />';
198
  }
199
 
200
- public function field_icon_color()
201
  {
202
  $icon_color = ( isset( $this->aSavedData['icon_color'] ) ? $this->aSavedData['icon_color'] : '#fffff' );
203
  return '<input type="text" name="buttonizer_general_settings[icon_color]" value="' . $icon_color . '" id="icon_color" data-default-color="#fffff" />';
204
  }
205
 
206
- public function field_icon_icon()
207
  {
208
- $p = $this->oIconManager->generator( array(
209
  'icon' => ( isset( $this->aSavedData['icon_icon'] ) ? $this->aSavedData['icon_icon'] : '' ),
210
  'icon_fieldname' => 'buttonizer_general_settings[icon_icon]',
211
  'image' => ( isset( $this->aSavedData['custom_icon'] ) ? $this->aSavedData['custom_icon'] : '' ),
212
  'image_fieldname' => 'buttonizer_general_settings[custom_icon]',
213
- ) );
214
  return $p;
215
  }
216
 
217
- public function field_position_right()
 
 
 
 
 
 
218
  {
219
  $position_right = ( isset( $this->aSavedData['position_right'] ) ? $this->aSavedData['position_right'] : '5' );
220
- return '<input type="text" name="buttonizer_general_settings[position_right]" value="' . $position_right . '"/><small><i>%</i><br />Recommended 5% then it will position itself on the right corner</small>';
221
  }
222
 
223
- public function field_position_bottom()
224
  {
225
  $position_bottom = ( isset( $this->aSavedData['position_bottom'] ) ? $this->aSavedData['position_bottom'] : '5' );
226
- return '<input type="text" name="buttonizer_general_settings[position_bottom]" value="' . $position_bottom . '"/><small><i>%</i><br>Recommended 5% then it will position itself on the bottom corner</small>';
227
  }
228
 
229
- public function field_button_animation()
230
  {
231
  $button_animation = ( isset( $this->aSavedData['buttons_animation'] ) ? $this->aSavedData['buttons_animation'] : 'default' );
232
  return '
@@ -237,23 +304,42 @@ class General
237
  </select>';
238
  }
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  /*
241
  * Advanced
242
  */
243
- public function field_analytics_code()
244
  {
245
  $google_analytics = ( isset( $this->aSavedData['google_analytics'] ) ? $this->aSavedData['google_analytics'] : '' );
246
- return '<input type="text" name="buttonizer_general_settings[google_analytics]" value="' . $google_analytics . '" placeholder="Only when not inserted yet" style="width: 250px;"/>';
247
  }
248
 
249
  public function field_show_on_scroll()
250
  {
251
- return '<input type="checkbox" class="buttonizer-click-to-pro" readonly /> <span class="buttonizer-pro-feature">PRO</span>';
252
  }
253
 
254
  public function field_procent_to_scroll()
255
  {
256
- return '<input type="text" value="0" class="buttonizer-click-to-pro" readonly /><small><i>%</i></small> <span class="buttonizer-pro-feature">PRO</span>';
257
  }
258
 
259
  public function field_show_on_timeout()
@@ -263,7 +349,7 @@ class General
263
 
264
  public function field_time_to_timeout()
265
  {
266
- return '<input type="text" class="buttonizer-click-to-pro" readonly value="0" /><span class="buttonizer-pro-feature">PRO</span>';
267
  }
268
 
269
  // Exit intent
@@ -274,29 +360,29 @@ class General
274
 
275
  public function field_exit_intent_text()
276
  {
277
- return '<input type="text" class="buttonizer-click-to-pro" readonly value="" /><span class="buttonizer-pro-feature">PRO</span>';
278
  }
279
 
280
  // Share page
281
- public function field_share_facebook()
282
  {
283
  $share_facebook = ( isset( $this->aSavedData['share_facebook'] ) ? $this->aSavedData['share_facebook'] : '' );
284
  $share_facebook_text = ( isset( $this->aSavedData['share_facebook_text'] ) ? $this->aSavedData['share_facebook_text'] : 'Share this on Facebook' );
285
- return '<input type="checkbox" name="buttonizer_general_settings[share_facebook]" value="1" ' . (( $share_facebook == '1' ? 'checked="checked"' : '' )) . ' /> <input type="text" name="buttonizer_general_settings[share_facebook_text]" value="' . $share_facebook_text . '" placeholder="Share this on Facebook" style="vertical-align: middle; margin-left: 10px;" />';
286
  }
287
 
288
- public function field_share_linkedin()
289
  {
290
  $share_linkedin = ( isset( $this->aSavedData['share_linkedin'] ) ? $this->aSavedData['share_linkedin'] : '' );
291
  $share_linkedin_text = ( isset( $this->aSavedData['share_linkedin_text'] ) ? $this->aSavedData['share_linkedin_text'] : 'Share this on LinkedIn' );
292
- return '<input type="checkbox" name="buttonizer_general_settings[share_linkedin]" value="1" ' . (( $share_linkedin == '1' ? 'checked="checked"' : '' )) . ' /> <input type="text" name="buttonizer_general_settings[share_linkedin_text]" value="' . $share_linkedin_text . '" placeholder="Share this on LinkedIn" style="vertical-align: middle; margin-left: 10px;" />';
293
  }
294
 
295
- public function field_share_twitter()
296
  {
297
  $share_twitter = ( isset( $this->aSavedData['share_twitter'] ) ? $this->aSavedData['share_twitter'] : '' );
298
  $share_twitter_text = ( isset( $this->aSavedData['share_twitter_text'] ) ? $this->aSavedData['share_twitter_text'] : 'Share this on Twitter' );
299
- return '<input type="checkbox" name="buttonizer_general_settings[share_twitter]" value="1" ' . (( $share_twitter == '1' ? 'checked="checked"' : '' )) . ' /> <input type="text" name="buttonizer_general_settings[share_twitter_text]" value="' . $share_twitter_text . '" placeholder="Share this on Twitter" style="vertical-align: middle; margin-left: 10px;" />';
300
  }
301
 
302
  }
34
  $this->aFontAwesome = $aFontAwesome;
35
  $this->oIconManager = $oIconManager;
36
  $this->loadData();
37
+ $this->registerPlacingSettings();
38
+ $this->registerDesignSettings();
39
  $this->registerAdvancedSettings();
40
  $this->registerSocialSettings();
41
  $this->registerOther();
69
  /*
70
  * Register settings
71
  */
72
+ public function registerPlacingSettings()
73
  {
74
+ $this->aSubCatagories['placing'] = __( 'Placing &amp; animations', BUTTONIZER_SLUG );
75
+ $this->aSubPages['placing'] = '<table class="form-table"><tbody>';
76
+ $this->aSubPages['placing'] .= '<tr>
77
+ <td colspan="2">
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' ) );
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' ) );
84
+ $this->aSubPages['placing'] .= $this->createFormField( 'Attention animation', array( &$this, 'field_attention_animation' ) );
85
+ $this->aSubPages['placing'] .= '</tbody></table>';
86
+ }
87
+
88
+ /*
89
+ * Register settings
90
+ */
91
+ public function registerDesignSettings()
92
+ {
93
+ $this->aSubCatagories['design'] = __( 'Design', BUTTONIZER_SLUG );
94
+ $this->aSubPages['design'] = '<table class="form-table"><tbody>';
95
+ $this->aSubPages['design'] .= '<tr>
96
+ <td colspan="2">
97
+ <h2>Design</h2>
98
+ <p>Style your button, make it blinky as you wish. You can change here the main color, main label and set the label hover types.</p>
99
+ </td></tr>';
100
+ $this->aSubPages['design'] .= $this->createFormField( 'Color button unpushed', array( &$this, 'field_button_unpushed' ) );
101
+ $this->aSubPages['design'] .= $this->createFormField( 'Color button pushed', array( &$this, 'field_button_pushed' ) );
102
+ $this->aSubPages['design'] .= $this->createFormField( 'Icon color', array( &$this, 'field_icon_color' ) );
103
+ $this->aSubPages['design'] .= $this->createFormField( 'Main icon<br /><br /><small>Used only when more then one button and there is a menu.</small>', array( &$this, 'field_icon_icon' ) );
104
+ $this->aSubPages['design'] .= $this->createFormField( 'Main label<br /><br /><small>Used only when more then one button and there is a menu.</small>', array( &$this, 'field_icon_label' ) );
105
+ $this->aSubPages['design'] .= $this->createFormField( 'Only show labels on hover<br /><br /><small>Only show the label when you hover the button.</small>', array( &$this, 'field_label_show_on_hover' ) );
106
+ $this->aSubPages['design'] .= '</tbody></table>';
107
  }
108
 
109
  public function registerAdvancedSettings()
110
  {
111
+ $this->aSubCatagories['advanced'] = __( 'Advanced settings', BUTTONIZER_SLUG );
112
  $this->aSubPages['advanced'] = '<table class="form-table"><tbody>';
113
+ $this->aSubPages['advanced'] .= '<tr>
114
+ <td colspan="2">
115
+ <h2>Advanced settings</h2>
116
+ <p></p>
117
+ </td></tr>';
118
  $this->aSubPages['advanced'] .= $this->createFormField( '
119
  <span class="info-class">
120
  <i class="fa fa-info-circle"></i>
122
  </span>
123
  </span>
124
  Google Analytics', array( &$this, 'field_analytics_code' ) );
125
+ $this->aSubPages['advanced'] .= $this->createFieldset( 'Show on scroll' );
126
  // Show on scroll
127
  $this->aSubPages['advanced'] .= $this->createFormField( '
128
+ <span class="info-class">
129
+ <i class="fa fa-info-circle"></i>
130
+ <span>
131
+ When selected, the buttons will be shown after the user has scrolled a percentage of the page.
132
+ </span>
133
  </span>
134
+ Show on scroll?', array( &$this, 'field_show_on_scroll' ) );
 
135
  $this->aSubPages['advanced'] .= $this->createFormField( '
136
+ <span class="info-class">
137
+ <i class="fa fa-info-circle"></i>
138
+ <span>
139
+ Enter a percentage, starting from 0, up to 100.
140
+ </span>
141
  </span>
142
+ % from top to show:', array( &$this, 'field_procent_to_scroll' ) );
143
+ $this->aSubPages['advanced'] .= $this->closeFieldset();
144
  // Show after timeout
145
+ $this->aSubPages['advanced'] .= $this->createFieldset( 'Show after timeout' );
146
  $this->aSubPages['advanced'] .= $this->createFormField( '
147
+ <span class="info-class">
148
+ <i class="fa fa-info-circle"></i>
149
+ <span>
150
+ When selected, the buttons will be shown when the user browsers more than the given seconds. So when you say: Show after 20<i>000</i>ms, the button shows after the user browsed on the website for 20 seconds.
151
+ </span>
152
  </span>
153
+ Show after timeout?', array( &$this, 'field_show_on_timeout' ) );
 
154
  $this->aSubPages['advanced'] .= $this->createFormField( '
155
+ <span class="info-class">
156
+ <i class="fa fa-info-circle"></i>
157
+ <span>
158
+ Enter the miliseconds from when the buttons must get shown to the user.<br />
159
+ <br />
160
+ 1 second = 1000 miliseconds<br />
161
+ 10 seconds = 10000 miliseconds<br />
162
+ 1 minute = 60000 miliseconds<br />
163
+ </span>
164
  </span>
165
+ Milliseconds: ', array( &$this, 'field_time_to_timeout' ) );
166
+ $this->aSubPages['advanced'] .= $this->closeFieldset();
167
  // Exit intent
168
+ $this->aSubPages['advanced'] .= $this->createFieldset( 'Exit intent' );
169
  $this->aSubPages['advanced'] .= $this->createFormField( '
170
+ <span class="info-class">
171
+ <i class="fa fa-info-circle"></i>
172
+ <span>
173
+ When selected, the buttons will open with a effect when your guest/user tries to escape from your website. The user gets attracted from your buttons.
174
+ </span>
175
  </span>
176
+ Exit intent', array( &$this, 'field_exit_intent' ) );
 
177
  $this->aSubPages['advanced'] .= $this->createFormField( '
178
+ <span class="info-class">
179
+ <i class="fa fa-info-circle"></i>
180
+ <span>
181
+ When the exit intent activates, there will be shown some text next to the head-button. You can edit that here.<br />
182
+ <br />
183
+ When empty, no message will be shown.
184
+ </span>
185
  </span>
186
+ Exit intent text', array( &$this, 'field_exit_intent_text' ) );
187
+ $this->aSubPages['advanced'] .= $this->closeFieldset();
188
  $this->aSubPages['advanced'] .= '</tbody></table>';
189
  if ( !ButtonizerLicense()->is_not_paying() && !ButtonizerLicense()->is_plan( 'premium' ) ) {
190
  $this->aSubPages['advanced'] .= '<div class="buttonizer-pro-text"><i class="fa fa-lock"></i> You are missing the fun! When upgrading to <a href="admin.php?page=Buttonizer-pricing">Buttonizer Pro</a> you will get these features.</div>';
193
 
194
  public function registerSocialSettings()
195
  {
196
+ $this->aSubCatagories['social'] = __( 'Social share settings', BUTTONIZER_SLUG );
197
  $this->aSubPages['social'] = '<table class="form-table"><tbody>';
198
+ $this->aSubPages['social'] .= '<tr>
199
+ <td colspan="2">
200
+ <h2>Social sharing buttons</h2>
201
+ <p>This are separated pre-configured buttons to share a page. The buttons will be visible at every page, you can let the user share a page on Twitter, Facebook or LinkedIn.<p>
202
+ <p>You can enable them to check the checkbox at the end of the input. Don\'t forget that :)</p>
203
+ </td></tr>';
204
  // Facebook share button
205
  $this->aSubPages['social'] .= $this->createFormField( 'Share on Facebook', array( &$this, 'field_share_facebook' ) );
206
  // Twitter share button
207
  $this->aSubPages['social'] .= $this->createFormField( 'Share on Twitter', array( &$this, 'field_share_twitter' ) );
208
  // LinkedIn share button
209
  $this->aSubPages['social'] .= $this->createFormField( 'Share on LinkedIn', array( &$this, 'field_share_linkedin' ) );
210
+ $this->aSubPages['social'] .= '<tr>
211
+ <td colspan="2" style="text-align: right;">
212
+ <p>Do you want us to add more social media options? <a href="admin.php?page=Buttonizer-contact">Contact us</a></p>
213
+ </td></tr>';
214
  $this->aSubPages['social'] .= '</tbody></table>';
215
  }
216
 
217
  public function registerOther()
218
  {
219
+ $this->aSubCatagories['other'] = __( 'Other', BUTTONIZER_SLUG );
220
  $this->aSubPages['other'] = '<table class="form-table"><tbody>';
221
+ $this->aSubPages['other'] .= '<tr>
222
+ <td colspan="2">
223
+ <h2>Other</h2>
224
+ <p>Nothing really specials here, just a way to reset the buttonizer to the default settings.</p>
225
+ <p>Click the button below to get some more information.</p>
226
+ </td></tr>';
227
+ $this->aSubPages['other'] .= '<tr><th scope="row">Reset Buttonizer</th><td><a href="?page=Buttonizer&tab=buttonizer_page_reset" class="button ">More info</a></td></tr>';
228
  $this->aSubPages['other'] .= '</tbody></table>';
229
  }
230
 
231
  private function createFormField( $sLabel, $aFunction )
232
  {
233
+ return '<tr><th scope="row">' . $sLabel . '</th><td class="r-sit">' . $aFunction() . '</td></tr>';
234
+ }
235
+
236
+ private function createFieldset( $sLabel )
237
+ {
238
+ return '<tr><td colspan="2"><fieldset><legend>' . $sLabel . '</legend><table class="form-table">';
239
+ }
240
+
241
+ private function closeFieldset()
242
+ {
243
+ return '</table></fieldset></td></tr>';
244
  }
245
 
246
  /*
247
  * Form
248
  */
249
+ function field_button_unpushed()
250
  {
251
  $button_unpushed = ( isset( $this->aSavedData['button_unpushed'] ) ? $this->aSavedData['button_unpushed'] : '#48A4DC' );
252
  return '<input type="text" name="buttonizer_general_settings[button_unpushed]" value="' . $button_unpushed . '" id="button_unpushed" data-default-color="#fffff" />';
253
  }
254
 
255
+ function field_button_pushed()
256
  {
257
  $button_pushed = ( isset( $this->aSavedData['button_pushed'] ) ? $this->aSavedData['button_pushed'] : '#1D9BDB' );
258
  return '<input type="text" name="buttonizer_general_settings[button_pushed]" value="' . $button_pushed . '" id="button_pushed" data-default-color="#fffff" />';
259
  }
260
 
261
+ function field_icon_color()
262
  {
263
  $icon_color = ( isset( $this->aSavedData['icon_color'] ) ? $this->aSavedData['icon_color'] : '#fffff' );
264
  return '<input type="text" name="buttonizer_general_settings[icon_color]" value="' . $icon_color . '" id="icon_color" data-default-color="#fffff" />';
265
  }
266
 
267
+ function field_icon_icon()
268
  {
269
+ $p = $this->oIconManager->generator( [
270
  'icon' => ( isset( $this->aSavedData['icon_icon'] ) ? $this->aSavedData['icon_icon'] : '' ),
271
  'icon_fieldname' => 'buttonizer_general_settings[icon_icon]',
272
  'image' => ( isset( $this->aSavedData['custom_icon'] ) ? $this->aSavedData['custom_icon'] : '' ),
273
  'image_fieldname' => 'buttonizer_general_settings[custom_icon]',
274
+ ] );
275
  return $p;
276
  }
277
 
278
+ function field_icon_label()
279
+ {
280
+ $icon_label = ( isset( $this->aSavedData['icon_label'] ) ? $this->aSavedData['icon_label'] : '' );
281
+ return '<input type="text" name="buttonizer_general_settings[icon_label]" value="' . $icon_label . '" placeholder="Fill in some text" />';
282
+ }
283
+
284
+ function field_position_right()
285
  {
286
  $position_right = ( isset( $this->aSavedData['position_right'] ) ? $this->aSavedData['position_right'] : '5' );
287
+ 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>';
288
  }
289
 
290
+ function field_position_bottom()
291
  {
292
  $position_bottom = ( isset( $this->aSavedData['position_bottom'] ) ? $this->aSavedData['position_bottom'] : '5' );
293
+ 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>';
294
  }
295
 
296
+ function field_button_animation()
297
  {
298
  $button_animation = ( isset( $this->aSavedData['buttons_animation'] ) ? $this->aSavedData['buttons_animation'] : 'default' );
299
  return '
304
  </select>';
305
  }
306
 
307
+ function field_attention_animation()
308
+ {
309
+ $attention_animation = ( isset( $this->aSavedData['attention_animation'] ) ? $this->aSavedData['attention_animation'] : 'none' );
310
+ return '
311
+ <select name="buttonizer_general_settings[attention_animation]" style="width: 100%; padding: 0 10px; height: 40px;">
312
+ <option value="none" ' . (( $attention_animation == 'none' ? 'selected' : '' )) . '>No attention animation</option>
313
+ <option value="hello" ' . (( $attention_animation == 'hello' ? 'selected' : '' )) . '>Buttonizer Hello</option>
314
+ <option value="bounce" ' . (( $attention_animation == 'bounce' ? 'selected' : '' )) . '>Bouncing</option>
315
+ </select>
316
+ <small>This will get the button jumping out of the background. So it gets your attention. All animations will be played every 10 seconds. Average animation duration is 1.75 seconds.</small>
317
+ ';
318
+ }
319
+
320
+ public function field_label_show_on_hover()
321
+ {
322
+ $is_selected = ( isset( $this->aSavedData['buttons_label_show_on_hover'] ) ? $this->aSavedData['buttons_label_show_on_hover'] : '' );
323
+ return '<input type="checkbox" name="buttonizer_general_settings[buttons_label_show_on_hover]" id="buttons_label_show_on_hover" value="1" ' . (( $is_selected == '1' ? 'checked="checked"' : '' )) . ' /> <small><label for="buttons_label_show_on_hover">Only show on hover</label></small>';
324
+ }
325
+
326
  /*
327
  * Advanced
328
  */
329
+ function field_analytics_code()
330
  {
331
  $google_analytics = ( isset( $this->aSavedData['google_analytics'] ) ? $this->aSavedData['google_analytics'] : '' );
332
+ return '<input type="text" name="buttonizer_general_settings[google_analytics]" value="' . $google_analytics . '" placeholder="Only when not inserted yet" /><small>Insert here the Google Analytics tracking code. Like UA-000000-2</small>';
333
  }
334
 
335
  public function field_show_on_scroll()
336
  {
337
+ return '<input type="checkbox" class="buttonizer-click-to-pro" readonly /> <div class="after-input"><span class="buttonizer-pro-feature">PRO</span></div>';
338
  }
339
 
340
  public function field_procent_to_scroll()
341
  {
342
+ return '<input type="text" value="0" class="buttonizer-click-to-pro" readonly /> <div class="after-input"><small><i>%</i></small> <span class="buttonizer-pro-feature">PRO</span></div>';
343
  }
344
 
345
  public function field_show_on_timeout()
349
 
350
  public function field_time_to_timeout()
351
  {
352
+ return '<input type="text" class="buttonizer-click-to-pro" readonly value="0" /><div class="after-input"><span class="buttonizer-pro-feature">PRO</span></div>';
353
  }
354
 
355
  // Exit intent
360
 
361
  public function field_exit_intent_text()
362
  {
363
+ return '<input type="text" class="buttonizer-click-to-pro" readonly value="" /><div class="after-input"><span class="buttonizer-pro-feature">PRO</span></div>';
364
  }
365
 
366
  // Share page
367
+ function field_share_facebook()
368
  {
369
  $share_facebook = ( isset( $this->aSavedData['share_facebook'] ) ? $this->aSavedData['share_facebook'] : '' );
370
  $share_facebook_text = ( isset( $this->aSavedData['share_facebook_text'] ) ? $this->aSavedData['share_facebook_text'] : 'Share this on Facebook' );
371
+ return '<span class="after-input"><input type="checkbox" name="buttonizer_general_settings[share_facebook]" value="1" ' . (( $share_facebook == '1' ? 'checked="checked"' : '' )) . ' /></span> <input type="text" name="buttonizer_general_settings[share_facebook_text]" value="' . $share_facebook_text . '" placeholder="Share this on Facebook" />';
372
  }
373
 
374
+ function field_share_linkedin()
375
  {
376
  $share_linkedin = ( isset( $this->aSavedData['share_linkedin'] ) ? $this->aSavedData['share_linkedin'] : '' );
377
  $share_linkedin_text = ( isset( $this->aSavedData['share_linkedin_text'] ) ? $this->aSavedData['share_linkedin_text'] : 'Share this on LinkedIn' );
378
+ return '<span class="after-input"><input type="checkbox" name="buttonizer_general_settings[share_linkedin]" value="1" ' . (( $share_linkedin == '1' ? 'checked="checked"' : '' )) . ' /></span> <input type="text" name="buttonizer_general_settings[share_linkedin_text]" value="' . $share_linkedin_text . '" placeholder="Share this on LinkedIn" />';
379
  }
380
 
381
+ function field_share_twitter()
382
  {
383
  $share_twitter = ( isset( $this->aSavedData['share_twitter'] ) ? $this->aSavedData['share_twitter'] : '' );
384
  $share_twitter_text = ( isset( $this->aSavedData['share_twitter_text'] ) ? $this->aSavedData['share_twitter_text'] : 'Share this on Twitter' );
385
+ return '<span class="after-input"><input type="checkbox" name="buttonizer_general_settings[share_twitter]" value="1" ' . (( $share_twitter == '1' ? 'checked="checked"' : '' )) . ' /></span> <input type="text" name="buttonizer_general_settings[share_twitter_text]" value="' . $share_twitter_text . '" placeholder="Share this on Twitter" />';
386
  }
387
 
388
  }
classes/admin/IconManager.php CHANGED
@@ -24,7 +24,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
24
  class IconManager
25
  {
26
  private $aFontAwesome = array() ;
27
- public function __construct( $aFontAwesome )
28
  {
29
  $this->aFontAwesome = $aFontAwesome;
30
  }
@@ -45,12 +45,12 @@ class IconManager
45
  <div class="placeholder-choose">
46
  or <span class="buttonizer-click-to-pro" style="color: #0073aa; text-decoration: underline; cursor: pointer;">upload image (PRO ONLY)</span>
47
  </div>';
48
- $p .= '<select name="' . $aData['icon_fieldname'] . '" id="' . $fieldName . '" style="font-family: \'FontAwesome\', \'Helvetica\';" class="fa-chooser">';
49
  $p .= '<option value="+">+</option>';
50
  foreach ( $this->aFontAwesome as $key => $row ) {
51
- $p .= '<option value="' . $key . '" ' . (( $aData['icon'] == $key ? 'selected="selected"' : '' )) . '>' . $row . ' ' . $key . '</option>';
52
  }
53
- $p .= '</select>';
54
  $p .= '</div>';
55
  return $p;
56
  }
24
  class IconManager
25
  {
26
  private $aFontAwesome = array() ;
27
+ function __construct( $aFontAwesome )
28
  {
29
  $this->aFontAwesome = $aFontAwesome;
30
  }
45
  <div class="placeholder-choose">
46
  or <span class="buttonizer-click-to-pro" style="color: #0073aa; text-decoration: underline; cursor: pointer;">upload image (PRO ONLY)</span>
47
  </div>';
48
+ $p .= '<select name="' . $aData['icon_fieldname'] . '" id="' . $aData['icon_fieldname'] . '" style="font-family: \'FontAwesome\', \'Helvetica\';" class="fa-chooser">';
49
  $p .= '<option value="+">+</option>';
50
  foreach ( $this->aFontAwesome as $key => $row ) {
51
+ $p .= '<option value="' . $key . '" ' . (( $aData['icon'] == $key ? 'selected="selected"' : '' )) . '>' . $row . " " . $key . '</option>';
52
  }
53
+ $p .= "</select>";
54
  $p .= '</div>';
55
  return $p;
56
  }
classes/admin/InitializeAdmin.php CHANGED
@@ -61,6 +61,15 @@ class InitializeAdmin {
61
  plugins_url('/assets/wp-icon.png', BUTTONIZER_PLUGIN_DIR),
62
  81
63
  );
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
  /* Get media */
@@ -196,7 +205,7 @@ class InitializeAdmin {
196
 
197
  /* Add buttons tab */
198
  function register_buttonizer_buttons() {
199
- $this->aPluginTabs['buttonizer_buttons'] = __('Buttons', 'buttonizer');
200
 
201
  register_setting('buttonizer_buttons', 'buttonizer_buttons');
202
 
@@ -217,7 +226,7 @@ class InitializeAdmin {
217
 
218
  /* Add general settings */
219
  function register_buttonizer_general_settings() {
220
- $this->aPluginTabs['buttonizer_general_settings'] = __('General settings', 'buttonizer');
221
 
222
  register_setting('buttonizer_general_settings', 'buttonizer_general_settings');
223
 
@@ -238,7 +247,7 @@ class InitializeAdmin {
238
 
239
  /* Buttonizer opening times */
240
  private function register_buttonizer_opening_settings() {
241
- $this->aPluginTabs['buttonizer_opening_settings'] = __('Opening hours', 'buttonizer');
242
 
243
  register_setting( 'buttonizer_opening_settings', 'buttonizer_opening_settings');
244
 
@@ -259,7 +268,7 @@ class InitializeAdmin {
259
 
260
  /* Buttonizer Page Categories */
261
  private function register_buttonizer_page_categories() {
262
- $this->aPluginTabs['buttonizer_page_categories'] = __('Page categories', 'buttonizer');
263
 
264
  register_setting( 'buttonizer_page_categories', 'buttonizer_page_categories');
265
 
61
  plugins_url('/assets/wp-icon.png', BUTTONIZER_PLUGIN_DIR),
62
  81
63
  );
64
+
65
+ add_filter( "plugin_action_links_" . plugin_basename(BUTTONIZER_PLUGIN_DIR), function($aLinks) {
66
+ $aButtonizerLinks = array(
67
+ '<a href="' . admin_url( 'admin.php?page=Buttonizer-contact' ) . '">I need support</a><br />',
68
+ '<a href="' . admin_url( 'admin.php?page=Buttonizer' ) . '">Buttonizer Buttons</a>',
69
+ '<a href="' . admin_url( 'admin.php?page=Buttonizer&tab=buttonizer_general_settings' ) . '">General settings</a>'
70
+ );
71
+ return array_merge($aLinks, $aButtonizerLinks);
72
+ });
73
  }
74
 
75
  /* Get media */
205
 
206
  /* Add buttons tab */
207
  function register_buttonizer_buttons() {
208
+ $this->aPluginTabs['buttonizer_buttons'] = __('Buttons', BUTTONIZER_SLUG);
209
 
210
  register_setting('buttonizer_buttons', 'buttonizer_buttons');
211
 
226
 
227
  /* Add general settings */
228
  function register_buttonizer_general_settings() {
229
+ $this->aPluginTabs['buttonizer_general_settings'] = __('General settings', BUTTONIZER_SLUG);
230
 
231
  register_setting('buttonizer_general_settings', 'buttonizer_general_settings');
232
 
247
 
248
  /* Buttonizer opening times */
249
  private function register_buttonizer_opening_settings() {
250
+ $this->aPluginTabs['buttonizer_opening_settings'] = __('Opening hours', BUTTONIZER_SLUG);
251
 
252
  register_setting( 'buttonizer_opening_settings', 'buttonizer_opening_settings');
253
 
268
 
269
  /* Buttonizer Page Categories */
270
  private function register_buttonizer_page_categories() {
271
+ $this->aPluginTabs['buttonizer_page_categories'] = __('Page categories', BUTTONIZER_SLUG);
272
 
273
  register_setting( 'buttonizer_page_categories', 'buttonizer_page_categories');
274
 
classes/admin/PageCategories.php CHANGED
@@ -41,9 +41,9 @@ class PageCategories
41
  private function loadCategories()
42
  {
43
  // Get buttons
44
- $aCategories = ( isset( $this->aSavedData['categorieOrder'] ) && is_array( $this->aSavedData['categorieOrder'] ) ? $this->aSavedData['categorieOrder'] : array(
45
  0 => '-1',
46
- ) );
47
  if ( $aCategories[0] != '-1' ) {
48
  $aCategories[-1] = '-1';
49
  }
41
  private function loadCategories()
42
  {
43
  // Get buttons
44
+ $aCategories = ( isset( $this->aSavedData['categorieOrder'] ) && is_array( $this->aSavedData['categorieOrder'] ) ? $this->aSavedData['categorieOrder'] : [
45
  0 => '-1',
46
+ ] );
47
  if ( $aCategories[0] != '-1' ) {
48
  $aCategories[-1] = '-1';
49
  }
classes/default/main.php CHANGED
@@ -37,6 +37,7 @@ class Button
37
  private $sCurrentPageTitle = '' ;
38
  private $sCurrentPageDescription = '' ;
39
  private $aAnimationSettings = array( 'default', 'circle', 'fade-left-to-right' ) ;
 
40
  // Output string
41
  private $iAmountOfButtons = 0 ;
42
  private $iAmountOfShareButtons = 0 ;
@@ -58,13 +59,12 @@ class Button
58
  $this->output();
59
  } );
60
  add_action( 'wp_print_styles', array( &$this, 'siteLoadStyles' ) );
61
- add_action( 'wp_print_scripts', array( &$this, 'siteLoadScripts' ) );
62
  }
63
 
64
  private function setup()
65
  {
66
  // Timezone
67
- date_default_timezone_set( ( get_option( 'timezone_string' ) != '' ? get_option( 'timezone_string' ) : 'Europe/Amsterdam' ) );
68
  // Get options
69
  $this->aButtons = (array) get_option( 'buttonizer_buttons' );
70
  $this->aPageSettings = (array) get_option( 'buttonizer_page_categories' );
@@ -74,7 +74,7 @@ class Button
74
  $this->sCurrentPageId = get_the_ID();
75
  $this->sCurrentPageUrl = urlencode( get_permalink() );
76
  $this->sCurrentPageTitle = get_the_title();
77
- $this->sCurrentPageDescription = str_replace( ' ', '+', get_the_content( 'Read more' ) );
78
  // Is store opened
79
  $this->bIsOpened = $this->isOpened();
80
  }
@@ -85,15 +85,10 @@ class Button
85
  wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' );
86
  }
87
 
88
- public function siteLoadScripts()
89
- {
90
- wp_enqueue_script( 'buttonizer-js', plugins_url( '/js/buttonizer.js?v=' . md5( BUTTONIZER_VERSION ), BUTTONIZER_PLUGIN_DIR ) );
91
- }
92
-
93
  // Generate
94
  private function generate()
95
  {
96
- $aButtons = ( isset( $this->aButtons['buttonorder'] ) && is_array( $this->aButtons['buttonorder'] ) ? $this->aButtons['buttonorder'] : array() );
97
  foreach ( $aButtons as $sKey => $iId ) {
98
  if ( '-1' == $iId ) {
99
  continue;
@@ -158,10 +153,10 @@ class Button
158
  $linkNewTab = ( isset( $this->aButtons['button_' . $bNmbr . '_url_newtab'] ) ? 'target="_blank"' : '' );
159
  $hideLabel = ( isset( $this->aButtons['button_' . $bNmbr . '_hide_label'] ) ? $this->aButtons['button_' . $bNmbr . '_hide_label'] : '' );
160
 
161
- if ( $link != '#' && $link != '' && strpos( 'javascript:', $link ) !== false ) {
162
  $linkInfo = parse_url( $link );
163
  if ( !$buttonIsPhone && empty($linkInfo['scheme']) && substr( $link, 0, 1 ) != '/' ) {
164
- $link = 'http://' . $link;
165
  }
166
  }
167
 
@@ -189,7 +184,8 @@ class Button
189
  color: ' . $this->aButtons['button_' . $bNmbr . '_colors_icon'] . ';
190
  } ';
191
  }
192
- return '<a href="' . (( $buttonIsPhone ? 'tel:' . $link : $link )) . '" class="' . $sButtonClasses . ' buttonizer_' . $bNmbr . '" ' . $linkNewTab . ' onclick="onButtonizerClickEvent(\'' . $buttonText . '\')">' . (( $buttonText != '' ? '<div class="text"' . (( $hideLabel == '1' ? 'style="display: none;"' : '' )) . '><div>' . $buttonText . '</div></div>' : '' )) . $sButtonIcon . '</a>';
 
193
  }
194
 
195
  // Show on timeout
@@ -225,12 +221,12 @@ class Button
225
  $bTodayOpened = ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] : '' );
226
  // If result == 1 => Opened
227
 
228
- if ( $bTodayOpened != '1' ) {
229
  $bIsOpened = false;
230
  } else {
231
  // Get the time right now
232
- $sCurentHour = date( 'G' );
233
- $sCurrentMinute = date( 'i' );
234
  // Get the opening and closing time from today.
235
  $hourOpening = explode( ':', ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened_from'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened_from'] : '10:00' ) );
236
  $hourClosing = explode( ':', ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_closing_on'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_closing_on'] : '17:00' ) );
@@ -282,23 +278,23 @@ class Button
282
  private function share_btns()
283
  {
284
 
285
- if ( isset( $this->aSettings['share_facebook'] ) && '1' == $this->aSettings['share_facebook'] ) {
286
  $buttonText = ( isset( $this->aSettings['share_facebook_text'] ) && $this->aSettings['share_facebook_text'] != '' ? $this->aSettings['share_facebook_text'] : 'Share this on Facebok' );
287
- $this->sOutput .= '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Facebook share click\'); onButtonizerButtonFacebook();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != '' ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-facebook"></i></a>';
288
  $this->iAmountOfShareButtons++;
289
  }
290
 
291
 
292
- if ( isset( $this->aSettings['share_twitter'] ) && '1' == $this->aSettings['share_twitter'] ) {
293
  $buttonText = ( isset( $this->aSettings['share_twitter_text'] ) && $this->aSettings['share_twitter_text'] != '' ? $this->aSettings['share_twitter_text'] : 'Share this on Twitter' );
294
- $this->sOutput .= '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Twitter share click\'); onButtonizerButtonTwitter();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != '' ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-twitter"></i></a>';
295
  $this->iAmountOfShareButtons++;
296
  }
297
 
298
 
299
- if ( isset( $this->aSettings['share_linkedin'] ) && '1' == $this->aSettings['share_linkedin'] ) {
300
  $buttonText = ( isset( $this->aSettings['share_linkedin_text'] ) && $this->aSettings['share_linkedin_text'] != '' ? $this->aSettings['share_linkedin_text'] : 'Share this on LinkedIn' );
301
- $this->sOutput .= '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Linkedin share click\'); onButtonizerButtonLinkedin();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != '' ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-linkedin"></i></a>';
302
  $this->iAmountOfShareButtons++;
303
  }
304
 
@@ -323,11 +319,11 @@ class Button
323
 
324
 
325
  if ( $this->iAmountOfButtons == 1 && $this->iAmountOfShareButtons == 0 ) {
326
- $output = str_replace( 'is_extra bt_0', 'buttonizer_head onlyone', $this->sOutput );
327
  } else {
328
 
329
  if ( $this->iAmountOfButtons > 1 || $this->iAmountOfShareButtons > 0 ) {
330
- $output = '<a href="javascript:void(0)" class="buttonizer_head" onclick="onButtonizerClickEvent(\'Open/Close Buttonizer button\')">' . $sIcon . '</a>' . $this->sOutput;
331
  } else {
332
  $output = '';
333
  }
@@ -335,8 +331,8 @@ class Button
335
  }
336
 
337
  // Google analytics toevoegen
338
- if ( isset( $this->aSettings['google_analytics'] ) && $this->aSettings['google_analytics'] != '' ) {
339
- $output .= '<script>(function(i,s,o,g,r,a,m){i[\'GoogleAnalyticsObject\']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,\'script\',\'https://www.google-analytics.com/analytics.js\',\'ga\');ga(\'create\', \'' . $this->aSettings['google_analytics'] . '\', \'auto\');</script>';
340
  }
341
 
342
  if ( isset( $this->aSettings['buttons_animation'] ) && in_array( $this->aSettings['buttons_animation'], $this->aAnimationSettings ) ) {
@@ -345,9 +341,18 @@ class Button
345
  $sButtonAnimation = 'default';
346
  }
347
 
348
- list($sShadowColorRed, $sShadowColorGreen, $sShadowColorBlue) = sscanf( $this->aSettings['button_unpushed'], '#%02x%02x%02x' );
 
 
 
 
 
 
 
349
  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>
350
- <div class="buttonizer-button ' . (( $showOnScroll > 0 || $showAfterTimeout > 0 ? 'hide' : '' )) . '" button-animation="' . $sButtonAnimation . '" style=" right: ' . $this->aSettings['position_right'] . '%; bottom: ' . $this->aSettings['position_bottom'] . '%;" id="buttonizer-button"><div class="buttonizer_inner" id="buttonizer-sys">' . $output . '</div></div>
 
 
351
  <script type="text/javascript">
352
  buttonizer.init({
353
  scrollBarTop: ' . $showOnScroll . ',
37
  private $sCurrentPageTitle = '' ;
38
  private $sCurrentPageDescription = '' ;
39
  private $aAnimationSettings = array( 'default', 'circle', 'fade-left-to-right' ) ;
40
+ private $aAttentionAnimationSettings = array( 'none', 'hello', 'bounce' ) ;
41
  // Output string
42
  private $iAmountOfButtons = 0 ;
43
  private $iAmountOfShareButtons = 0 ;
59
  $this->output();
60
  } );
61
  add_action( 'wp_print_styles', array( &$this, 'siteLoadStyles' ) );
 
62
  }
63
 
64
  private function setup()
65
  {
66
  // Timezone
67
+ date_default_timezone_set( ( get_option( 'timezone_string' ) != '' ? get_option( 'timezone_string' ) : "Europe/Amsterdam" ) );
68
  // Get options
69
  $this->aButtons = (array) get_option( 'buttonizer_buttons' );
70
  $this->aPageSettings = (array) get_option( 'buttonizer_page_categories' );
74
  $this->sCurrentPageId = get_the_ID();
75
  $this->sCurrentPageUrl = urlencode( get_permalink() );
76
  $this->sCurrentPageTitle = get_the_title();
77
+ $this->sCurrentPageDescription = str_replace( " ", "+", get_the_content( 'Read more' ) );
78
  // Is store opened
79
  $this->bIsOpened = $this->isOpened();
80
  }
85
  wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' );
86
  }
87
 
 
 
 
 
 
88
  // Generate
89
  private function generate()
90
  {
91
+ $aButtons = ( isset( $this->aButtons['buttonorder'] ) && is_array( $this->aButtons['buttonorder'] ) ? $this->aButtons['buttonorder'] : [] );
92
  foreach ( $aButtons as $sKey => $iId ) {
93
  if ( '-1' == $iId ) {
94
  continue;
153
  $linkNewTab = ( isset( $this->aButtons['button_' . $bNmbr . '_url_newtab'] ) ? 'target="_blank"' : '' );
154
  $hideLabel = ( isset( $this->aButtons['button_' . $bNmbr . '_hide_label'] ) ? $this->aButtons['button_' . $bNmbr . '_hide_label'] : '' );
155
 
156
+ if ( $link != "#" && $link != "" && strpos( 'javascript:', $link ) !== false ) {
157
  $linkInfo = parse_url( $link );
158
  if ( !$buttonIsPhone && empty($linkInfo['scheme']) && substr( $link, 0, 1 ) != '/' ) {
159
+ $link = "http://" . $link;
160
  }
161
  }
162
 
184
  color: ' . $this->aButtons['button_' . $bNmbr . '_colors_icon'] . ';
185
  } ';
186
  }
187
+ return '<a href="' . (( $buttonIsPhone ? 'tel:' . $link : $link )) . '" class="' . $sButtonClasses . ' buttonizer_' . $bNmbr . '" ' . $linkNewTab . ' onclick="onButtonizerClickEvent(\'' . $buttonText . '\')">' . (( $buttonText != "" ? '<div class="text"' . (( $hideLabel == '1' ? 'style="display: none;"' : '' )) . '><div>' . $buttonText . '</div></div>' : '' )) . $sButtonIcon . '</a>';
188
+ // Thanks, end
189
  }
190
 
191
  // Show on timeout
221
  $bTodayOpened = ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened'] : '' );
222
  // If result == 1 => Opened
223
 
224
+ if ( $bTodayOpened != "1" ) {
225
  $bIsOpened = false;
226
  } else {
227
  // Get the time right now
228
+ $sCurentHour = date( "G" );
229
+ $sCurrentMinute = date( "i" );
230
  // Get the opening and closing time from today.
231
  $hourOpening = explode( ':', ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened_from'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_opened_from'] : '10:00' ) );
232
  $hourClosing = explode( ':', ( isset( $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_closing_on'] ) ? $this->aOpeningData['buttonizer_' . $sDayOfWeek . '_closing_on'] : '17:00' ) );
278
  private function share_btns()
279
  {
280
 
281
+ if ( isset( $this->aSettings["share_facebook"] ) && '1' == $this->aSettings["share_facebook"] ) {
282
  $buttonText = ( isset( $this->aSettings['share_facebook_text'] ) && $this->aSettings['share_facebook_text'] != '' ? $this->aSettings['share_facebook_text'] : 'Share this on Facebok' );
283
+ $this->sOutput .= '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Facebook share click\'); onButtonizerButtonFacebook();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != "" ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-facebook"></i></a>';
284
  $this->iAmountOfShareButtons++;
285
  }
286
 
287
 
288
+ if ( isset( $this->aSettings["share_twitter"] ) && '1' == $this->aSettings["share_twitter"] ) {
289
  $buttonText = ( isset( $this->aSettings['share_twitter_text'] ) && $this->aSettings['share_twitter_text'] != '' ? $this->aSettings['share_twitter_text'] : 'Share this on Twitter' );
290
+ $this->sOutput .= '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Twitter share click\'); onButtonizerButtonTwitter();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != "" ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-twitter"></i></a>';
291
  $this->iAmountOfShareButtons++;
292
  }
293
 
294
 
295
+ if ( isset( $this->aSettings["share_linkedin"] ) && '1' == $this->aSettings["share_linkedin"] ) {
296
  $buttonText = ( isset( $this->aSettings['share_linkedin_text'] ) && $this->aSettings['share_linkedin_text'] != '' ? $this->aSettings['share_linkedin_text'] : 'Share this on LinkedIn' );
297
+ $this->sOutput .= '<a href="javascript:void(0)" onclick="onButtonizerClickEvent(\'Linkedin share click\'); onButtonizerButtonLinkedin();" class="is_extra share share_' . ($this->iAmountOfShareButtons + 1) . '">' . (( $buttonText != "" ? '<div class="text"><div>' . $buttonText . '</div></div>' : '' )) . '<i class="fa fa-linkedin"></i></a>';
298
  $this->iAmountOfShareButtons++;
299
  }
300
 
319
 
320
 
321
  if ( $this->iAmountOfButtons == 1 && $this->iAmountOfShareButtons == 0 ) {
322
+ $output = str_replace( "is_extra bt_0", "buttonizer_head onlyone", $this->sOutput );
323
  } else {
324
 
325
  if ( $this->iAmountOfButtons > 1 || $this->iAmountOfShareButtons > 0 ) {
326
+ $output = '<a href="javascript:void(0)" class="buttonizer_head" onclick="onButtonizerClickEvent(\'Open/Close Buttonizer button\')">' . (( !empty($this->aSettings['icon_label']) ? '<div class="text noremove"><div>' . $this->aSettings['icon_label'] . '</div></div>' : '' )) . $sIcon . '</a>' . $this->sOutput;
327
  } else {
328
  $output = '';
329
  }
331
  }
332
 
333
  // Google analytics toevoegen
334
+ if ( isset( $this->aSettings['google_analytics'] ) && $this->aSettings['google_analytics'] != "" ) {
335
+ $output .= "<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create', '" . $this->aSettings['google_analytics'] . "', 'auto');</script>";
336
  }
337
 
338
  if ( isset( $this->aSettings['buttons_animation'] ) && in_array( $this->aSettings['buttons_animation'], $this->aAnimationSettings ) ) {
341
  $sButtonAnimation = 'default';
342
  }
343
 
344
+
345
+ if ( isset( $this->aSettings['attention_animation'] ) && in_array( $this->aSettings['attention_animation'], $this->aAttentionAnimationSettings ) ) {
346
+ $sAttentionAnimation = $this->aSettings['attention_animation'];
347
+ } else {
348
+ $sAttentionAnimation = 'default';
349
+ }
350
+
351
+ list( $sShadowColorRed, $sShadowColorGreen, $sShadowColorBlue ) = sscanf( $this->aSettings['button_unpushed'], "#%02x%02x%02x" );
352
  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>
353
+ <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>' ;
354
+ echo '
355
+ <script type="text/javascript" src="' . plugins_url( '/js/buttonizer.js?v=' . md5( BUTTONIZER_VERSION ), BUTTONIZER_PLUGIN_DIR ) . '"></script>
356
  <script type="text/javascript">
357
  buttonizer.init({
358
  scrollBarTop: ' . $showOnScroll . ',
css/buttonizer.css CHANGED
@@ -74,11 +74,11 @@
74
  }
75
 
76
  .buttonizer-button .buttonizer_inner a.buttonizer_head i {
77
- font-size: 40px;
78
  font-style: normal;
79
- width: 56px;
80
- height: 56px;
81
- line-height: 56px;
82
  display: block;
83
  text-align: center;
84
  }
@@ -199,6 +199,21 @@
199
  height:24px;
200
  }
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  /* Default animation */
203
  .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .bt_0 {
204
  opacity: 1;
@@ -225,6 +240,16 @@
225
  top: -310px;
226
  }
227
 
 
 
 
 
 
 
 
 
 
 
228
  .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .share_1 {
229
  opacity: 1;
230
  left: -105px;
@@ -299,6 +324,49 @@
299
  transition-delay: 600ms;
300
  }
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
 
303
  /* Fade right to left animation */
304
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .is_extra {
@@ -341,6 +409,20 @@
341
  transition-delay: 600ms;
342
  }
343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .share_1,
345
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .share_2,
346
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .share_3 {
@@ -367,3 +449,89 @@
367
  -webkit-transition-delay: 300ms;
368
  transition-delay: 300ms;
369
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
 
76
  .buttonizer-button .buttonizer_inner a.buttonizer_head i {
77
+ font-size: 40px !important;
78
  font-style: normal;
79
+ width: 56px !important;
80
+ height: 56px !important;
81
+ line-height: 56px !important;
82
  display: block;
83
  text-align: center;
84
  }
199
  height:24px;
200
  }
201
 
202
+ .buttonizer-button .buttonizer_inner a.buttonizer_head .text {
203
+ visibility: visible;
204
+ opacity: 1;
205
+ transition: all 250ms ease-out;
206
+ -moz-transition: all 250ms ease-out;
207
+ -webkit-transition: all 250ms ease-out;
208
+ -o-transition: all 250ms ease-out;
209
+ }
210
+
211
+ .buttonizer-button .buttonizer_inner.opened a.buttonizer_head .text {
212
+ visibility: hidden;
213
+ opacity: 0;
214
+ margin-top: -20px;
215
+ }
216
+
217
  /* Default animation */
218
  .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .bt_0 {
219
  opacity: 1;
240
  top: -310px;
241
  }
242
 
243
+ .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .bt_5 {
244
+ opacity: 1;
245
+ top: -360px;
246
+ }
247
+
248
+ .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .bt_6 {
249
+ opacity: 1;
250
+ top: -410px;
251
+ }
252
+
253
  .buttonizer-button[button-animation="default"] .buttonizer_inner.opened .share_1 {
254
  opacity: 1;
255
  left: -105px;
324
  transition-delay: 600ms;
325
  }
326
 
327
+ .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_1 {
328
+ opacity: 1;
329
+ left: -125px;
330
+ top: -53px;
331
+ }
332
+
333
+ .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_2 {
334
+ opacity: 1;
335
+ left: -95px;
336
+ top: -104px;
337
+ -moz-transition-delay: 150ms;
338
+ -webkit-transition-delay: 150ms;
339
+ transition-delay: 150ms;
340
+ }
341
+
342
+ .buttonizer-button[button-animation="circle"] .buttonizer_inner.opened .share_3 {
343
+ opacity: 1;
344
+ left: -48px;
345
+ top: -137px;
346
+ -moz-transition-delay: 300ms;
347
+ -webkit-transition-delay: 300ms;
348
+ transition-delay: 300ms;
349
+ }
350
+
351
+ .buttonizer-button.show_labels_on_hover a > .text {
352
+ opacity: 0;
353
+ visibility: hidden;
354
+ }
355
+
356
+ .buttonizer-button.show_labels_on_hover a:hover > .text {
357
+ opacity: 1;
358
+ visibility: visible;
359
+ }
360
+
361
+ .buttonizer-button[attention-trigger="true"][attention-animation="hello"] .buttonizer_head {
362
+ -webkit-animation: buttonizer-hello 2s linear;
363
+ animation: buttonizer-hello 2s linear;
364
+ }
365
+
366
+ .buttonizer-button[attention-trigger="true"][attention-animation='bounce'] .buttonizer_head {
367
+ -webkit-animation: buttonizer-bounce 1.4s linear;
368
+ animation: buttonizer-bounce 1.4s linear;
369
+ }
370
 
371
  /* Fade right to left animation */
372
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .is_extra {
409
  transition-delay: 600ms;
410
  }
411
 
412
+ .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner .bt_5 {
413
+ top: -360px;
414
+ -moz-transition-delay: 750ms;
415
+ -webkit-transition-delay: 750ms;
416
+ transition-delay: 750ms;
417
+ }
418
+
419
+ .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner .bt_6 {
420
+ top: -410px;
421
+ -moz-transition-delay: 900ms;
422
+ -webkit-transition-delay: 900ms;
423
+ transition-delay: 900ms;
424
+ }
425
+
426
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .share_1,
427
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .share_2,
428
  .buttonizer-button[button-animation="fade-left-to-right"] .buttonizer_inner:not(.opened) .share_3 {
449
  -webkit-transition-delay: 300ms;
450
  transition-delay: 300ms;
451
  }
452
+
453
+ /* Animation */
454
+ @-webkit-keyframes buttonizer-hello {
455
+ 0% {
456
+ -webkit-transform: scale(1);
457
+ transform: scale(1)
458
+ }
459
+ 10%,
460
+ 20% {
461
+ -webkit-transform: scale(.9) rotate(-8deg);
462
+ transform: scale(.9) rotate(-8deg)
463
+ }
464
+ 30%,
465
+ 50%,
466
+ 70% {
467
+ -webkit-transform: scale(1.3) rotate(8deg);
468
+ transform: scale(1.3) rotate(8deg)
469
+ }
470
+ 40%,
471
+ 60% {
472
+ -webkit-transform: scale(1.3) rotate(-8deg);
473
+ transform: scale(1.3) rotate(-8deg)
474
+ }
475
+ 100%,
476
+ 80% {
477
+ -webkit-transform: scale(1) rotate(0);
478
+ transform: scale(1) rotate(0)
479
+ }
480
+ }
481
+ @keyframes buttonizer-hello {
482
+ 0% {
483
+ -webkit-transform: scale(1);
484
+ -ms-transform: scale(1);
485
+ transform: scale(1)
486
+ }
487
+ 10%,
488
+ 20% {
489
+ -webkit-transform: scale(.9) rotate(-8deg);
490
+ -ms-transform: scale(.9) rotate(-8deg);
491
+ transform: scale(.9) rotate(-8deg)
492
+ }
493
+ 30%,
494
+ 50%,
495
+ 70% {
496
+ -webkit-transform: scale(1.3) rotate(8deg);
497
+ -ms-transform: scale(1.3) rotate(8deg);
498
+ transform: scale(1.3) rotate(8deg)
499
+ }
500
+ 40%,
501
+ 60% {
502
+ -webkit-transform: scale(1.3) rotate(-8deg);
503
+ -ms-transform: scale(1.3) rotate(-8deg);
504
+ transform: scale(1.3) rotate(-8deg)
505
+ }
506
+ 100%,
507
+ 80% {
508
+ -webkit-transform: scale(1) rotate(0);
509
+ -ms-transform: scale(1) rotate(0);
510
+ transform: scale(1) rotate(0)
511
+ }
512
+ }
513
+
514
+ @-webkit-keyframes buttonizer-bounce {
515
+ 0%, 10%, 100%, 20%, 50%, 80% {
516
+ -webkit-transform: translateY(0);
517
+ transform: translateY(0)
518
+ }
519
+ 40%,
520
+ 60% {
521
+ -webkit-transform: translateY(-15px);
522
+ transform: translateY(-15px)
523
+ }
524
+ }
525
+ @keyframes buttonizer-bounce {
526
+ 0%, 10%, 100%, 20%, 50%, 80% {
527
+ -webkit-transform: translateY(0);
528
+ -ms-transform: translateY(0);
529
+ transform: translateY(0)
530
+ }
531
+ 40%,
532
+ 60% {
533
+ -webkit-transform: translateY(-15px);
534
+ -ms-transform: translateY(-15px);
535
+ transform: translateY(-15px)
536
+ }
537
+ }
css/style.css CHANGED
@@ -405,6 +405,14 @@ h2 .button {
405
  box-shadow: none !important;
406
  }
407
 
 
 
 
 
 
 
 
 
408
  .vertical-tabs .tabs a.first {
409
  border-top: 1px solid #cccccc;
410
  }
@@ -420,6 +428,7 @@ h2 .button {
420
  .vertical-tabs .tab-container {
421
  display: block;
422
  border: 1px solid #cccccc;
 
423
  margin-left: -1px;
424
  min-height: 200px;
425
  padding: 0 20px 20px 40px;
@@ -427,10 +436,80 @@ h2 .button {
427
  border-bottom: 0;
428
  }
429
 
 
 
 
 
 
430
  .form-table td {
431
  vertical-align: middle !important;
432
  }
433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
  /* Categories */
435
  .categories-load-more {
436
  display: block;
@@ -603,6 +682,7 @@ h2 .button {
603
  color: #FFFFFF;
604
  font-weight: 500;
605
  font-size: 13px;
 
606
  padding: 4px 20px;
607
  display: inline-block;
608
  border-radius: 4px;
405
  box-shadow: none !important;
406
  }
407
 
408
+ .vertical-tabs .tabs a.nav-tab-active {
409
+ background-color: #fff !important;
410
+ }
411
+
412
+ .vertical-tabs .tabs a:hover {
413
+ background-color: #f3f3f3;
414
+ }
415
+
416
  .vertical-tabs .tabs a.first {
417
  border-top: 1px solid #cccccc;
418
  }
428
  .vertical-tabs .tab-container {
429
  display: block;
430
  border: 1px solid #cccccc;
431
+ background: #ffffff;
432
  margin-left: -1px;
433
  min-height: 200px;
434
  padding: 0 20px 20px 40px;
436
  border-bottom: 0;
437
  }
438
 
439
+ .vertical-tabs input[type=text] {
440
+ padding: 6px 12px;
441
+ margin-right: 5px;
442
+ }
443
+
444
  .form-table td {
445
  vertical-align: middle !important;
446
  }
447
 
448
+ .form-table .r-sit {
449
+ position: relative;
450
+ padding-top: 15px;
451
+ }
452
+
453
+ .form-table .r-sit .after-input {
454
+ position: absolute;
455
+ right: 11px;
456
+ top: 20px;
457
+ height: 35px;
458
+ line-height: 35px;
459
+ }
460
+
461
+ .form-table .r-sit small.after-input {
462
+ top: 17px;
463
+ }
464
+
465
+ .form-table fieldset {
466
+ border: 1px solid #d7d7d7;
467
+ background-color: #f7f7f7;
468
+ padding-right: 10px;
469
+ padding-left: 10px;
470
+ margin-top: 15px;
471
+ }
472
+
473
+ .form-table fieldset legend {
474
+ padding: 5px 15px;
475
+ font-size: 12px;
476
+ margin-left: 8px;
477
+ border: 1px solid #dfdfdf;
478
+ background: #FFFfff;
479
+ font-weight: 500;
480
+ text-transform: uppercase;
481
+ }
482
+
483
+ .form-table fieldset .form-table {
484
+ margin-top: 0;
485
+ }
486
+
487
+ .form-table fieldset .form-table tr:first [scope="row"] {
488
+ padding-top: 20px;
489
+ }
490
+
491
+ .form-table fieldset .form-table tr:first .r-sit {
492
+ padding-top: 3px !important;
493
+ }
494
+
495
+ .form-table input[type=text],
496
+ .form-table select {
497
+ width: 100%;
498
+ height: auto;
499
+ padding: 8px 10px;
500
+ margin-bottom: 5px;
501
+ }
502
+
503
+ .form-table th {
504
+ padding: 27px 10px 20px 0;
505
+ }
506
+
507
+ .form-table .button-preview {
508
+ position: absolute;
509
+ top: 36px;
510
+ left: 200px;
511
+ }
512
+
513
  /* Categories */
514
  .categories-load-more {
515
  display: block;
682
  color: #FFFFFF;
683
  font-weight: 500;
684
  font-size: 13px;
685
+ line-height: 17px;
686
  padding: 4px 20px;
687
  display: inline-block;
688
  border-radius: 4px;
js/buttonizer.js CHANGED
@@ -10,6 +10,7 @@ var buttonizer = {
10
  currentPageUrl: '',
11
  currentPageTitle: '',
12
  showedExitIntent: false,
 
13
  },
14
  init: function(options) {
15
  options = jQuery.extend({
@@ -46,13 +47,28 @@ var buttonizer = {
46
  buttonizer.settings.buttonizerOpened = false;
47
 
48
  if(document.querySelector("#buttonizer-sys .buttonizer_head .text") != null) {
49
- document.querySelector("#buttonizer-sys .buttonizer_head .text").remove();
 
 
50
  }
51
  }else{
52
  document.getElementById("buttonizer-sys").className = 'buttonizer_inner opened';
53
  buttonizer.settings.buttonizerOpened = true;
54
  }
55
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
 
58
 
10
  currentPageUrl: '',
11
  currentPageTitle: '',
12
  showedExitIntent: false,
13
+ animated: false,
14
  },
15
  init: function(options) {
16
  options = jQuery.extend({
47
  buttonizer.settings.buttonizerOpened = false;
48
 
49
  if(document.querySelector("#buttonizer-sys .buttonizer_head .text") != null) {
50
+ if(document.querySelector("#buttonizer-sys .buttonizer_head .text").hasClass('noremove')) {
51
+ document.querySelector("#buttonizer-sys .buttonizer_head .text").remove();
52
+ }
53
  }
54
  }else{
55
  document.getElementById("buttonizer-sys").className = 'buttonizer_inner opened';
56
  buttonizer.settings.buttonizerOpened = true;
57
  }
58
  });
59
+
60
+ // Attenton animation
61
+ if(document.getElementById("buttonizer-button").getAttribute('attention-animation') != 'none') {
62
+ setInterval(function() {
63
+ if(!buttonizer.settings.buttonizerOpened) {
64
+ document.getElementById("buttonizer-button").setAttribute("attention-trigger", "true");
65
+
66
+ setTimeout(function() {
67
+ document.getElementById("buttonizer-button").setAttribute("attention-trigger", "false");
68
+ }, 2000);
69
+ }
70
+ }, 10000);
71
+ }
72
  }
73
 
74
 
js/dashboard.js CHANGED
@@ -265,6 +265,7 @@ var buttonizer = {
265
  colorPalet.find(".color.default").css({ 'background-color': currentColors.default});
266
  colorPalet.find(".color.pushed").css({ 'background-color': currentColors.pushed});
267
  colorPalet.find(".color.icon").css({ 'background-color': currentColors.icon});
 
268
 
269
  colorPalet.find("input.custom").val(customColors ? '1' : '0').change();
270
  colorPalet.find("input.default").val(currentColors.default);
265
  colorPalet.find(".color.default").css({ 'background-color': currentColors.default});
266
  colorPalet.find(".color.pushed").css({ 'background-color': currentColors.pushed});
267
  colorPalet.find(".color.icon").css({ 'background-color': currentColors.icon});
268
+ colorPalet.find(".text").html(customColors ? 'Custom colors' : 'Default colors');
269
 
270
  colorPalet.find("input.custom").val(customColors ? '1' : '0').change();
271
  colorPalet.find("input.default").val(currentColors.default);
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.8.1
7
- Stable tag: 1.0.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -116,6 +116,19 @@ And the beauty of all: All actions are hidden in one button. The moment a visito
116
  In fact the Buttonizer is an addiction to use. You&#39;re website visitors will interact as never before.
117
 
118
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
  = 1.0.7 =
121
  Javascript fix when an error occurs for incorrect color
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.8.1
7
+ Stable tag: 1.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
116
  In fact the Buttonizer is an addiction to use. You&#39;re website visitors will interact as never before.
117
 
118
  == Changelog ==
119
+ = 1.0.8 =
120
+ There are multiple changes inside Buttonizer. Like the settings page is better organised now and re-styled.
121
+
122
+ Added to Buttonizer:
123
+ - We are introducing 'Attention animations': There 2 animations to let the button jumping out of the background
124
+ - It is now possible to give the main button a label
125
+ - You can enable the option 'Show label on hover'
126
+
127
+ Fixed:
128
+ - Social sharing fix for the circle button menu
129
+ - Some php notices warnings people 'noticed'
130
+ - Style fix
131
+ - Some bugs
132
 
133
  = 1.0.7 =
134
  Javascript fix when an error occurs for incorrect color