This commit is contained in:
2026-04-26 23:47:49 +02:00
parent 1b95f03d1e
commit b073e009d8
5288 changed files with 1112699 additions and 55536 deletions

View File

@@ -0,0 +1,46 @@
<?php
/**
* Customizer Builder
* Switcher Field Control
*
* @since 2.0
*/
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class SB_Switcher_Control extends SB_Controls_Base {
/**
* Get control type.
*
* Getting the Control Type
*
* @since 2.0
* @access public
*
* @return string
*/
public function get_type() {
return 'switcher';
}
/**
* Output Control
*
*
* @since 2.0
* @access public
*/
public function get_control_output( $controlEditingTypeModel ) {
?>
<div class="sb-control-switcher-ctn" :data-active="<?php echo $controlEditingTypeModel; ?>[control.id] == control.options.enabled" @click.prevent.default="changeSwitcherSettingValue(control.id, control.options.enabled, control.options.disabled, control.ajaxAction ? control.ajaxAction : false)">
<div class="sb-control-switcher sb-tr-2"></div>
<div class="sb-control-label" v-if="control.label" :data-title="control.labelStrong ? 'true' : false">{{control.label}}</div>
</div>
<?php
}
}