l10n() ); wp_enqueue_style( 'arrival-dimensions', ARRIVAL_URI . '/inc/customizer/dimensions/dimensions.css', null ); } /** * 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 ); $class = 'customize-control has-switchers customize-control-' . $this->type; ?>
  • render_content(); ?>
  • json['id'] = $this->id; $this->json['l10n'] = $this->l10n(); $this->json['title'] = esc_html__( 'Link values together', 'arrival' ); $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 == true ) { #> <# } #> <# } #> <# if ( data.description ) { #> {{{ data.description }}} <# } #> esc_attr__( 'Top', 'arrival' ), 'desktop_right' => esc_attr__( 'Right', 'arrival' ), 'desktop_bottom' => esc_attr__( 'Bottom', 'arrival' ), 'desktop_left' => esc_attr__( 'Left', 'arrival' ), 'tablet_top' => esc_attr__( 'Top', 'arrival' ), 'tablet_right' => esc_attr__( 'Right', 'arrival' ), 'tablet_bottom' => esc_attr__( 'Bottom', 'arrival' ), 'tablet_left' => esc_attr__( 'Left', 'arrival' ), 'mobile_top' => esc_attr__( 'Top', 'arrival' ), 'mobile_right' => esc_attr__( 'Right', 'arrival' ), 'mobile_bottom' => esc_attr__( 'Bottom', 'arrival' ), 'mobile_left' => esc_attr__( 'Left', 'arrival' ), ); if ( false === $id ) { return $translation_strings; } return $translation_strings[ $id ]; } }