documents->is_document_type( 'single' ); } protected function _register_controls() { $css_scheme = apply_filters( 'jet-woo-builder/jet-single-title/css-scheme', array( 'title' => '.jet-woo-builder .product_title' ) ); $this->start_controls_section( 'section_single_title_style', array( 'label' => esc_html__( 'General', 'jet-woo-builder' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ) ); $this->add_control( 'single_title_color', array( 'label' => esc_html__( 'Color', 'jet-woo-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['title'] => 'color: {{VALUE}}', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'single_title_typography', 'selector' => '{{WRAPPER}} ' . $css_scheme['title'], ) ); $this->add_responsive_control( 'single_title_margin', array( 'label' => esc_html__( 'Margin', 'jet-woo-builder' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['title'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'single_title_padding', array( 'label' => esc_html__( 'Padding', 'jet-woo-builder' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['title'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->add_responsive_control( 'single_title_alignment', array( 'label' => esc_html__( 'Alignment', 'jet-woo-builder' ), 'type' => Controls_Manager::CHOOSE, 'default' => 'left', 'options' => array( 'left' => array( 'title' => esc_html__( 'Left', 'jet-woo-builder' ), 'icon' => 'eicon-text-align-left', ), 'center' => array( 'title' => esc_html__( 'Center', 'jet-woo-builder' ), 'icon' => 'eicon-text-align-center', ), 'right' => array( 'title' => esc_html__( 'Right', 'jet-woo-builder' ), 'icon' => 'eicon-text-align-right', ), ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['title'] => 'text-align: {{VALUE}};', ), 'classes' => 'elementor-control-align', ) ); $this->end_controls_section(); } protected function render() { $this->__context = 'render'; if ( true === $this->__set_editor_product() ) { $this->__open_wrap(); include $this->__get_global_template( 'index' ); $this->__close_wrap(); $this->__reset_editor_product(); } } }