on_off_label = $args['switch_label']; $this->class = isset($args['class']) ? $args['class'] : ''; parent::__construct($manager, $id, $args); } /** * enqueue css and scrpts * * @since 1.0.0 */ public function enqueue() { wp_enqueue_style('business-roy-switch-control', get_template_directory_uri() . '/inc/custom-controller/switch/switch.css', array()); wp_enqueue_script('business-roy-switch-control', get_template_directory_uri().'/inc/custom-controller/switch/switch.js', array( 'jquery', 'customize-controls' ), '', true); } public function render_content() { $switch_class = ($this->value() == 'enable') ? 'switch-on ' : ''; $switch_class .= $this->class; $on_off_label = $this->on_off_label; ?>
link(); ?> type="hidden" value="value()); ?>"/> label); ?> description) { ?> description); ?>