start_controls_section( 'section_content', [ 'label' => __( 'Post Content', 'admore-widgets-suite' ), ] ); $this->add_control( 'content_notice', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => '
' . '' . __( 'Dynamic Widget', 'admore-widgets-suite' ) . '
' . __( 'Outputs the_content() of the current post/page. Use inside Theme Builder single templates.', 'admore-widgets-suite' ) . '
', 'content_classes' => 'elementor-panel-alert', ] ); $this->end_controls_section(); $this->start_controls_section( 'style_content', [ 'label' => __( 'Content', 'admore-widgets-suite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'selector' => '{{WRAPPER}} .eppro-post-content', ] ); $this->add_control( 'content_color', [ 'label' => __( 'Text Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eppro-post-content' => 'color: {{VALUE}};' ], ] ); $this->add_control( 'link_color', [ 'label' => __( 'Link Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eppro-post-content a' => 'color: {{VALUE}};' ], ] ); $this->add_control( 'link_hover_color', [ 'label' => __( 'Link Hover Color', 'admore-widgets-suite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eppro-post-content a:hover' => 'color: {{VALUE}};' ], ] ); $this->add_responsive_control( 'content_padding', [ 'label' => __( 'Padding', 'admore-widgets-suite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eppro-post-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); } protected function render(): void { if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) { echo '

' . esc_html__( '[Post Content will appear here on the live page]', 'admore-widgets-suite' ) . '

'; return; } echo '
'; the_content(); echo '
'; } }