mirror of
https://ghproxy.net/https://github.com/AlxMedia/magaziner.git
synced 2025-08-28 15:50:26 +08:00
Initial commit
This commit is contained in:
commit
b0607606ae
369 changed files with 85494 additions and 0 deletions
48
functions/kirki/controls/views/radio.php
Normal file
48
functions/kirki/controls/views/radio.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/**
|
||||
* Customizer controls underscore.js template.
|
||||
*
|
||||
* @package Kirki
|
||||
* @subpackage Controls
|
||||
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
* @since 3.0.17
|
||||
*/
|
||||
|
||||
?>
|
||||
<# data = _.defaults( data, {
|
||||
choices: {},
|
||||
label: '',
|
||||
description: '',
|
||||
inputAttrs: '',
|
||||
value: '',
|
||||
'data-id': '',
|
||||
'default': ''
|
||||
} );
|
||||
#>
|
||||
|
||||
<div class="kirki-input-container" data-id="' + data.id + '">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="customize-control-title">{{{ data.label }}}</span>
|
||||
<# } #>
|
||||
<# if ( data.description ) { #>
|
||||
<span class="description customize-control-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
<# _.each( data.choices, function( val, key ) { #>
|
||||
<label>
|
||||
<input
|
||||
{{{ data.inputAttrs }}}
|
||||
type="radio"
|
||||
data-id="{{ data['data-id'] }}"
|
||||
value="{{ key }}"
|
||||
name="_customize-radio-{{ data['data-id'] }}"
|
||||
<# if ( data.value === key ) { #> checked<# } #>
|
||||
/>
|
||||
<# if ( _.isArray( val ) ) { #>
|
||||
{{{ val[0] }}}<span class="option-description">{{{ val[1] }}}</span>
|
||||
<# } else { #>
|
||||
{{ val }}
|
||||
<# } #>
|
||||
</label>
|
||||
<# } ); #>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue