responsive = $args['responsive']; } //$this->device = implode(' ', $this->device); parent::__construct($manager, $id, $args); } /** * Renders the control wrapper and calls $this->render_content() for the internals. * * @see WP_Customize_Control::render() */ protected function render() { $id = 'customize-control-' . str_replace(array('[', ']'), array('-', ''), $this->id); $switcher_class = $this->responsive ? ' has-switchers' : ''; $class = 'customize-control customize-control-' . $this->type . $switcher_class; ?>
  • render_content(); ?>
  • json['id'] = $this->id; $this->json['l10n'] = $this->l10n(); $this->json['title'] = esc_html__('Link values together', 'bigmart'); $this->json['responsive'] = $this->responsive; $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) { list( $_key ) = explode('_', $setting_key); $this->json[$_key][$setting_key] = array( 'id' => $setting->id, '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.responsive ) { #> <# } #> <# } #> <# if ( data.description ) { #> {{{ data.description }}} <# } #> <# if ( data.responsive ) { #> <# } #> <# if ( data.responsive ) { #> <# } #> esc_attr__('Top', 'bigmart'), 'desktop_right' => esc_attr__('Right', 'bigmart'), 'desktop_bottom' => esc_attr__('Bottom', 'bigmart'), 'desktop_left' => esc_attr__('Left', 'bigmart'), 'tablet_top' => esc_attr__('Top', 'bigmart'), 'tablet_right' => esc_attr__('Right', 'bigmart'), 'tablet_bottom' => esc_attr__('Bottom', 'bigmart'), 'tablet_left' => esc_attr__('Left', 'bigmart'), 'mobile_top' => esc_attr__('Top', 'bigmart'), 'mobile_right' => esc_attr__('Right', 'bigmart'), 'mobile_bottom' => esc_attr__('Bottom', 'bigmart'), 'mobile_left' => esc_attr__('Left', 'bigmart'), ); if (false === $id) { return $translation_strings; } return $translation_strings[$id]; } }