* @link https://www.elicus.com/ * @copyright 2023 Elicus Technologies Private Limited * @version 1.7.1 */ $allowed_tags = array( 'div' => array( 'class' => true, 'id' => true, ), 'p' => array( 'class' => true, 'id' => true, ), 'h1' => array( 'class' => true, 'id' => true, ), 'h2' => array( 'class' => true, 'id' => true, ), 'h3' => array( 'class' => true, 'id' => true, ), 'h4' => array( 'class' => true, 'id' => true, ), 'h5' => array( 'class' => true, 'id' => true, ), 'h6' => array( 'class' => true, 'id' => true, ), 'ul' => array( 'class' => true, 'id' => true, ), 'ol' => array( 'class' => true, 'id' => true, ), 'li' => array( 'class' => true, 'id' => true, ), 'a' => array( 'href' => true, 'title' => true, 'class' => true, 'id' => true, 'target' => true, 'rel' => true, ), 'abbr' => array( 'title' => true, ), 'acronym' => array( 'title' => true, ), 'b' => array(), 'blockquote' => array( 'cite' => true, ), 'cite' => array(), 'code' => array(), 'del' => array( 'datetime' => true, ), 'em' => array(), 'i' => array(), 'q' => array( 'cite' => true, ), 's' => array(), 'strike' => array(), 'strong' => array(), 'span' => array( 'class' => true, 'id' => true, ), ); $output .= '
'; // Post Featured Image Wrapper. if ( '' !== $thumb && 'on' === $show_thumbnail ) { $output .= '
'; $output .= ''; $output .= et_core_intentionally_unescaped( $thumb, 'html' ); $output .= ''; $output .= '
'; } // Post Meta. if ( 'on' === $show_author || 'on' === $show_comments ) { $author_id = get_the_author_meta( 'ID' ); $author_image = get_avatar( $author_id, '48' ); $output .= sprintf( '
%1$s%2$s
', ( 'on' === $show_author ? sprintf( '%1$s%2$s', $author_image, get_the_author_posts_link() ) : '' ), ( 'on' === $show_comments ? et_get_safe_localization( sprintf( '%s', esc_html( number_format_i18n( get_comments_number( $post_id ) ) ) ) ) : '' ) ); } // Post Content Wrapper. $output .= '
'; // Post Title. if ( 'on' === $show_title ) { $output .= '<' . esc_html( $processed_title_level ) . ' class="dipl_blog_slider_post_title">' . wp_kses( get_the_title( $post_id ), $allowed_tags ) . ''; } // Post Excerpt or Content. if ( 'on' === $show_content ) { $post_content = get_the_content( null, false, $post_id ); global $more; // page builder doesn't support more tag, so display the_content() in case of post made with page builder. if ( et_pb_is_pagebuilder_used( $post_id ) ) { //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $more = 1; $content = et_core_intentionally_unescaped( do_shortcode( $post_content ), 'html' ); if ( '' !== $content ) { $output .= '
' . $content . '
'; } } else { //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $more = null; $content = wp_kses_post( dipl_strip_shortcodes( apply_filters( 'the_content', $post_content ) ) ); if ( '' !== $content ) { $output .= '
' . $content . '
'; } } } else { if ( has_excerpt() && '' !== trim( get_the_excerpt( $post_id ) ) && 0 !== intval( $excerpt_length ) ) { $excerpt = wpautop( dipl_strip_shortcodes( get_the_excerpt( $post_id ) ) ); if ( '' !== $excerpt ) { $output .= '
' . $excerpt . '
'; } } else { if ( 0 !== intval( $excerpt_length ) ) { $excerpt = wpautop( strip_shortcodes( dipl_truncate_post( $excerpt_length, false, $post_id, true ) ) ); if ( '' !== $excerpt ) { $output .= '
' . $excerpt . '
'; } } } if ( 'on' === $show_read_more ) { $read_more = sprintf( '', et_core_intentionally_unescaped( $read_more_button, 'html' ) ); $output .= et_core_intentionally_unescaped( $read_more, 'html' ); } } $output .= '
'; // Post Categories & Date if ( 'on' === $show_categories || 'on' === $show_date ) { $categories = ( isset( $category_background_color ) && '' !== $category_background_color ) ? get_the_category_list( '', 'empty_string', $post_id ) : get_the_category_list( ', ', 'empty_string', $post_id ); $output .= sprintf( '
%1$s%2$s
', ( 'on' === $show_categories && '' !== $categories ? et_get_safe_localization( sprintf( '
%1$s
', $categories ) ) : '' ), ( 'on' === $show_date ? et_get_safe_localization( sprintf( '%s', esc_html( get_the_date( $post_date, $post_id ) ) ) ) : '' ) ); } $output .= '
';