get_name()); } public function get_keywords() { return [ 'comments', 'comments', 'disquss', 'facebook', 'jetpack', 'discussion' ]; } public function get_custom_help_url() { return 'https://master-addons.com/demos/comments-builder'; } protected function register_controls() { /* * MA Comments Section */ $this->start_controls_section( 'jltma_comment_section_start', [ 'label' => esc_html__('Comments', 'master-addons' ), ] ); $this->add_control( 'jltma_comment_style_preset', [ 'label' => esc_html__('Design Presets', 'master-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'style_one', 'options' => [ 'style_one' => esc_html__('Modern Style', 'master-addons' ), 'style_two' => esc_html__('Lounge Style', 'master-addons' ), 'style_three' => esc_html__('Facebook Style', 'master-addons' ) ], 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_total_number', [ 'label' => esc_html__('Total Number of Comments', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Show', 'master-addons' ), 'label_off' => esc_html__('Hide', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_no_comment_text', [ 'label' => esc_html__('No Comments Text', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('No Comments', 'master-addons' ), 'style_transfer' => true, 'condition' => [ 'jltma_comment_total_number' => 'show' ], ] ); $this->add_control( 'jltma_comment_single_comment_text', [ 'label' => esc_html__('One Comment Text', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('One Comment', 'master-addons' ), 'style_transfer' => true, 'condition' => [ 'jltma_comment_total_number' => 'show' ], ] ); $this->add_control( 'jltma_comment_plural_comment_text', [ 'label' => esc_html__('Multiple Comments Text', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Comments', 'master-addons' ), 'style_transfer' => true, 'condition' => [ 'jltma_comment_total_number' => 'show' ], ] ); $this->add_control( 'jltma_comment_gravatar', [ 'label' => esc_html__('Show Gravatar', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Hide', 'master-addons' ), 'label_off' => esc_html__('Show', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_replies', [ 'label' => esc_html__('Show / Hide Replies', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Hide', 'master-addons' ), 'label_off' => esc_html__('Show', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_ratings', [ 'label' => esc_html__('Comment Rating', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Show', 'master-addons' ), 'label_off' => esc_html__('Hide', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_pagination', [ 'label' => esc_html__('Enable Pagination', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'label_on' => esc_html__('Yes', 'master-addons' ), 'label_off' => esc_html__('No', 'master-addons' ), 'return_value' => 'yes', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_spam_protection_enable', [ 'label' => esc_html__('Enable reCaptcha', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'label_on' => esc_html__('Enable', 'master-addons' ), 'label_off' => esc_html__('Disable', 'master-addons' ), 'return_value' => 'yes', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_extra_fields_enable', [ 'label' => esc_html__('Enable Extra Comment Fields', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'label_on' => esc_html__('Enable', 'master-addons' ), 'label_off' => esc_html__('Disable', 'master-addons' ), 'return_value' => 'yes', 'style_transfer' => true, ] ); $this->add_responsive_control( 'jltma_comment_pagination_items', [ 'label' => esc_html__('Number Of Comments Per Page', 'master-addons' ), 'type' => Controls_Manager::SLIDER, 'default' => ['size' => 10], 'range' => [ 'px' => [ 'min' => 1, 'max' => 100, 'step' => 1, ], ], 'size_units' => '', 'condition' => [ 'jltma_comment_pagination' => 'yes' ], ] ); $this->end_controls_section(); /** * Content Tab: Display Settings */ $this->start_controls_section( 'jltma_comment_section_customization', [ 'label' => esc_html__('Customization Settings', 'master-addons' ), ] ); $this->add_control( 'jltma_comment_before_notes', [ 'label' => esc_html__('Before Notes Text', 'master-addons' ), 'type' => Controls_Manager::TEXTAREA, 'placeholder' => esc_html__('Your email address will not be published.', 'master-addons' ), ] ); $this->add_control( 'jltma_comment_after_notes', [ 'label' => esc_html__('After Notes Text', 'master-addons' ), 'type' => Controls_Manager::TEXTAREA, 'placeholder' => esc_html__('Your email address will not be published.', 'master-addons' ) ] ); $this->add_control( 'jltma_comment_label', [ 'label' => esc_html__('Comment Label', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Leave A Comment', 'master-addons' ), ] ); $this->add_control( 'jltma_comment_reply_label', [ 'label' => esc_html__('Reply Button Label', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Reply', 'master-addons' ), 'condition' => [ 'jltma_comment_replies' => 'show', ] ] ); $this->add_control( 'jltma_comment_show_reply_label', [ 'label' => esc_html__('Show Reply Label', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'placeholder' => esc_html__('Show Replies', 'master-addons' ), 'condition' => [ 'jltma_comment_replies' => 'show', ] ] ); $this->add_control( 'jltma_comment_hide_reply_label', [ 'label' => esc_html__('Hide Reply Label', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'placeholder' => esc_html__('Hide Replies', 'master-addons' ), 'condition' => [ 'jltma_comment_replies' => 'show', ] ] ); $this->add_control( 'jltma_comment_cancel_reply_label', [ 'label' => esc_html__('Cancel Reply Label', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Cancel Reply', 'master-addons' ) ] ); $this->add_control( 'jltma_comment_form_submit_label', [ 'label' => esc_html__('Comment Form Submit Label', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Post Comment', 'master-addons' ) ] ); $this->end_controls_section(); /** * Content Tab: SPAM Protection */ $this->start_controls_section( 'jltma_comment_section_spam_protection', [ 'label' => esc_html__('SPAM Protection', 'master-addons' ), 'condition' => [ 'jltma_comment_spam_protection_enable' => 'yes', ] ] ); // Spam Protection - Pro feature via filter (pass $this for Pro to add controls) $spam_control_added = apply_filters('master_addons/extensions/header_footer/commen_addon/spam_protection', false, $this); if (!$spam_control_added) { $this->add_control( 'jltma_comment_spam_protection', [ 'label' => esc_html__('Enable SPAM Protection', 'master-addons'), 'type' => Controls_Manager::CHOOSE, 'options' => [ '1' => [ 'title' => '', 'icon' => 'eicon-lock', ], ], 'default' => '1', 'description' => ' Upgrade to Pro Version to unlock this Option.' ] ); } $this->end_controls_section(); /** * Content Tab: Fields Settins */ $this->start_controls_section( 'jltma_comment_section_fields', [ 'label' => esc_html__('Fields Settings', 'master-addons' ), ] ); $this->start_controls_tabs('jltma_comment_section_fields_tab'); $this->start_controls_tab('jltma_comment_fields_name_tab', [ 'label' => esc_html__('Name', 'master-addons' ) ]); $this->add_control( 'jltma_comment_fields_name_label_display', [ 'label' => esc_html__('Display Label?', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Show', 'master-addons' ), 'label_off' => esc_html__('Hide', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_fields_name_label', [ 'label' => esc_html__('Name', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Name', 'master-addons' ), 'condition' => [ 'jltma_comment_fields_name_label_display' => 'show', ] ] ); $this->add_control( 'jltma_comment_fields_name_label_placeholder', [ 'label' => esc_html__('Placeholder', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Enter your Name', 'master-addons' ) ] ); $this->end_controls_tab(); //Email $this->start_controls_tab('jltma_comment_fields_email_tab', [ 'label' => esc_html__('Email', 'master-addons' ) ]); $this->add_control( 'jltma_comment_fields_email_label_display', [ 'label' => esc_html__('Display Label?', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Show', 'master-addons' ), 'label_off' => esc_html__('Hide', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_fields_email_label', [ 'label' => esc_html__('Email', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Email', 'master-addons' ), 'condition' => [ 'jltma_comment_fields_email_label_display' => 'show', ] ] ); $this->add_control( 'jltma_comment_fields_email_label_placeholder', [ 'label' => esc_html__('Placeholder', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Enter your Email', 'master-addons' ) ] ); $this->end_controls_tab(); //Website $this->start_controls_tab('jltma_comment_fields_url_tab', [ 'label' => esc_html__('Website', 'master-addons' ) ]); $this->add_control( 'jltma_comment_fields_url_display', [ 'label' => esc_html__('Display Field?', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Show', 'master-addons' ), 'label_off' => esc_html__('Hide', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_fields_url_label_display', [ 'label' => esc_html__('Display Label?', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Show', 'master-addons' ), 'label_off' => esc_html__('Hide', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, 'condition' => [ 'jltma_comment_fields_url_display' => 'show', ] ] ); $this->add_control( 'jltma_comment_fields_url_label', [ 'label' => esc_html__('Website', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Website', 'master-addons' ), 'condition' => [ 'jltma_comment_fields_url_label_display' => 'show', 'jltma_comment_fields_url_display' => 'show', ] ] ); $this->add_control( 'jltma_comment_fields_url_label_placeholder', [ 'label' => esc_html__('Placeholder', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Enter your Website', 'master-addons' ), 'condition' => [ 'jltma_comment_fields_url_display' => 'show', ] ] ); $this->end_controls_tab(); //Comment Box $this->start_controls_tab('jltma_comment_fields_textarea_tab', [ 'label' => esc_html__('Comment', 'master-addons' ) ]); $this->add_control( 'jltma_comment_fields_textarea_label_display', [ 'label' => esc_html__('Display Label?', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'show', 'label_on' => esc_html__('Show', 'master-addons' ), 'label_off' => esc_html__('Hide', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_fields_textarea_label', [ 'label' => esc_html__('Comment Box', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Comments', 'master-addons' ), 'condition' => [ 'jltma_comment_fields_textarea_label_display' => 'show', ] ] ); $this->add_control( 'jltma_comment_fields_textarea_label_placeholder', [ 'label' => esc_html__('Placeholder', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Enter your Comments', 'master-addons' ) ] ); $this->add_control( 'jltma_comment_fields_textarea_notice', [ 'label' => esc_html__('Display Notice?', 'master-addons' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'hide', 'label_on' => esc_html__('Show', 'master-addons' ), 'label_off' => esc_html__('Hide', 'master-addons' ), 'return_value' => 'show', 'style_transfer' => true, ] ); $this->add_control( 'jltma_comment_fields_textarea_notice_content', [ 'label' => esc_html__('Content', 'master-addons' ), 'type' => Controls_Manager::WYSIWYG, 'default' => esc_html__('Comments are moderated and will only be made live if they add to the discussion in a constructive way. If you disagree with a point, be polite. This should be a conversation between professional people with the aim that we all learn.', 'master-addons' ), 'condition' => [ 'jltma_comment_fields_textarea_notice' => 'show', ], ] ); $this->add_control( 'jltma_comment_fields_textarea_notice_align', [ 'label' => esc_html__('Alignment', 'master-addons' ), 'type' => Controls_Manager::CHOOSE, 'label_block' => false, 'options' => [ 'left' => [ 'title' => esc_html__('Left', 'master-addons' ), 'icon' => 'eicon-h-align-left', ], 'right' => [ 'title' => esc_html__('Right', 'master-addons' ), 'icon' => 'eicon-h-align-right', ], ], 'default' => 'right', 'style_transfer' => true, 'condition' => [ 'jltma_comment_fields_textarea_notice' => 'show', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /** * Extra Comments Fields: Dynamic Custom Fields Settings */ $this->start_controls_section( 'jltma_comment_extra_fields_sections', [ 'label' => esc_html__('Extra Comment Fields', 'master-addons' ), 'condition' => [ 'jltma_comment_extra_fields_enable' => 'yes', ] ] ); // Extra Fields - Pro feature via filter $extra_fields_config = apply_filters('master_addons/extensions/header_footer/commen_addon/extra_fields_items', []); if (!empty($extra_fields_config)) { $this->add_control('jltma_comment_extra_fields_items', $extra_fields_config); } else { $this->add_responsive_control( 'jltma_comment_extra_fields_section_repeater', [ 'label' => __('Comment Extra Fields', 'master-addons'), 'type' => Controls_Manager::CHOOSE, 'options' => [ '1' => [ 'title' => '', 'icon' => 'eicon-lock', ], ], 'default' => '1', 'description' => ' Upgrade to Pro Version to unlock this Option.' ] ); } $this->end_controls_section(); /* Master Comment: Style Tab */ $this->start_controls_section( 'jltma_comments_style_start', [ 'label' => esc_html__('Comment Box', 'master-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_control( 'jltma_comments_bg_color', [ 'label' => esc_html__('Background Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap' => 'background: {{VALUE}};' ] ] ); $this->add_control( 'jltma_comments_total', [ 'label' => esc_html__('Total Number Comments', 'master-addons' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'jltma_comments_total_typography', 'selector' => '{{WRAPPER}} .jltma-comments-title', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ], ] ); $this->add_control( 'jltma_comments_total_color', [ 'label' => esc_html__('Total Comments Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '#000', 'selectors' => [ '{{WRAPPER}} .jltma-comments-title' => 'color: {{VALUE}};' ], ] ); $this->add_responsive_control( 'jltma_comments_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comments_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_border', 'selector' => '{{WRAPPER}} .jltma-comments-wrap' ] ); $this->add_responsive_control( 'jltma_comments_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_box_shadow', 'selector' => '{{WRAPPER}} .jltma-comments-wrap' ] ); $this->end_controls_section(); /* Master Comment Item: Style Tab */ $this->start_controls_section( 'jltma_comment_style_start', [ 'label' => esc_html__('Comment Item', 'master-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_control( 'jltma_comment_bg_color', [ 'label' => esc_html__('Background Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-listing-wrapper .jltma-comment-list' => 'background: {{VALUE}};' ] ] ); // Comment Item Styles $this->start_controls_tabs('jltma_comment_author_section'); $this->start_controls_tab('jltma_comment_author_tab_style', [ 'label' => esc_html__('Author', 'master-addons' ) ]); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'jltma_comment_author_name_typography', 'label' => esc_html__('Author Name Typography', 'master-addons' ), 'selector' => '{{WRAPPER}} .jltma-comment-listing-wrapper .jltma-comment-list .jltma-author-name', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ], ] ); $this->add_control( 'jltma_comment_author_name_color', [ 'label' => esc_html__('Author Name Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '#46494c', 'selectors' => [ '{{WRAPPER}} .jltma-comment-listing-wrapper .jltma-comment-list .jltma-author-name' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comment_author_name_text_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-listing-wrapper .jltma-comment-list .jltma-author-name' ] ); $this->end_controls_tab(); // Gravatar $this->start_controls_tab('jltma_comment_gravatar_tab_style', [ 'label' => esc_html__('Gravatar', 'master-addons' ) ]); $this->add_responsive_control( 'jltma_comment_gravatar_size', [ 'label' => esc_html__('Size', 'master-addons' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 130 ], 'range' => [ 'px' => [ 'min' => 1, 'max' => 350, 'step' => 1, ], ], 'size_units' => '', 'condition' => [ 'jltma_comment_gravatar' => 'show' ], 'selectors' => [ '{{WRAPPER}} .jltma-comment-list .jltma-comment-gravatar' => "width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};" ] ] ); $this->add_responsive_control( 'jltma_comment_gravatar_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .jltma-comment-list .jltma-comment-gravatar img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comment_gravatar_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-list .jltma-comment-gravatar' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comment_gravatar_border', 'selector' => '{{WRAPPER}} .jltma-comment-list .jltma-comment-gravatar img' ] ); $this->add_responsive_control( 'jltma_comment_gravatar_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-list .jltma-comment-gravatar img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comment_gravatar_box_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-list .jltma-comment-gravatar img' ] ); $this->end_controls_tab(); // Comment Text $this->start_controls_tab('jltma_comment_author_commentstyle', [ 'label' => esc_html__('Comments', 'master-addons' ) ]); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'jltma_comment_author_comment_typography', 'selector' => '{{WRAPPER}} .jltma-comment-listing-wrapper .jltma-comment-list .jltma-comment', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_TEXT, ], ] ); $this->add_control( 'jltma_comment_author_comment_color', [ 'label' => esc_html__('Total Comments Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '#5a5e63', 'selectors' => [ '{{WRAPPER}} .jltma-comment-listing-wrapper .jltma-comment-list .jltma-comment' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comment_author_comment_text_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-listing-wrapper .jltma-comment-list .jltma-comment' ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'jltma_comments_time_settings', [ 'label' => esc_html__('Comment Datetime Settings', 'master-addons' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'jltma_comments_time_type', array( 'label' => esc_html__('Type of Datetime', 'master-addons' ), 'type' => Controls_Manager::SELECT, 'default' => 'custom', 'options' => array( 'custom' => esc_html__('Custom', 'master-addons' ), 'mysql' => esc_html__('MySql', 'master-addons' ), 'timestamp' => esc_html__('TimeStamp', 'master-addons' ) ) ) ); $this->add_control( 'jltma_comments_time_format', array( 'label' => esc_html__('Datetime Format String', 'master-addons' ), 'type' => Controls_Manager::TEXT, 'default' => get_option('date_format'), 'description' => ' Date Time Format Examples ', 'condition' => array( 'jltma_comments_time_type' => array('custom'), ) ) ); $this->add_control( 'jltma_comments_time_color', [ 'label' => esc_html__('Datetime Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-title-date .jltma-date-time' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'jltma_comments_time_typography', 'separator' => 'after', 'selector' => '{{WRAPPER}} .jltma-title-date .jltma-date-time', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_TEXT, ], ] ); $this->add_control( 'jltma_comments_like_dislike_settings', [ 'label' => esc_html__('Like/Dislike Settings', 'master-addons' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'jltma_comment_ratings' => 'show' ], ] ); $this->add_control( 'jltma_comments_like_dislike_icon_color', [ 'label' => esc_html__('Like/Dislike Icon Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '#393c3f', 'selectors' => [ '{{WRAPPER}} .jltma-like-dislike-wrapper .fa' => 'color: {{VALUE}};' ], 'condition' => [ 'jltma_comment_ratings' => 'show' ] ] ); $this->add_control( 'jltma_comments_like_dislike_number_color', [ 'label' => esc_html__('Like/Dislike Number Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-like-dislike-wrapper .jltma-like-count-wrap, {{WRAPPER}} .jltma-like-dislike-wrapper .jltma-dislike-count-wrap' => 'color: {{VALUE}};' ], 'condition' => [ 'jltma_comment_ratings' => 'show' ] ] ); $this->add_responsive_control( 'jltma_comment_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comment_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_comment_border', 'selector' => '{{WRAPPER}} .jltma-comment-listing-wrapper > ul.jltma-comment-list' ] ); $this->add_responsive_control( 'jltma_comment_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comment_box_shadow', 'selector' => '{{WRAPPER}} .jltma-comments-wrap' ] ); $this->end_controls_section(); // Reply Settings $this->start_controls_section( 'jltma_comments_reply_section_start', [ 'label' => esc_html__('Reply Settings', 'master-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_control( 'jltma_comments_child_reply_settings', [ 'label' => esc_html__('Children Replies Settings', 'master-addons' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before' ] ); $this->add_control( 'jltma_comments_replies_bg_color', [ 'label' => esc_html__('Replies Background', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-children.jltma-comment-list' => 'background: {{VALUE}} !important;' ] ] ); $this->add_responsive_control( 'jltma_comments_replies_pading', [ 'label' => esc_html__('Replies Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .jltma-children.jltma-comment-list' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comments_replies_margin', [ 'label' => esc_html__('Replies Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'default' => [ 'top' => 0, 'right' => 0, 'bottom' => 40, 'left' => 40, 'isLinked' => true, ], 'selectors' => [ '{{WRAPPER}} .jltma-children.jltma-comment-list' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_replies_border', 'selector' => '{{WRAPPER}} .jltma-children.jltma-comment-list' ] ); $this->add_responsive_control( 'jltma_comments_replies_border_radius', [ 'label' => esc_html__('Repies Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-children.jltma-comment-list' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Repies Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_replies_box_shadow', 'selector' => '{{WRAPPER}} .jltma-children.jltma-comment-list' ] ); $this->add_control( 'jltma_comments_reply_settings', [ 'label' => esc_html__('Reply Button Settings', 'master-addons' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before' ] ); $this->start_controls_tabs('jltma_comments_reply_tabs'); $this->start_controls_tab('jltma_comments_reply_tab', [ 'label' => esc_html__('Normal', 'master-addons' ) ]); $this->add_control( 'jltma_comments_reply_btn_bg_color', [ 'label' => esc_html__('Reply BG Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger' => 'background: {{VALUE}};' ] ] ); $this->add_control( 'jltma_comments_reply_text_color', [ 'label' => esc_html__('Reply Text Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '#78909c', 'selectors' => [ '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'jltma_comments_reply_typography', 'label' => esc_html__('Reply Typography', 'master-addons' ), 'selector' => '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_reply_border', 'selector' => '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger' ] ); $this->add_responsive_control( 'jltma_comments_reply_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_reply_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger' ] ); $this->end_controls_tab(); //Hover $this->start_controls_tab('jltma_comments_reply_hover_tabs', [ 'label' => esc_html__('Hover', 'master-addons' ) ]); $this->add_control( 'jltma_comments_reply_hover_btn_bg_color', [ 'label' => esc_html__('Reply BG Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button:hover, {{WRAPPER}} .jltma-comment-style_one .jltma-comment-footer a.jltma-show-replies-trigger:hover' => 'background: {{VALUE}};' ] ] ); $this->add_control( 'jltma_comments_reply_hover_text_color', [ 'label' => esc_html__('Reply Text Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '#fff', 'selectors' => [ '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button:hover, {{WRAPPER}} .jltma-comment-style_one .jltma-comment-footer a.jltma-show-replies-trigger:hover' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'jltma_comments_reply_hover_typography', 'label' => esc_html__('Reply Typography', 'master-addons' ), 'selector' => '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button:hover, {{WRAPPER}} .jltma-comment-style_one .jltma-comment-footer a.jltma-show-replies-trigger:hover', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_reply_hover_border', 'selector' => '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button:hover, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger:hover' ] ); $this->add_responsive_control( 'jltma_comments_reply_hover_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button:hover, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_reply_hover_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-footer .jltma-reply-button:hover, {{WRAPPER}} .jltma-comment-footer a.jltma-show-replies-trigger:hover' ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'jltma_comments_show_reply_heading', [ 'label' => esc_html__('Reply/Show Replies Button', 'master-addons' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_responsive_control( 'jltma_comments_reply_show_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .jltma-comment-style_one .jltma-body .jltma-edit-comments-wrapper, {{WRAPPER}} .jltma-comment-style_one .jltma-body .jltma-reply-button, {{WRAPPER}} .jltma-comment-style_two .jltma-body .jltma-reply-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->end_controls_section(); // Comment Form $this->start_controls_section( 'jltma_comments_form_start', [ 'label' => esc_html__('Comment Form', 'master-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'jltma_comments_form_background', 'label' => esc_html__('Background', 'master-addons' ), 'types' => ['classic', 'gradient'], 'selector' => '{{WRAPPER}} .jltma-comments-wrap .comment-respond', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'jltma_comments_form_typography', 'selector' => '{{WRAPPER}} .jltma-comments-wrap .comment-respond', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ], ] ); $this->add_control( 'jltma_comments_form_width', [ 'label' => esc_html__('Form Width', 'master-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'em', '%'], 'range' => [ 'px' => [ 'min' => 10, 'max' => 1500, ], 'em' => [ 'min' => 1, 'max' => 80, ], ], 'default' => [ 'unit' => '%', 'size' => '100' ], 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap .comment-respond' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'jltma_comments_form_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap .comment-respond' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comments_form_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap .comment-respond' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_form_border', 'selector' => '{{WRAPPER}} .jltma-comments-wrap .comment-respond' ] ); $this->add_responsive_control( 'jltma_comments_form_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comments-wrap .comment-respond' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_form_box_shadow', 'separator' => 'after', 'selector' => '{{WRAPPER}} .jltma-comments-wrap .comment-respond' ] ); $this->start_controls_tabs('jltma_comments_form_section_fields_tab'); $this->start_controls_tab('jltma_comments_form_fields_name_tab', [ 'label' => esc_html__('Name', 'master-addons' ), ]); $this->add_control( 'jltma_comments_form_fields_name_width', [ 'label' => esc_html__('Field Width', 'master-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'em', '%'], 'range' => [ 'px' => [ 'min' => 10, 'max' => 1500, ], 'em' => [ 'min' => 1, 'max' => 80, ], ], 'default' => [ 'unit' => '%', 'size' => '100' ], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-name' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'jltma_comments_form_fields_name_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comments_form_fields_name_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-name' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_form_fields_name_border', 'selector' => '{{WRAPPER}} .jltma-comment-form .jltma-name #author' ] ); $this->add_responsive_control( 'jltma_comments_form_fields_name_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-name #author' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_form_fields_name_box_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-form .jltma-name #author' ] ); $this->end_controls_tab(); //Email $this->start_controls_tab('jltma_comments_form_fields_email_tabs', [ 'label' => esc_html__('Email', 'master-addons' ) ]); $this->add_control( 'jltma_comments_form_fields_email_width', [ 'label' => esc_html__('Field Width', 'master-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'em', '%'], 'range' => [ 'px' => [ 'min' => 10, 'max' => 1500, ], 'em' => [ 'min' => 1, 'max' => 80, ], ], 'default' => [ 'unit' => '%', 'size' => '100' ], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-email' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'jltma_comments_form_fields_email_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-email' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comments_form_fields_email_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-email' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_form_fields_email_border', 'selector' => '{{WRAPPER}} .jltma-comment-form .jltma-email #email' ] ); $this->add_responsive_control( 'jltma_comments_form_fields_email_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-email #email' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_form_fields_email_box_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-form .jltma-email #email' ] ); $this->end_controls_tab(); //Website $this->start_controls_tab('jltma_comments_form_fields_url_tab', [ 'label' => esc_html__('Website', 'master-addons' ) ]); $this->add_control( 'jltma_comments_form_fields_url_width', [ 'label' => esc_html__('Field Width', 'master-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'em', '%'], 'range' => [ 'px' => [ 'min' => 10, 'max' => 1500, ], 'em' => [ 'min' => 1, 'max' => 80, ], ], 'default' => [ 'unit' => '%', 'size' => '100' ], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-url' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'jltma_comments_form_fields_url_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-url' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comments_form_fields_url_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-url' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_form_fields_url_border', 'selector' => '{{WRAPPER}} .jltma-comment-form .jltma-url #url' ] ); $this->add_responsive_control( 'jltma_comments_form_fields_url_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-url #url' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_form_fields_url_box_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-form .jltma-url #url' ] ); $this->end_controls_tab(); //Comment Box $this->start_controls_tab('jltma_comments_form_fields_textarea_tab', [ 'label' => esc_html__('Comment', 'master-addons' ) ]); $this->add_control( 'jltma_comments_form_fields_textarea_width', [ 'label' => esc_html__('Field Width', 'master-addons' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'em', '%'], 'range' => [ 'px' => [ 'min' => 10, 'max' => 1500, ], 'em' => [ 'min' => 1, 'max' => 80, ], ], 'default' => [ 'unit' => '%', 'size' => '100' ], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-comment' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'jltma_comments_form_fields_textarea_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-comment' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comments_form_fields_textarea_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-comment' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_form_fields_textarea_border', 'selector' => '{{WRAPPER}} .jltma-comment-form .jltma-comment #comment' ] ); $this->add_responsive_control( 'jltma_comments_form_fields_textarea_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-form .jltma-comment #comment' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_form_fields_textarea_box_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-form .jltma-comment #comment' ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); // Comment Submit $this->start_controls_section( 'jltma_comments_submit_start', [ 'label' => esc_html__('Comment Submit Button', 'master-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'jltma_comments_submit_background', 'label' => esc_html__('Background', 'master-addons' ), 'types' => ['classic', 'gradient'], 'selector' => '{{WRAPPER}} .jltma-comment-style_one .jltma-form-submit input.jltma-comment-form-submit', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'jltma_comments_submit_typography', 'selector' => '{{WRAPPER}} .jltma-comment-style_one .jltma-form-submit input.jltma-comment-form-submit', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ], ] ); $this->add_responsive_control( 'jltma_comments_submit_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .jltma-comment-style_one .jltma-form-submit input.jltma-comment-form-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comments_submit_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-style_one .jltma-form-submit input.jltma-comment-form-submit' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_submit_border', 'selector' => '{{WRAPPER}} .jltma-comment-style_one .jltma-form-submit input.jltma-comment-form-submit' ] ); $this->add_responsive_control( 'jltma_comments_submit_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-style_one .jltma-form-submit input.jltma-comment-form-submit' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_submit_box_shadow', 'separator' => 'after', 'selector' => '{{WRAPPER}} .jltma-comment-style_one .jltma-form-submit input.jltma-comment-form-submit' ] ); $this->end_controls_section(); /* * MA Comments Pagination */ $this->start_controls_section( 'jltma_comment_pagination_section_start', [ 'label' => esc_html__('Pagination', 'master-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'jltma_comment_pagination' => 'yes' ], ] ); $this->add_responsive_control( 'jltma_comment_pagination_pading', [ 'label' => esc_html__('Padding', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'separator' => 'before', 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'jltma_comment_pagination_margin', [ 'label' => esc_html__('Margin', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->start_controls_tabs('jltma_comments_pagination_tabs'); $this->start_controls_tab('jltma_comments_pagination_tab', [ 'label' => esc_html__('Normal', 'master-addons' ) ]); $this->add_control( 'jltma_comments_pagination_btn_bg_color', [ 'label' => esc_html__('BG Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a' => 'background: {{VALUE}};' ] ] ); $this->add_control( 'jltma_comments_pagination_text_color', [ 'label' => esc_html__('Text Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_pagination_border', 'selector' => '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a' ] ); $this->add_responsive_control( 'jltma_comments_pagination_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_pagination_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a' ] ); $this->end_controls_tab(); //Hover $this->start_controls_tab('jltma_comments_pagination_hover_tabs', [ 'label' => esc_html__('Hover', 'master-addons' ) ]); $this->add_control( 'jltma_comments_pagination_hover_btn_bg_color', [ 'label' => esc_html__('BG Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a:hover' => 'background: {{VALUE}};' ] ] ); $this->add_control( 'jltma_comments_pagination_hover_text_color', [ 'label' => esc_html__('Text Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a:hover' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_pagination_hover_border', 'selector' => '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a:hover' ] ); $this->add_responsive_control( 'jltma_comments_pagination_hover_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_pagination_hover_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a:hover' ] ); $this->end_controls_tab(); //Active $this->start_controls_tab('jltma_comments_pagination_active_tabs', [ 'label' => esc_html__('Active', 'master-addons' ) ]); $this->add_control( 'jltma_comments_pagination_active_btn_bg_color', [ 'label' => esc_html__('BG Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a.jltma-current-page' => 'background: {{VALUE}};' ] ] ); $this->add_control( 'jltma_comments_pagination_active_text_color', [ 'label' => esc_html__('Text Color', 'master-addons' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a.jltma-current-page' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'jltma_comments_pagination_active_border', 'selector' => '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a.jltma-current-page' ] ); $this->add_responsive_control( 'jltma_comments_pagination_active_border_radius', [ 'label' => esc_html__('Border Radius', 'master-addons' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a.jltma-current-page' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'label' => esc_html__('Box Shadow', 'master-addons' ), 'name' => 'jltma_comments_pagination_active_shadow', 'selector' => '{{WRAPPER}} .jltma-comment-pagination-wrapper.jltma-page-number li a.jltma-current-page' ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } public function jltma_comment_form($args = array(), $post_id = null) { if (null === $post_id) $post_id = get_the_ID(); // Exit the function when comments for the post are closed. if (!comments_open($post_id)) { do_action('comment_form_comments_closed'); return; } $commenter = wp_get_current_commenter(); $user = wp_get_current_user(); $user_identity = $user->exists() ? $user->display_name : ''; $args = wp_parse_args($args); if (!isset($args['format'])) $args['format'] = current_theme_supports('html5', 'comment-form') ? 'html5' : 'xhtml'; $req = get_option('require_name_email'); $aria_req = ($req ? " aria-required='true'" : ''); $html_req = ($req ? " required='required'" : ''); $html5 = 'html5' === $args['format']; $fields = array( 'author' => '
', 'email' => '' . '
', 'url' => '' . '
', ); /* translators: %s is the required field marker (HTML span). */ $required_text = sprintf(' ' . esc_html__('Required fields are marked %s', 'master-addons'), '*'); $fields = apply_filters('comment_form_default_fields', $fields); $defaults = array( 'fields' => $fields, 'comment_field' => '', 'must_log_in' => '
' . sprintf( /* translators: %s is the login URL. */ esc_html__('You must be logged in to post a comment.', 'master-addons'), wp_login_url(apply_filters('the_permalink', get_permalink($post_id), $post_id)) ) . '
', 'logged_in_as' => '' . sprintf( /* translators: %1$s is the user profile URL, %2$s is the aria-label, %3$s is the user's name, %4$s is the logout URL. */ esc_html__('Logged in as %3$s. Log out?', 'master-addons'), get_edit_user_link(), /* translators: %s is the user's display name. */ esc_attr(sprintf(__('Logged in as %s. Edit your profile.', 'master-addons'), $user_identity)), $user_identity, wp_logout_url(apply_filters('the_permalink', get_permalink($post_id), $post_id)) ) . '
', 'comment_notes_before' => '' . esc_html__('Your email address will not be published.', 'master-addons') . '' . ($req ? $required_text : '') . '
', 'comment_notes_after' => '', 'action' => site_url('/wp-comments-post.php'), 'id_form' => 'commentform', 'id_submit' => 'submit', 'class_form' => 'comment-form', 'class_submit' => 'submit', 'name_submit' => 'submit', 'title_reply' => esc_html__('Leave a Reply', 'master-addons' ), /* translators: %s is a reply-to name. */ 'title_reply_to' => esc_html__('Leave a Reply to %s', 'master-addons'), 'title_reply_before' => '%1$s %2$s
', 'format' => 'xhtml', ); $args = wp_parse_args($args, apply_filters('comment_form_defaults', $defaults)); $args = array_merge($defaults, $args); do_action('comment_form_before'); ?>' . /* translators: 1: Anchor tag start, 2: Anchor tag end. */ sprintf(esc_html__('You must be %1$slogged in%2$s to post a comment.', 'master-addons' ), '', '') . '
', 'logged_in_as' => '' . /* translators: 1: Profile link, 2: Log Out Link. */ sprintf(esc_html__('Logged in as %1$s. %2$sLog out »%3$s', 'master-addons' ), '' . esc_html($user_identity) . '', '', '') . '
', 'comment_notes_before' => $comment_notes_before, 'comment_notes_after' => $comment_notes_after, 'cancel_reply_link' => $cancel_reply_link, 'id_submit' => 'jltma-comment-submit', 'class_submit' => 'jltma-comment-form-submit', 'label_submit' => $label_submit, 'submit_button' => '', // 'submit_field' => '