start_controls_section( 'section_style', [ 'label' => __( 'Style', 'betterdocs' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'print_btn', [ 'label' => __( 'Print Button', 'betterdocs' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'betterdocs' ), 'label_off' => __( 'Hide', 'betterdocs' ), 'return_value' => '1', 'default' => '1', ] ); $this->add_responsive_control( 'align', [ 'label' => __( 'Alignment', 'betterdocs' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'betterdocs' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'betterdocs' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'betterdocs' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'betterdocs' ), 'icon' => 'eicon-text-align-justify', ], ], 'selectors' => [ '{{WRAPPER}}' => 'text-align: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'betterdocs_content_typography', 'scheme' => Schemes\Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .betterdocs-content', ] ); $this->add_control( 'doc_content_color', [ 'label' => __( 'Doc Content Color', 'betterdocs' ), 'type' => Controls_Manager::COLOR, 'scheme' => [ 'type' => Schemes\Color::get_type(), 'value' => Schemes\Color::COLOR_1, ], 'selectors' => [ '{{WRAPPER}} .betterdocs-content' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'doc_content_title_color', [ 'label' => __( 'Content Title Color', 'plugin-domain' ), 'type' => Controls_Manager::COLOR, 'scheme' => [ 'type' => Schemes\Color::get_type(), 'value' => Schemes\Color::COLOR_1, ], 'selectors' => [ '{{WRAPPER}} .betterdocs-content .betterdocs-content-heading' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'betterdocs_content_title_typography', 'scheme' => Schemes\Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .betterdocs-content .betterdocs-content-heading', ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $this->add_render_attribute('betterdocs-content', 'id', ['betterdocs-single-content']); $this->add_render_attribute('betterdocs-content', 'class', ['betterdocs-entry-content']); if($settings['print_btn'] == 1) { echo '