* Read More Button Style Controls */ do_action('eael/controls/read_more_button_style', $this); } protected function render() { $settings = $this->get_settings_for_display(); $settings = Helper::fix_old_query($settings); $args = Helper::get_query_args($settings); if (!isset($this->page_id)) { if ( Plugin::$instance->documents->get_current() ) { $this->page_id = Plugin::$instance->documents->get_current()->get_main_id(); }else{ $this->page_id = null; } } $data_settings = [ 'eael_post_list_post_feature_image' => $settings['eael_post_list_post_feature_image'], 'eael_post_list_post_meta' => $settings['eael_post_list_post_meta'], 'eael_post_list_post_title' => $settings['eael_post_list_post_title'], 'eael_post_list_post_excerpt' => $settings['eael_post_list_post_excerpt'], 'eael_post_list_post_excerpt_length' => $settings['eael_post_list_post_excerpt_length'], 'eael_post_list_featured_area' => $settings['eael_post_list_featured_area'], 'eael_post_list_featured_meta' => $settings['eael_post_list_featured_meta'], 'eael_post_list_featured_title' => $settings['eael_post_list_featured_title'], 'eael_post_list_featured_excerpt' => $settings['eael_post_list_featured_excerpt'], 'eael_post_list_featured_excerpt_length' => $settings['eael_post_list_featured_excerpt_length'], 'featured_posts' => $settings['featured_posts'], 'eael_post_list_pagination' => $settings['eael_post_list_pagination'], 'eael_post_list_layout_type' => $settings['eael_post_list_layout_type'], 'eael_post_list_post_cat' => $settings['eael_post_list_post_cat'], 'eael_post_list_author_meta' => $settings['eael_post_list_author_meta'], 'eael_post_list_title_tag' => Helper::eael_pro_validate_html_tag($settings['eael_post_list_title_tag']), 'eael_show_read_more_button' => $settings['eael_show_read_more_button'], 'eael_post_list_read_more_text' => $settings['eael_post_list_read_more_text'], 'eael_post_list_excerpt_expanison_indicator' => $settings['eael_post_list_excerpt_expanison_indicator'], 'eael_post_featured_image_size' => $settings['eael_post_featured_image_size'], ]; $link_settings = [ 'image_link_nofollow' => $settings['image_link_nofollow'] ? 'rel="nofollow"' : '', 'image_link_target_blank' => $settings['image_link_target_blank'] ? 'target="_blank"' : '', 'title_link_nofollow' => $settings['title_link_nofollow'] ? 'rel="nofollow"' : '', 'title_link_target_blank' => $settings['title_link_target_blank'] ? 'target="_blank"' : '', 'read_more_link_nofollow' => $settings['read_more_link_nofollow'] ? 'rel="nofollow"' : '', 'read_more_link_target_blank' => $settings['read_more_link_target_blank'] ? 'target="_blank"' : '', ]; $eael_post_list_scroll_on_pagination = ! empty( $settings['eael_post_list_scroll_on_pagination'] ) && 'yes' === $settings['eael_post_list_scroll_on_pagination'] ? 1 : 0; $eael_post_list_scroll_offset = ! empty( $settings['eael_post_list_scroll_offset'] ) ? intval( $settings['eael_post_list_scroll_offset'] ) : 100; $this->add_render_attribute( 'post-list-wrapper-attribute', [ 'class' => ['eael-post-list-container', $settings['eael_post_list_layout_type']], ] ); if ($settings['eael_post_list_layout_type']) { $this->add_render_attribute('post-list-wrapper-attribute', 'class', "layout-{$settings['eael_post_list_layout_type']}"); } echo '
' . wp_trim_words(strip_shortcodes(get_the_excerpt() ? get_the_excerpt() : get_the_content()), $settings['eael_post_list_featured_excerpt_length'], $settings['eael_post_list_excerpt_expanison_indicator']) . '
'; } echo '' . wp_trim_words(strip_shortcodes(get_the_excerpt() ? get_the_excerpt() : get_the_content()), $settings['eael_post_list_featured_excerpt_length'], $settings['eael_post_list_excerpt_expanison_indicator']) . '
'; } echo 'No posts found!
', 'essential-addons-elementor'); } wp_reset_postdata(); }else { _e('No layout found!
', 'essential-addons-elementor'); } echo '