render_content() for the internals.
*
* @see WP_Customize_Control::render()
*
* @since 1.0.0
* @access protected
*
* @package BizSmart WordPress Theme
*/
protected function render() {
$id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
$class = 'customize-control has-switchers customize-control-' . $this->type;
?>
render_content(); ?>
json['id'] = $this->id;
$this->json['inputAttrs'] = '';
foreach ( $this->input_attrs as $attr => $value ) {
$this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
}
$this->json['desktop'] = array();
$this->json['tablet'] = array();
$this->json['mobile'] = array();
foreach ( $this->settings as $setting_key => $setting ) {
$this->json[ $setting_key ] = array(
'id' => $setting->id,
'default' => $setting->default,
'link' => $this->get_link( $setting_key ),
'value' => $this->value( $setting_key ),
);
}
}
/**
* An Underscore (JS) template for this control's content (but not its container).
*
* Class variables for this control class are available in the `data` JS object;
* export custom variables by overriding {@see WP_Customize_Control::to_json()}.
*
* @see WP_Customize_Control::print_template()
*
* @access protected
*/
protected function content_template() {
?>
<# if ( data.label ) { #>
{{{ data.label }}}
<# } #>
<# if ( data.description ) { #>
{{{ data.description }}}
<# } #>
<# if ( data.desktop ) { #>
<# } #>
<# if ( data.tablet ) { #>
<# } #>
<# if ( data.mobile ) { #>
<# } #>