CFF_Actionbutton_Control.php
1 month ago
CFF_Checkbox_Control.php
1 month ago
CFF_Checkboxsection_Control.php
1 month ago
CFF_Coloroverride_Control.php
1 month ago
CFF_Colorpicker_Control.php
1 month ago
CFF_Controls_Base.php
1 month ago
CFF_Customview_Control.php
1 month ago
CFF_Datepicker_Control.php
1 month ago
CFF_Heading_Control.php
1 month ago
CFF_Hidden_Control.php
1 month ago
CFF_Number_Control.php
1 month ago
CFF_Select_Control.php
1 month ago
CFF_Separator_Control.php
1 month ago
CFF_Switcher_Control.php
1 month ago
CFF_Text_Control.php
1 month ago
CFF_Textarea_Control.php
1 month ago
CFF_Toggle_Control.php
1 month ago
CFF_Togglebutton_Control.php
1 month ago
CFF_Toggleset_Control.php
1 month ago
index.php
1 month ago
CFF_Togglebutton_Control.php
52 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Customizer Builder |
| 5 | * Toggle Buttons |
| 6 | * |
| 7 | * @since 4.0 |
| 8 | */ |
| 9 | |
| 10 | namespace CustomFacebookFeed\Builder\Controls; |
| 11 | |
| 12 | if (!defined('ABSPATH')) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | class CFF_Togglebutton_Control extends CFF_Controls_Base |
| 17 | { |
| 18 | /** |
| 19 | * Get control type. |
| 20 | * |
| 21 | * Getting the Control Type |
| 22 | * |
| 23 | * @since 4.0 |
| 24 | * @access public |
| 25 | * |
| 26 | * @return string |
| 27 | */ |
| 28 | public function get_type() |
| 29 | { |
| 30 | return 'togglebutton'; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Output Control |
| 35 | * |
| 36 | * @since 4.0 |
| 37 | * @access public |
| 38 | * |
| 39 | * @return HTML |
| 40 | */ |
| 41 | public function get_control_output($controlEditingTypeModel) |
| 42 | { |
| 43 | ?> |
| 44 | <div class="sb-control-togglebutton-ctn cff-fb-fs"> |
| 45 | <div class="sb-control-togglebutton-elm cff-fb-fs sb-tr-1" v-for="toggle in control.options" :data-active="<?php echo $controlEditingTypeModel ?>[control.id] == toggle.value" v-show="toggle.condition != undefined ? checkControlCondition(toggle.condition) : true" @click.prevent.default="changeSettingValue(control.id,toggle.value, true)" > |
| 46 | {{toggle.label}} |
| 47 | </div> |
| 48 | </div> |
| 49 | |
| 50 | <?php |
| 51 | } |
| 52 | } |