.wpr-comment-author' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Date and Time ---- $this->start_controls_section( 'section_style_metadata', [ 'label' => esc_html__( 'Date and Time', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'metadata_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#9B9B9B', 'selectors' => [ '{{WRAPPER}} .wpr-comment-metadata' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-comment-metadata a' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-comment-reply:before' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'metadata_typography', 'selector' => '{{WRAPPER}} .wpr-comment-metadata', 'fields_options' => [ 'typography' => [ 'default' => 'custom', ], 'font_family' => [ 'default' => 'Open Sans', ], 'font_size' => [ 'default' => [ 'size' => '12', 'unit' => 'px', ], ] ] ] ); $this->add_responsive_control( 'metadata_space', [ 'label' => esc_html__( 'Bottom Space', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 30, ], ], 'default' => [ 'unit' => 'px', 'size' => 5, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-metadata' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Content ---------- $this->start_controls_section( 'section_style_content', [ 'label' => esc_html__( 'Content (Comment Text)', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'content_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#666666', 'selectors' => [ '{{WRAPPER}} .wpr-comment-content' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'content_link_color', [ 'label' => esc_html__( 'Link Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-comment-content a' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'selector' => '{{WRAPPER}} .wpr-comment-content', 'fields_options' => [ 'typography' => [ 'default' => 'custom', ], 'font_family' => [ 'default' => 'Open Sans', ], 'font_weight' => [ 'default' => '400', ], 'font_size' => [ 'default' => [ 'size' => '14', 'unit' => 'px', ], ] ] ] ); $this->end_controls_section(); // Styles ==================== // Section: Reply Link ------- $this->start_controls_section( 'section_style_reply_link', [ 'label' => esc_html__( 'Reply Link', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_reply_link_style' ); $this->start_controls_tab( 'tab_reply_link_normal', [ 'label' => __( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'reply_link_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'reply_link_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#FCFCFC', 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'reply_link_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'border-color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'reply_link_typography', 'selector' => '{{WRAPPER}} .wpr-comment-reply a', 'fields_options' => [ 'typography' => [ 'default' => 'custom', ], 'font_size' => [ 'default' => [ 'size' => '13', 'unit' => 'px', ], ] ] ] ); $this->add_control( 'reply_link_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.6, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'transition-duration: {{VALUE}}s', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_reply_link_hover', [ 'label' => __( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'reply_link_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#54595f', 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a:hover' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'reply_link_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a:hover' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'reply_link_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a:hover' => 'border-color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'reply_link_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before' ] ); $this->add_responsive_control( 'reply_link_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'reply_link_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'border-style: {{VALUE}};', ], 'separator' => 'before', ] ); $this->add_control( 'reply_link_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'reply_link_border_type!' => 'none', ], ] ); $this->add_control( 'reply_link_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'reply_link_align', [ 'label' => __( 'Alignment', 'wpr-addons' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'options' => [ 'left' => [ 'title' => __( 'Left', 'wpr-addons' ), 'icon' => 'eicon-text-align-left', ], 'right' => [ 'title' => __( 'Right', 'wpr-addons' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'right', 'prefix_class' => 'wpr-comment-reply-align-', 'separator' => 'before', ] ); $this->end_controls_section(); // Styles ==================== // Section: Navigation ------- $this->start_controls_section( 'section_style_navigation', [ 'label' => esc_html__( 'Navigation', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_navigation_style' ); $this->start_controls_tab( 'tab_navigation_normal', [ 'label' => __( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'navigation_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#333333', 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-comments-navigation span' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'navigation_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-comments-navigation span' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'navigation_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-comments-navigation span' => 'border-color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'navigation_typography', 'selector' => '{{WRAPPER}} .wpr-comments-navigation a, {{WRAPPER}} .wpr-comments-navigation span', 'fields_options' => [ 'typography' => [ 'default' => 'custom', ], 'font_size' => [ 'default' => [ 'size' => '13', 'unit' => 'px', ], ] ] ] ); $this->add_control( 'navigation_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.1, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a' => 'transition-duration: {{VALUE}}s', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_navigation_hover', [ 'label' => __( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'navigation_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#54595f', 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a:hover' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-comments-navigation span.current' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'navigation_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a:hover' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-comments-navigation span.current' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'navigation_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a:hover' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-comments-navigation span.current' => 'border-color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'navigation_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-comments-navigation span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before' ] ); $this->add_control( 'navigation_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a' => 'border-style: {{VALUE}};', '{{WRAPPER}} .wpr-comments-navigation span' => 'border-style: {{VALUE}};', ], 'separator' => 'before', ] ); $this->add_control( 'navigation_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-comments-navigation span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'navigation_border_type!' => 'none', ], ] ); $this->add_control( 'navigation_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-comments-navigation a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-comments-navigation span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); // Styles ==================== // Section: Comment Form Title $this->start_controls_section( 'section_style_cf_title', [ 'label' => esc_html__( 'Comment Form Title', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->add_control( 'cf_title_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#222222', 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply-title' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'cf_title_bd_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#e8e8e8', 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply-title' => 'border-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'cf_title_typography', 'selector' => '{{WRAPPER}} .wpr-comment-reply-title', 'fields_options' => [ 'typography' => [ 'default' => 'custom', ], 'font_family' => [ 'default' => 'Raleway', ], 'font_weight' => [ 'default' => '500', ], 'letter_spacing' => [ 'default' => [ 'size' => '0.5' ] ], 'font_size' => [ 'default' => [ 'size' => '17', 'unit' => 'px', ], ] ] ] ); $this->add_control( 'cf_title_bd_type', [ 'label' => esc_html__( 'Border Style', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply-title' => 'border-style: {{VALUE}};', ], 'separator' => 'before' ] ); $this->add_control( 'cf_title_bd_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply-title' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'cf_title_bd_type!' => 'none', ], ] ); $this->add_responsive_control( 'cf_title_top_space', [ 'label' => esc_html__( 'Top Space', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 85, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply-title' => 'margin-top: {{SIZE}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'cf_title_bottom_space', [ 'label' => esc_html__( 'Bottom Space', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 20, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply-title' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'cf_title_align', [ 'label' => esc_html__( 'Align', 'wpr-addons' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'default' => 'left', 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'wpr-addons' ), 'icon' => 'eicon-h-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'wpr-addons' ), 'icon' => 'eicon-h-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'wpr-addons' ), 'icon' => 'eicon-h-align-right', ] ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-reply-title' => 'text-align: {{VALUE}}', ], 'separator' => 'before' ] ); $this->end_controls_section(); // Styles ==================== // Section: Comment Form ----- $this->start_controls_section( 'section_style_comment_form', [ 'label' => esc_html__( 'Comment Form', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_comment_form_style' ); $this->start_controls_tab( 'tab_comment_form_normal', [ 'label' => __( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'comment_form_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#666666', 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]' => 'color: {{VALUE}};', '{{WRAPPER}} .wpr-comment-form textarea' => 'color: {{VALUE}};', '{{WRAPPER}} .wpr-comment-form label' => 'color: {{VALUE}}', '{{WRAPPER}} .wpr-comment-form .logged-in-as a' => 'color: {{VALUE}};', '{{WRAPPER}} .wpr-comment-form .logged-in-as .required-field-message' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'comment_form_placeholder_color', [ 'label' => esc_html__( 'Placeholder Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#B8B8B8', 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]::placeholder' => 'color: {{VALUE}}; opacity: 1;', '{{WRAPPER}} .wpr-comment-form textarea::placeholder' => 'color: {{VALUE}}; opacity: 1;', '{{WRAPPER}} .wpr-comment-form input[type=text]::-ms-input-placeholder' => 'color: {{VALUE}};', '{{WRAPPER}} .wpr-comment-form textarea::-ms-input-placeholder' => 'color: {{VALUE}};', ], 'condition' => [ 'comment_form_placeholders' => 'yes' ] ] ); $this->add_control( 'comment_form_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]' => 'background-color: {{VALUE}}', '{{WRAPPER}} .wpr-comment-form textarea' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'comment_form_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#DBDBDB', 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpr-comment-form textarea' => 'border-color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'comment_form_typography', 'selector' => '{{WRAPPER}} .wpr-comment-form label, {{WRAPPER}} .wpr-comment-form input[type=text], {{WRAPPER}} .wpr-comment-form textarea, {{WRAPPER}} .wpr-comment-form .logged-in-as', 'fields_options' => [ 'typography' => [ 'default' => 'custom', ], 'font_size' => [ 'default' => [ 'size' => '14', 'unit' => 'px', ], ] ] ] ); $this->add_control( 'comment_form_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.6, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-comment-form input[type=text]::placeholder' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-comment-form input[type=text]::-ms-input-placeholder' => 'transition-duration: {{VALUE}}s', '{{WRAPPER}} .wpr-comment-form textarea' => 'transition-duration: {{VALUE}}s', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_comment_form_hover', [ 'label' => __( 'Focus', 'wpr-addons' ), ] ); $this->add_control( 'comment_form_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#666666', 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]:focus' => 'color: {{VALUE}};', '{{WRAPPER}} .wpr-comment-form textarea:focus' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'comment_form_placeholder_color_hr', [ 'label' => esc_html__( 'Placeholder Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#B8B8B8', 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]:focus::placeholder' => 'color: {{VALUE}}; opacity: 1;', '{{WRAPPER}} .wpr-comment-form textarea:focus::placeholder' => 'color: {{VALUE}}; opacity: 1;', '{{WRAPPER}} .wpr-comment-form input[type=text]:focus::-ms-input-placeholder' => 'color: {{VALUE}};', '{{WRAPPER}} .wpr-comment-form textarea:focus::-ms-input-placeholder' => 'color: {{VALUE}};', ], 'condition' => [ 'comment_form_placeholders' => 'yes' ] ] ); $this->add_control( 'comment_form_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]:focus' => 'background-color: {{VALUE}};', '{{WRAPPER}} .wpr-comment-form textarea:focus' => 'background-color: {{VALUE}};', ] ] ); $this->add_control( 'comment_form_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]:focus' => 'border-color: {{VALUE}};', '{{WRAPPER}} .wpr-comment-form textarea:focus' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'comment_form_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 10, 'right' => 0, 'bottom' => 10, 'left' => 10, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-comment-form textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before' ] ); $this->add_control( 'comment_form_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'solid', 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]' => 'border-style: {{VALUE}}', '{{WRAPPER}} .wpr-comment-form textarea' => 'border-style: {{VALUE}}', ], 'separator' => 'before', ] ); $this->add_control( 'comment_form_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-comment-form textarea' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'comment_form_border_type!' => 'none', ], ] ); $this->add_control( 'comment_form_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-form input[type=text]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .wpr-comment-form textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'comment_form_gutter', [ 'label' => esc_html__( 'Gutter', 'wpr-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 30, ], ], 'default' => [ 'unit' => 'px', 'size' => 10, ], 'selectors' => [ '{{WRAPPER}} .wpr-comment-form-author' => 'margin-bottom: {{SIZE}}{{UNIT}}; margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-comment-form-email' => 'margin-bottom: {{SIZE}}{{UNIT}}; margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-comment-form-url' => 'margin-bottom: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .wpr-comment-form-text' => 'margin-bottom: {{SIZE}}{{UNIT}};', ], 'separator' => 'before' ] ); $this->end_controls_section(); // Styles ==================== // Section: Submit Button ---- $this->start_controls_section( 'section_style_submit_button', [ 'label' => esc_html__( 'Submit Button', 'wpr-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'show_label' => false, ] ); $this->start_controls_tabs( 'tabs_submit_button_style' ); $this->start_controls_tab( 'tab_submit_button_normal', [ 'label' => __( 'Normal', 'wpr-addons' ), ] ); $this->add_control( 'submit_button_color', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'submit_button_bg_color', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#605BE5', 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'submit_button_border_color', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#DBDBDB', 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'border-color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'submit_button_typography', 'selector' => '{{WRAPPER}} .wpr-submit-comment', 'fields_options' => [ 'typography' => [ 'default' => 'custom', ], 'letter_spacing' => [ 'default' => [ 'size' => '0.5' ] ], 'font_size' => [ 'default' => [ 'size' => '15', 'unit' => 'px', ], ] ] ] ); $this->add_control( 'submit_button_transition_duration', [ 'label' => esc_html__( 'Transition Duration', 'wpr-addons' ), 'type' => Controls_Manager::NUMBER, 'default' => 0.7, 'min' => 0, 'max' => 5, 'step' => 0.1, 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'transition-duration: {{VALUE}}s', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_submit_button_hover', [ 'label' => __( 'Hover', 'wpr-addons' ), ] ); $this->add_control( 'submit_button_color_hr', [ 'label' => esc_html__( 'Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#FFFFFF', 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment:hover' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'submit_button_bg_color_hr', [ 'label' => esc_html__( 'Background Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '#4C48BD', 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment:hover' => 'background-color: {{VALUE}}', ] ] ); $this->add_control( 'submit_button_border_color_hr', [ 'label' => esc_html__( 'Border Color', 'wpr-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment:hover' => 'border-color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'submit_button_padding', [ 'label' => esc_html__( 'Padding', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 10, 'right' => 45, 'bottom' => 10, 'left' => 45, ], 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before' ] ); $this->add_responsive_control( 'submit_button_margin', [ 'label' => esc_html__( 'Margin', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 25, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'submit_button_border_type', [ 'label' => esc_html__( 'Border Type', 'wpr-addons' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => esc_html__( 'None', 'wpr-addons' ), 'solid' => esc_html__( 'Solid', 'wpr-addons' ), 'double' => esc_html__( 'Double', 'wpr-addons' ), 'dotted' => esc_html__( 'Dotted', 'wpr-addons' ), 'dashed' => esc_html__( 'Dashed', 'wpr-addons' ), 'groove' => esc_html__( 'Groove', 'wpr-addons' ), ], 'default' => 'none', 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'border-style: {{VALUE}};', ], 'separator' => 'before', ] ); $this->add_control( 'submit_button_border_width', [ 'label' => esc_html__( 'Border Width', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px' ], 'default' => [ 'top' => 1, 'right' => 1, 'bottom' => 1, 'left' => 1, ], 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'submit_button_border_type!' => 'none', ], ] ); $this->add_control( 'submit_button_radius', [ 'label' => esc_html__( 'Border Radius', 'wpr-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 0, 'left' => 0, ], 'selectors' => [ '{{WRAPPER}} .wpr-submit-comment' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'submit_button_align', [ 'label' => esc_html__( 'Align', 'wpr-addons' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'default' => 'left', 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'wpr-addons' ), 'icon' => 'eicon-h-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'wpr-addons' ), 'icon' => 'eicon-h-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'wpr-addons' ), 'icon' => 'eicon-h-align-right', ] ], 'selectors' => [ '{{WRAPPER}} .form-submit' => 'text-align: {{VALUE}}', ], 'separator' => 'before' ] ); $this->end_controls_section(); } // Outputs a comment in the HTML5 format public static function html5_comment( $comment, $args, $depth ) { // Get Settings $this_widget = $GLOBALS['wpr_post_comments_widget']; $settings = $this_widget->get_settings(); if ( !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ) { $settings['comments_avatar_size'] = 60; } // Class, URL, Name $comment_class = implode( ' ', get_comment_class( $comment->has_children ? 'parent' : '', $comment ) ); $author_url = get_comment_author_url( $comment ); $author_name = get_comment_author( $comment ); // Comment HTML echo '