$dir_name, 'file_name' => $this->get_filename_only($template), 'name' => $this->process_directory_name()], 1) . ' data-widget="' . $this->get_id() . '" data-class="' . get_class($this) . '" data-args="' . http_build_query($args) . '" data-settings="' . http_build_query($data_settings) . '" data-page="1" data-scroll-on-pagination="' . esc_attr( $eael_post_list_scroll_on_pagination ) . '" data-scroll-offset="' . esc_attr( $eael_post_list_scroll_offset ) . '" >
' . __($settings['eael_post_list_topbar_term_all_text'], 'essential-addons-elementor') . '';
if (!empty($args['tax_query'])) {
foreach ($args['tax_query'] as $taxonomy) {
if (!empty($taxonomy['terms'])) {
foreach ($taxonomy['terms'] as $term_id) {
$term = get_term($term_id, $taxonomy['taxonomy']);
if (is_object($term)) {
echo '
' . $term->name . '';
}
}
}
}
}
echo '
';
}
if ($settings['eael_post_list_layout_type'] == 'advanced' && $settings['eael_enable_ajax_post_search'] == 'yes') {
$postType = $settings['post_type'] == 'by_id' ? 'any' : $settings['post_type'];
echo '';
if ($settings['eael_post_list_featured_area'] == 'yes' && !empty($settings['featured_posts'])) {
global $post;
$post = get_post(intval($settings['featured_posts']));
setup_postdata($post);
$category = wp_get_object_terms( get_the_ID(), get_object_taxonomies( get_post_type( get_the_ID() ) ) );
$featured_image_url = Group_Control_Image_Size::get_attachment_image_src(
get_post_thumbnail_id(),
'featured_image_size',
$settings
);
if ($settings['eael_post_list_layout_type'] == 'preset-2') {
echo '
';
if ($settings['eael_post_list_post_cat'] != '' && !empty($category[0]->term_id)) {
echo '
';
}
if ($settings['eael_post_list_featured_meta'] === 'yes') {
echo '
';
}
if ($settings['eael_post_list_featured_title'] == 'yes' && !empty($settings['eael_post_list_title_tag'])) {
echo '<' . Helper::eael_pro_validate_html_tag($settings['eael_post_list_title_tag']) . ' class="eael-post-list-title">
' . get_the_title() . '
' . Helper::eael_pro_validate_html_tag($settings['eael_post_list_title_tag']) . '>';
}
if ($settings['eael_post_list_featured_excerpt'] === 'yes') {
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 '
';
} else {
echo '
';
if ($settings['eael_post_list_layout_type'] == 'default' && $settings['eael_post_list_post_cat'] != '' && !empty($category[0]->term_id)) {
echo '
';
}
if ($settings['eael_post_list_featured_meta'] === 'yes') {
echo '
';
}
if ($settings['eael_post_list_featured_title'] == 'yes' && !empty($settings['eael_post_list_title_tag'])) {
echo '<' . Helper::eael_pro_validate_html_tag($settings['eael_post_list_title_tag']) . ' class="eael-post-list-title">
' . get_the_title() . '
' . Helper::eael_pro_validate_html_tag($settings['eael_post_list_title_tag']) . '>';
}
if ($settings['eael_post_list_featured_excerpt'] === 'yes') {
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_reset_postdata();
}
// list
$template = $this->get_template($this->get_settings('eael_post_list_layout_type'));
if (file_exists($template)) {
$query = new \WP_Query($args);
if ($query->have_posts()) {
$iterator = 0;
echo '
';
while ($query->have_posts()) {
$query->the_post();
include($template);
}
echo '
';
} else {
_e('
No posts found!
', 'essential-addons-elementor');
}
wp_reset_postdata();
}else {
_e('
No layout found!
', 'essential-addons-elementor');
}
echo '
';
if ($settings['eael_post_list_pagination'] === 'yes') {
$eael_post_list_pagination_prev_icon = (isset($settings['__fa4_migrated']['eael_post_list_pagination_prev_icon_new']) || empty($settings['eael_post_list_pagination_prev_icon']) ? $settings['eael_post_list_pagination_prev_icon_new']['value'] : $settings['eael_post_list_pagination_prev_icon']);
$eael_post_list_pagination_next_icon = (isset($settings['__fa4_migrated']['eael_post_list_pagination_next_icon_new']) || empty($settings['eael_post_list_pagination_next_icon']) ? $settings['eael_post_list_pagination_next_icon_new']['value'] : $settings['eael_post_list_pagination_next_icon']);
$dir_name = method_exists( $this, 'get_temp_dir_name' ) ? $this->get_temp_dir_name( $this->get_filename_only($template) ) : "pro";
echo '';
}
}
}