PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.4.3
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.4.3
3.6.0 3.5.0 trunk 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 All 110 releases
buttonizer-multifunctional-button / classes / Admin / Buttons.php

Buttons.php in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 1.4.3, at classes/Admin/Buttons.php

507 lines 23.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 Copyright 2017 Buttonizer
19 */
20 namespace Buttonizer\Admin;
21
22 # No script kiddies
23 defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
24 class Buttons
25 {
26 private $aSavedData = array() ;
27 private $aPageCategories = array() ;
28 private $aFontAwesome = array() ;
29 private $oIconManager = array() ;
30 private $aSystemSettings = array() ;
31 public function __construct( $aFontAwesome, $oIconManager )
32 {
33 $this->aFontAwesome = $aFontAwesome;
34 $this->oIconManager = $oIconManager;
35 $this->loadData();
36 $this->loadButtons();
37 }
38
39 private function loadData()
40 {
41 $this->aSavedData = (array) get_option( 'buttonizer_buttons' );
42 $this->aPageCategories = (array) get_option( 'buttonizer_page_categories' );
43 $this->aSystemSettings = (array) get_option( 'buttonizer_general_settings' );
44 }
45
46 private function loadButtons()
47 {
48 // Get buttons
49 $aButtons = ( isset( $this->aSavedData['buttonorder'] ) && is_array( $this->aSavedData['buttonorder'] ) ? $this->aSavedData['buttonorder'] : [
50 0 => -1,
51 ] );
52 if ( $aButtons[0] != '-1' ) {
53 $aButtons[-1] = '-1';
54 }
55 echo '<ul id="button-rows">' ;
56 $iButtonCount = 0;
57 foreach ( $aButtons as $sButtonKey => $iButtonId ) {
58 $this->loadIndividialButtonRow( $sButtonKey, $iButtonId, ( isset( $bDisabled ) ? true : false ) );
59 $iButtonCount++;
60 }
61 echo '</ul>' ;
62 echo '<img src="' . plugins_url( '/assets/no-buttons.jpg', BUTTONIZER_PLUGIN_DIR ) . '" style="' . (( 0 == $iButtonCount - 1 ? 'display: block;' : 'display: none;' )) . '" class="buttonizer-no-buttons" />' ;
63 }
64
65 private function loadIndividialButtonRow( $sButtonKey, $iButtonId, $bDisabled )
66 {
67 $sButtonTitle = ( isset( $this->aSavedData['button_' . $iButtonId . '_title'] ) ? $this->aSavedData['button_' . $iButtonId . '_title'] : 'Button ' . ($iButtonId + 1) );
68 $onMobile = ( isset( $this->aSavedData['button_' . $iButtonId . '_show_on_phone'] ) ? $this->aSavedData['button_' . $iButtonId . '_show_on_phone'] : '' );
69 $onDesktop = ( isset( $this->aSavedData['button_' . $iButtonId . '_show_on_desktop'] ) ? $this->aSavedData['button_' . $iButtonId . '_show_on_desktop'] : '' );
70 ?>
71 <li>
72 <div class="button-row" id="btn_row_<?php
73 echo $iButtonId ;
74 ?>" button-id="<?php
75 echo $iButtonId ;
76 ?>" data-button-action="<?php
77 echo ( isset( $this->aSavedData['button_' . $iButtonId . '_type'] ) ? $this->aSavedData['button_' . $iButtonId . '_type'] : 'url' ) ;
78 ?>" <?php
79 if ( $iButtonId == -1 ) {
80 echo ' style="display: none"' ;
81 }
82 ?>>
83 <input type="checkbox" name="buttonizer_buttons[buttonorder][]" value="<?php
84 echo $iButtonId ;
85 ?>" checked="checked" style="display: none;" />
86
87 <div class="row-info drag-handle">
88 <div class="mover"></div>
89 <span><i class="fa <?php
90 echo $this->buttonOutputIcon( $iButtonId ) ;
91 ?> button-icon"></i> <span class="row-title"><?php
92 echo ( $iButtonId == -1 ? 'New button' : $sButtonTitle ) ;
93 ?></span> <i class="fa fa-pencil pencil-edit" ></i></span>
94
95 <a href="javascript:buttonizer.removeRow(<?php
96 echo $iButtonId ;
97 ?>)" class="delete-button">Delete <i class="fa fa-trash-o"></i></a>
98
99 <a href="javascript:buttonizer.toggleMobile(<?php
100 echo $iButtonId ;
101 ?>)" class="mobiledesktop mobile-button <?php
102 echo ( $onMobile == "" ? 'selected' : '' ) ;
103 ?>"><i class="fa fa-mobile"></i></a>
104 <a href="javascript:buttonizer.toggleDesktop(<?php
105 echo $iButtonId ;
106 ?>)" class="mobiledesktop desktop-button <?php
107 echo ( $onDesktop == "" ? 'selected' : '' ) ;
108 ?>"><i class="fa fa-desktop"></i></a>
109
110 <a href="javascript:void(0)" class="is-live-button" style="<?php
111 echo ( $onMobile != "" || $onDesktop != "" ? '' : 'display: none;' ) ;
112 ?>"><i class="fa fa-circle"></i> Live</a>
113
114 <button type="submit" class="must-save-button savebutton " style="display: none;"><i class="fa fa-floppy-o"></i> Save changes</button>
115 </div>
116
117 <div class="button-data">
118 <table>
119 <tr style="display: none;">
120 <td></td>
121 <td></td>
122 </tr>
123 <tr>
124 <td width="50%">
125 <label for="button_text" class="label-top">
126 <span class="info-class"><i class="fa fa-info-circle"></i> <span>This is for internal use only.<br /><br />When using Google Analytics, this will be the title of the event when clicking this button.</span></span>
127 Button name:
128 </label>
129 <input type="text" name="buttonizer_buttons[button_<?php
130 echo $iButtonId ;
131 ?>_title]" value="<?php
132 echo $sButtonTitle ;
133 ?>" class="button_title" />
134 </td>
135 <td class="button-pdr">
136 <label for="button_icon" class="label-top">
137 <span class="info-class"><i class="fa fa-info-circle"></i> <span>This will be the icon of the button. You can choose from the build-in Font Awesome icons.<br /><br />When you want to use your own icon or image, you can click the 'or upload an image' link to use your own icon.</span></span>
138 Button icon/image:
139 </label>
140 <?php
141 echo $this->buttonGetIcon( $iButtonId ) ;
142 ?>
143 </td>
144 </tr>
145
146 <tr>
147 <td>&nbsp;</td>
148 <td></td>
149 </tr>
150
151 <tr>
152 <td>
153 <label for="button_text" class="label-top">
154 <span class="info-class"><i class="fa fa-info-circle"></i> <span>This is the label what the guest on your website will see. Something like 'Contact me!', or 'Like us on Facebook' <br/><span style="color: red;">Don't make it too long!!</span></span></span>
155 Button label:
156 </label>
157 <?php
158 echo $this->buttonGetText( $iButtonId ) ;
159 ?>
160 </td>
161 <td>
162 <label for="button_category" class="label-top">
163 <span class="info-class"><i class="fa fa-info-circle"></i> <span>Select a page category. You can add more page rules at the 'Page categories' tab.</span></span>
164 Button page category:
165 </label>
166 <?php
167 echo $this->buttonGetShowOnPages( $iButtonId ) ;
168 ?>
169 </td>
170 </tr>
171
172 <tr>
173 <td>&nbsp;</td>
174 <td></td>
175 </tr>
176
177 <tr class="settings-row button-action">
178 <td colspan="2">
179 <i class="fa fa-globe setting-icon"></i> Button action
180 <span class="info-class"><i class="fa fa-info-circle"></i> <span>This is the click-action of your button. When you choose for a phone number, it will be a direct click-to-call action.</span></span>
181
182 <table width="100%" class="settings-row-type">
183 <tr>
184 <td width="200"><?php
185 echo $this->buttonGetType( $iButtonId ) ;
186 ?></td>
187 <td>
188 <?php
189 echo $this->buttonGetUrl( $iButtonId ) ;
190 ?>
191
192 <div class="input_error" style="display: none;"></div>
193
194 <div class="extra_info" data-button-type="phone">
195
196 </div>
197 </td>
198 </tr>
199 </table>
200 </td>
201 </tr>
202
203 <tr class="settings-row setting-new-tab">
204 <td>
205 <i class="fa fa-external-link setting-icon"></i> Open in new tab
206 </td>
207 <td><?php
208 echo $this->buttonGetNewTab( $iButtonId ) ;
209 ?><label for="button_<?php
210 echo $iButtonId ;
211 ?>_url_newtab"> Yes</label></td>
212 </tr>
213
214 <tr class="settings-row">
215 <td>
216 <i class="fa fa-paint-brush setting-icon"></i> Button colors
217 <span class="info-class"><i class="fa fa-info-circle"></i> <span>You can change the colors of this button, like the default background, the background on hover or the icon color. You can undo them too. Click the palet for changing the colors.</span></span>
218 </td>
219 <td><?php
220 echo $this->buttonColors( $iButtonId ) ;
221 ?></td>
222 </tr>
223
224 <tr>
225 <td>&nbsp;</td>
226 <td></td>
227 </tr>
228
229 <tr class="settings-row show-mobile-btn">
230 <td>
231 <i class="fa fa-mobile setting-icon"></i> Show on mobile
232 </td>
233 <td><?php
234 echo $this->buttonGetShowPhone( $iButtonId ) ;
235 ?><label for="button_<?php
236 echo $iButtonId ;
237 ?>_show_on_phone"> Yes</label></td>
238 </tr>
239
240 <tr class="settings-row show-desktop-btn">
241 <td>
242 <i class="fa fa-desktop setting-icon"></i> Show on desktop
243 </td>
244 <td><?php
245 echo $this->buttonGetShowDesktop( $iButtonId ) ;
246 ?><label for="button_<?php
247 echo $iButtonId ;
248 ?>_show_on_desktop"> Yes</label></td>
249 </tr>
250
251 <tr class="settings-row">
252 <td>
253 <i class="fa fa-tag setting-icon"></i> Show label on hover
254
255 <span class="info-class">
256 <i class="fa fa-info-circle"></i>
257 <span>
258 When you hover over the button, the label will be hided until the user hovers the icon.
259 </span>
260 </span>
261 </td>
262 <!-- drop down here -->
263 <td><?php
264 echo $this->buttonShowOnHover( $iButtonId ) ;
265 ?></td>
266 <!-- <td>-->
267 <!-- -->
268 <!-- </td>-->
269 </tr>
270
271 <tr>
272 <td>&nbsp;</td>
273
274 <td></td>
275 </tr>
276
277 <?php
278 ?>
279 <tr class="settings-row">
280 <td>
281 <i class="fa fa-clock-o setting-icon"></i> Show <b>only</b> on opening hours
282 </td>
283 <td><input type="checkbox" class="buttonizer-click-to-pro" readonly=""> <label> Yes</label> <span class="buttonizer-pro-feature">PRO</span></td> <td></td>
284 </tr>
285
286 <tr class="settings-row">
287 <td>
288 <i class="fa fa-times-circle-o setting-icon"></i> Show <b>only outside</b> opening hours
289 </td>
290 <td><input type="checkbox" class="buttonizer-click-to-pro" readonly=""> <label> Yes</label> <span class="buttonizer-pro-feature">PRO</span></td>
291 </tr>
292 <?php
293 ?>
294
295 <tr>
296 <td>&nbsp;</td>
297 <td></td>
298 </tr>
299
300 <tr class="settings-row">
301 <td>
302 <i class="fa fa-css3 setting-icon"></i> Custom CSS class <?php
303 echo $this->showPro() ;
304 ?>
305 </td>
306 <td><?php
307 echo $this->buttonCustomClass( $iButtonId ) ;
308 ?></td>
309 </tr>
310 </table>
311 </div>
312 </div>
313 </li>
314 <?php
315 }
316
317 /*
318 * Form functions
319 */
320 // Get the text of the button
321 function buttonGetText( $iButtonId = 0 )
322 {
323 $fieldName = 'button_' . $iButtonId . '_text';
324 $fieldValue = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : 'New button' );
325 return '<input type="text" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="' . $fieldValue . '" class="button_textfield" placeholder="Button text" />';
326 }
327
328 // Get button icon
329 function buttonGetIcon( $iButtonId = 0 )
330 {
331 return $this->oIconManager->generator( [
332 'icon' => ( isset( $this->aSavedData['button_' . $iButtonId . '_icon'] ) ? $this->aSavedData['button_' . $iButtonId . '_icon'] : '' ),
333 'icon_fieldname' => 'buttonizer_buttons[button_' . $iButtonId . '_icon]',
334 'image' => ( isset( $this->aSavedData['button_' . $iButtonId . '_image'] ) ? $this->aSavedData['button_' . $iButtonId . '_image'] : '' ),
335 'image_fieldname' => 'buttonizer_buttons[button_' . $iButtonId . '_image]',
336 'choose_type' => true,
337 ] );
338 }
339
340 // Get button icon
341 function buttonOutputIcon( $iButtonId = 0 )
342 {
343 $fieldName = 'button_' . $iButtonId . '_icon';
344 return ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : 'fa-info' );
345 }
346
347 // Only show this button on phone?
348 function buttonGetShowPhone( $iButtonId = 0 )
349 {
350 $fieldName = 'button_' . $iButtonId . '_show_on_phone';
351 $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' );
352 return '<input type="checkbox" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="1" class="button_showonphone" ' . (( $is_selected == '1' ? 'checked="checked"' : '' )) . ' />';
353 }
354
355 // buttonGetShowOnPages
356 function buttonGetShowOnPages( $iButtonId = 0 )
357 {
358 $fieldName = 'button_' . $iButtonId . '_show_on_pages';
359 $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' );
360 $pageOrders = ( isset( $this->aPageCategories ) ? $this->aPageCategories : [] );
361 /*
362 * Generate <select>
363 */
364 $html = '<select name="buttonizer_buttons[' . $fieldName . ']" id="button_category"><option value="-5">Show on every page</option><option value="-4">Hide everywhere</option>';
365 foreach ( $pageOrders as $id => $data ) {
366 if ( $pageKey == -1 ) {
367 continue;
368 }
369 $html .= '<option value="' . $id . '"' . (( $id == $is_selected ? 'selected="selected"' : '' )) . '>' . $data['title'] . '</option>';
370 }
371 return $html . '</select>';
372 }
373
374 // Only show this button on desktop?
375 function buttonGetShowDesktop( $iButtonId = 0 )
376 {
377 $fieldName = 'button_' . $iButtonId . '_show_on_desktop';
378 $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' );
379 return '<input type="checkbox" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="1" class="button_showondesktop" ' . (( $is_selected == '1' ? 'checked="checked"' : '' )) . ' />';
380 }
381
382 // Only show when company is open?
383 function buttonGetShowWenOpen( $iButtonId = 0 )
384 {
385 $fieldName = 'button_' . $iButtonId . '_show_when_opened';
386 $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' );
387 return '<input type="checkbox" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="1" class="button_showwhenopened" ' . (( $is_selected == '1' ? 'checked="checked"' : '' )) . ' />';
388 }
389
390 // Only show when company is open?
391 function buttonGetShowNotWenOpen( $iButtonId = 0 )
392 {
393 $fieldName = 'button_' . $iButtonId . '_show_not_when_opened';
394 $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' );
395 return '<input type="checkbox" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="1" class="button_showwhenopened" ' . (( $is_selected == '1' ? 'checked="checked"' : '' )) . ' />';
396 }
397
398 function buttonShowOnHover( $iButtonId = 0 )
399 {
400 $fieldName = 'button_' . $iButtonId . '_show_label_on_hover';
401 $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' );
402 // return '<input type="checkbox" name="buttonizer_buttons['. $fieldName .']" id="'. $fieldName .'" value="1" class="button_showlabelonhover" '. ($is_selected == '1' ? 'checked="checked"' : '') .' />';
403 return '
404 <select name="buttonizer_buttons[' . $fieldName . ']" style="width: 100%; padding: 0 10px; height: 40px;">
405 <option value="default" ' . (( $is_selected == 'default' ? 'selected' : '' )) . '>Always show label</option>
406 <option value="showOnHover" ' . (( $is_selected == 'showOnHover' ? 'selected' : '' )) . '>Show on hover</option>
407 <option value="showOnHoverDesktop" ' . (( $is_selected == 'showOnHoverDesktop' ? 'selected' : '' )) . '>Show on hover (Desktop only)</option>
408 <option value="showOnHoverMobile" ' . (( $is_selected == 'showOnHoverMobile' ? 'selected' : '' )) . '>Show on hover (Mobile only)</option>
409 </select>
410 ';
411 }
412
413 function buttonGetType( $iButtonId = 0 )
414 {
415 $aTypes = [
416 'url' => 'Website URL',
417 'phone' => 'Phone number',
418 'mail' => 'E-mail',
419 'backtotop' => 'Back to top',
420 'gobackpage' => 'Go back one page',
421 ];
422 $aTypes = array_merge( $aTypes, [
423 'disabled_whatsapp' => 'Open whatsapp (phone number) - PRO ONLY',
424 'disabled_javascript' => 'Javascript function - PRO ONLY',
425 ] );
426 $fieldName = 'button_' . $iButtonId . '_action';
427 $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : 'url' );
428 $html = '<select name="buttonizer_buttons[' . $fieldName . ']" id="button_type" class="button_action">';
429 foreach ( $aTypes as $sType => $sTitle ) {
430 $html .= '<option value="' . str_replace( 'disabled_', '', $sType ) . '"' . (( $sType == $is_selected ? 'selected="selected"' : '' )) . ' ' . (( strpos( $sType, 'disabled_' ) !== false > 0 ? 'disabled' : '' )) . '>' . $sTitle . '</option>';
431 }
432 return $html . '</select>';
433 }
434
435 function buttonGetUrl( $iButtonId = 0 )
436 {
437 $fieldName = 'button_' . $iButtonId . '_url';
438 $fieldValue = str_replace( '"', '\'', ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ) );
439 return '<input type="text" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="' . $fieldValue . '" class="button_input" placeholder="" />';
440 }
441
442 /**
443 * New tab
444 *
445 * @param int $iButtonId
446 * @return string
447 */
448 function buttonGetNewTab( $iButtonId = 0 )
449 {
450 $fieldName = 'button_' . $iButtonId . '_url_newtab';
451 $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' );
452 return '<input type="checkbox" name="buttonizer_buttons[' . $fieldName . ']" id="' . $fieldName . '" value="1" class="button_isnewtab" ' . (( $is_selected == '1' ? 'checked="checked"' : '' )) . ' />';
453 }
454
455 /**
456 * Button colors
457 *
458 * @param int $iButtonId
459 * @return string
460 */
461 function buttonColors( $iButtonId = 0 )
462 {
463 // Default button colors
464 $sDefaultColor1 = ( isset( $this->aSystemSettings['button_unpushed'] ) ? $this->aSystemSettings['button_unpushed'] : '#48A4DC' );
465 $sDefaultColor2 = ( isset( $this->aSystemSettings['button_pushed'] ) ? $this->aSystemSettings['button_pushed'] : '#1D9BDB' );
466 $sDefaultColor3 = ( isset( $this->aSystemSettings['icon_color'] ) ? $this->aSystemSettings['icon_color'] : '#fffff' );
467 // Using custom colors?
468 $bCustomColors = ( isset( $this->aSavedData['button_' . $iButtonId . '_using_custom_colors'] ) && $this->aSavedData['button_' . $iButtonId . '_using_custom_colors'] == '1' ? true : false );
469 // Get button colors
470 $sColor1 = ( $bCustomColors && isset( $this->aSavedData['button_' . $iButtonId . '_colors_button'] ) && !empty($this->aSavedData['button_' . $iButtonId . '_colors_button']) ? $this->aSavedData['button_' . $iButtonId . '_colors_button'] : $sDefaultColor1 );
471 $sColor2 = ( $bCustomColors && isset( $this->aSavedData['button_' . $iButtonId . '_colors_pushed'] ) && !empty($this->aSavedData['button_' . $iButtonId . '_colors_pushed']) ? $this->aSavedData['button_' . $iButtonId . '_colors_pushed'] : $sDefaultColor2 );
472 $sColor3 = ( $bCustomColors && isset( $this->aSavedData['button_' . $iButtonId . '_colors_icon'] ) && !empty($this->aSavedData['button_' . $iButtonId . '_colors_icon']) ? $this->aSavedData['button_' . $iButtonId . '_colors_icon'] : $sDefaultColor3 );
473 $sColorPalet = '<div class="button-color-palet" data-btnid="' . $iButtonId . '">';
474 $sColorPalet .= '<div class="color default" style="background-color: ' . $sColor1 . ';" data-default="' . $sDefaultColor1 . '"></div>';
475 $sColorPalet .= '<div class="color pushed" style="background-color: ' . $sColor2 . ';" data-default="' . $sDefaultColor2 . '"></div>';
476 $sColorPalet .= '<div class="color icon" style="background-color: ' . $sColor3 . ';" data-default="' . $sDefaultColor3 . '"></div>';
477 $sColorPalet .= '<div class="text">' . (( $sColor1 != $sDefaultColor1 || $sColor2 != $sDefaultColor2 || $sColor3 != $sDefaultColor3 ? 'Custom colors' : 'Default colors' )) . '</div>';
478 $sColorPalet .= '<input type="hidden" name="buttonizer_buttons[button_' . $iButtonId . '_using_custom_colors]" class="custom" value="' . (( $bCustomColors ? '1' : '0' )) . '" />';
479 $sColorPalet .= '<input type="hidden" name="buttonizer_buttons[button_' . $iButtonId . '_colors_button]" class="default" value="' . $sColor1 . '" />';
480 $sColorPalet .= '<input type="hidden" name="buttonizer_buttons[button_' . $iButtonId . '_colors_pushed]" class="pushed" value="' . $sColor2 . '" />';
481 $sColorPalet .= '<input type="hidden" name="buttonizer_buttons[button_' . $iButtonId . '_colors_icon]" class="icon" value="' . $sColor3 . '" />';
482 $sColorPalet .= '</div>';
483 $sColorPalet .= '<a href="javascript:void(0)" id="reset_colors_' . $iButtonId . '" style="' . (( !$bCustomColors ? 'display: none' : '' )) . '" class="button color_default_btn">Back to default</a>';
484 return $sColorPalet;
485 }
486
487 /**
488 * Button custom class
489 *
490 * @param $iButtonId
491 * @return string
492 */
493 public function buttonCustomClass( $iButtonId )
494 {
495 return '<input type="text" class="buttonizer-click-to-pro" value="Use PRO for custom classes" readonly>';
496 }
497
498 /**
499 * Show the pro message
500 * @return string
501 */
502 public function showPro()
503 {
504 return '<span class="buttonizer-pro-feature buttonizer-click-to-pro">PRO</span>';
505 }
506
507 }