documents->is_document_type( 'archive' ); } protected function _register_controls() { $css_scheme = apply_filters( 'jet-woo-builder/jet-archive-stock-status/css-scheme', array( 'stock' => '.jet-woo-builder-archive-product-stock-status .stock', 'in_stock' => '.jet-woo-builder-archive-product-stock-status .in-stock', 'out_of_stock' => '.jet-woo-builder-archive-product-stock-status .out-of-stock', ) ); $this->start_controls_section( 'section_stock_style', array( 'label' => esc_html__( 'Stock Status', 'jet-woo-builder' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'stock_typography', 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} ' . $css_scheme['stock'], ) ); $this->start_controls_tabs( 'stock_style_tabs' ); $this->start_controls_tab( 'in_stock_styles', array( 'label' => esc_html__( 'In Stock', 'jet-woo-builder' ), ) ); $this->add_control( 'in_stock_color', array( 'label' => esc_html__( 'In Stock Color', 'jet-woo-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['in_stock'] => 'color: {{VALUE}};', ), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'out_of_stock_styles', array( 'label' => esc_html__( 'Out Of Stock', 'jet-woo-builder' ), ) ); $this->add_control( 'out_of_stock_color', array( 'label' => esc_html__( 'Out Of Stock Color', 'jet-woo-builder' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['out_of_stock'] => 'color: {{VALUE}};', ), ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'stock_alignment', array( 'label' => esc_html__( 'Alignment', 'jet-woo-builder' ), 'type' => Controls_Manager::CHOOSE, '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['stock'] => 'text-align: {{VALUE}};', ), 'classes' => 'elementor-control-align', ) ); $this->end_controls_section(); } /** * Returns CSS selector for nested element * * @param [type] $el [description] * * @return [type] [description] */ public function css_selector( $el = null ) { return sprintf( '{{WRAPPER}} .%1$s %2$s', $this->get_name(), $el ); } public static function render_callback() { echo '