start_controls_section(‘content_section’, [‘label’ => ‘Content’,’tab’ => \Elementor\Controls_Manager::TAB_CONTENT,]);
$this->add_control(‘visible_text’, [‘label’ => ‘Visible Text’,’type’ => \Elementor\Controls_Manager::TEXTAREA,’default’ => ‘This is the short visible text.’,]);
$this->add_control(‘hidden_text’, [‘label’ => ‘Hidden Text’,’type’ => \Elementor\Controls_Manager::TEXTAREA,’default’ => ‘This is the rest of the text that expands inline.’,]);
$this->add_control(‘read_more_label’, [‘label’ => ‘Read More Label’,’type’ => \Elementor\Controls_Manager::TEXT,’default’ => ‘…read more’,]);
$this->add_control(‘read_less_label’, [‘label’ => ‘Read Less Label’,’type’ => \Elementor\Controls_Manager::TEXT,’default’ => ‘ read less’,]);
$this->end_controls_section();
$this->start_controls_section(‘style_text_section’, [‘label’ => ‘Text Style’,’tab’ => \Elementor\Controls_Manager::TAB_STYLE,]);
$this->add_control(‘text_color’, [‘label’ => ‘Text Color’,’type’ => \Elementor\Controls_Manager::COLOR,’selectors’ => [‘{{WRAPPER}} .read-more-wrapper’ => ‘color: {{VALUE}};’],]);
$this->add_group_control(\Elementor\Group_Control_Typography::get_type(), [‘name’ => ‘text_typography’,’selector’ => ‘{{WRAPPER}} .read-more-wrapper, {{WRAPPER}} .read-more-wrapper .hidden-part, {{WRAPPER}} .read-more-wrapper .visible-part’,]);
$this->end_controls_section();
$this->start_controls_section(‘style_link_section’, [‘label’ => ‘Link Style’,’tab’ => \Elementor\Controls_Manager::TAB_STYLE,]);
$this->add_group_control(\Elementor\Group_Control_Typography::get_type(), [‘name’ => ‘link_typography’,’selector’ => ‘{{WRAPPER}} .read-more-toggle’,]);
$this->start_controls_tabs(‘link_colors’);
$this->start_controls_tab(‘link_normal’, [‘label’ => ‘Read More’]);
$this->add_control(‘link_color’, [‘label’ => ‘Color’,’type’ => \Elementor\Controls_Manager::COLOR,’selectors’ => [‘{{WRAPPER}} .read-more-toggle.is-more’ => ‘color: {{VALUE}};’],]);
$this->end_controls_tab();
$this->start_controls_tab(‘link_less’, [‘label’ => ‘Read Less’]);
$this->add_control(‘link_color_less’, [‘label’ => ‘Color’,’type’ => \Elementor\Controls_Manager::COLOR,’selectors’ => [‘{{WRAPPER}} .read-more-toggle.is-less’ => ‘color: {{VALUE}};’],]);
$this->end_controls_tab();
$this->start_controls_tab(‘link_hover’, [‘label’ => ‘Hover’]);
$this->add_control(‘link_hover_color’, [‘label’ => ‘Hover Color’,’type’ => \Elementor\Controls_Manager::COLOR,’selectors’ => [‘{{WRAPPER}} .read-more-toggle:hover’ => ‘color: {{VALUE}};’],]);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
$uid = ‘rm-‘ . $this->get_id();
?>