hello
Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : chryzalihi ( 621211) PHP Version : 8.3.31 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/chryzalihi/www/wp-contentOLD/themes/rakiya/library/customize/ |
<?php
/**
* The multiple checkbox customize control allows theme authors to add theme options that have
* multiple choices.
*
* @package Hybrid
* @subpackage Customize
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2015, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
/**
* Multiple checkbox customize control class.
*
* @since 3.0.0
* @access public
*/
class Hybrid_Customize_Control_Checkbox_Multiple extends WP_Customize_Control {
/**
* The type of customize control being rendered.
*
* @since 3.0.0
* @access public
* @var string
*/
public $type = 'checkbox-multiple';
/**
* Enqueue scripts/styles.
*
* @since 3.0.0
* @access public
* @return void
*/
public function enqueue() {
wp_enqueue_script( 'hybrid-customize-controls' );
}
/**
* Add custom parameters to pass to the JS via JSON.
*
* @since 3.0.0
* @access public
* @return void
*/
public function to_json() {
parent::to_json();
$this->json['value'] = ! is_array( $this->value() ) ? explode( ',', $this->value() ) : $this->value();
$this->json['choices'] = $this->choices;
$this->json['link'] = $this->get_link();
$this->json['id'] = $this->id;
}
/**
* Underscore JS template to handle the control's output.
*
* @since 3.0.0
* @access public
* @return void
*/
public function content_template() { ?>
<# if ( ! data.choices ) {
return;
} #>
<# if ( data.label ) { #>
<span class="customize-control-title">{{ data.label }}</span>
<# } #>
<# if ( data.description ) { #>
<span class="description customize-control-description">{{{ data.description }}}</span>
<# } #>
<ul>
<# _.each( data.choices, function( label, choice ) { #>
<li>
<label>
<input type="checkbox" value="{{ choice }}" <# if ( -1 !== data.value.indexOf( choice ) ) { #> checked="checked" <# } #> />
{{ label }}
</label>
</li>
<# } ) #>
</ul>
<?php }
}