json['default'] = $this->setting->default; if ( isset( $this->default ) ) { $this->json['default'] = $this->default; } $val = maybe_unserialize( $this->value() ); if ( ! is_array( $val ) || is_numeric( $val ) ) { $val = array( 'desktop' => $val, 'tablet' => '', 'tablet-landscape' => '', 'mobile' => '', 'desktop-unit' => '', 'tablet-unit' => '', 'tablet-ls-unit' => '', 'mobile-unit' => '', ); } $this->json['value'] = $val; $this->json['id'] = $this->id; $this->json['link'] = $this->get_link(); $this->json['label'] = esc_html( $this->label ); $this->json['units'] = $this->units; $this->json['inputAttrs'] = ''; foreach ( $this->input_attrs as $attr => $value ) { $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" '; } } /** * Renders the control wrapper and calls $this->render_content() for the internals. * * @since 3.4.0 */ protected function render() { $id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id ); $class = 'customize-control has-responsive-switchers customize-control-' . $this->type; $d_controller = $d_condition = $d_value = ''; $dependency = $this->dependency; if( !empty( $dependency ) ) { $d_controller = "data-controller='" . esc_attr( $dependency[0] )."'"; $d_condition = "data-condition='" . esc_attr( $dependency[1] )."'"; $d_value = "data-value='". esc_attr( $dependency[2] )."'"; } printf( '