ultp_allowed_html_tags() ); $attr['metaSeparator'] = sanitize_html_class( $attr['metaSeparator'] ); $attr['metaStyle'] = sanitize_html_class( $attr['metaStyle'] ); $attr['className'] = isset( $attr['className'] ) ? sanitize_html_class( $attr['className'] ) : ''; $avatar = get_avatar_url( $user_id ); $meta = $metaCondition ? $attr['metaList'] : ( isset( $attr['metaListSmall'] ) ? $attr['metaListSmall'] : $attr['metaList'] ); $meta = json_decode( $meta ); $meta = is_array( $meta ) ? $meta : array(); $authorImgOnly = in_array( 'metaAuthor', $meta ) ? '' . __( 'By', 'ultimate-post' ) . '' : ''; $authorImg = in_array( 'metaAuthor', $meta ) ? '' . __( 'By', 'ultimate-post' ) . '' . $attr['metaAuthorPrefix'] . '' . $display_name . '' : ''; $authorIcon = in_array( 'metaAuthor', $meta ) ? '' . ultimate_post()->get_svg_icon( 'user' ) . '' . $display_name . '' : ''; $authorBy = in_array( 'metaAuthor', $meta ) ? '' . $attr['metaAuthorPrefix'] . '' . $display_name . '' : ''; // Author Filter Hook $authorImgOnly = apply_filters( 'postx_loop_author_image_only', $authorImgOnly, $user_id, $post_id, isset( $attr['className'] ) ? $attr['className'] : '' ); $authorImg = apply_filters( 'postx_loop_author_image', $authorImg, $user_id, $post_id, isset( $attr['className'] ) ? $attr['className'] : '' ); $authorIcon = apply_filters( 'postx_loop_author_icon', $authorIcon, $user_id, $post_id, isset( $attr['className'] ) ? $attr['className'] : '' ); $authorBy = apply_filters( 'postx_loop_author_by', $authorBy, $user_id, $post_id, isset( $attr['className'] ) ? $attr['className'] : '' ); $date = in_array( 'metaDate', $meta ) ? '' . $time . '' : ''; $dateIcon = in_array( 'metaDate', $meta ) ? '' . ultimate_post()->get_svg_icon( 'calendar' ) . $time . '' : ''; $dateModified = in_array( 'metaDateModified', $meta ) ? '' . $timeModified . '' : ''; $dateModifiedIcon = in_array( 'metaDateModified', $meta ) ? '' . ultimate_post()->get_svg_icon( 'calendar' ) . $timeModified . '' : ''; $comments = in_array( 'metaComments', $meta ) ? '' . $comment . esc_html__( ' comments', 'ultimate-post' ) . '' : ''; $commentsIcon = in_array( 'metaComments', $meta ) ? '' . ultimate_post()->get_svg_icon( 'comment' ) . $comment . '' : ''; $views = in_array( 'metaView', $meta ) ? '' . $view . esc_html__( ' views', 'ultimate-post' ) . '' : ''; $viewIcon = in_array( 'metaView', $meta ) ? '' . ultimate_post()->get_svg_icon( 'eye' ) . $view . '' : ''; $postTime = in_array( 'metaTime', $meta ) ? '' . $post_time . esc_html__( ' ago', 'ultimate-post' ) . '' : ''; $postTimeIcon = in_array( 'metaTime', $meta ) ? '' . ultimate_post()->get_svg_icon( 'clock' ) . $post_time . esc_html__( ' ago', 'ultimate-post' ) . '' : ''; $reading = in_array( 'metaRead', $meta ) ? '' . $reading_time . '' : ''; $readingIcon = in_array( 'metaRead', $meta ) ? '' . ultimate_post()->get_svg_icon( 'book' ) . $reading_time . '' : ''; $post_loop .= '
'; if ( $attr['metaStyle'] == 'noIcon' ) { $post_loop .= $authorBy . $date . $dateModified . $comments . $views . $reading . $postTime; } if ( $attr['metaStyle'] == 'icon' ) { $post_loop .= $authorIcon . $dateIcon . $dateModifiedIcon . $commentsIcon . $viewIcon . $postTimeIcon . $readingIcon; } if ( $attr['metaStyle'] == 'style2' ) { $post_loop .= $authorBy . $dateIcon . $dateModifiedIcon . $commentsIcon . $viewIcon . $postTimeIcon . $readingIcon; } if ( $attr['metaStyle'] == 'style3' ) { $post_loop .= $authorImg . $dateIcon . $dateModifiedIcon . $commentsIcon . $viewIcon . $postTimeIcon . $readingIcon; } if ( $attr['metaStyle'] == 'style4' ) { $post_loop .= $authorIcon . $dateIcon . $dateModifiedIcon . $commentsIcon . $viewIcon . $postTimeIcon . $readingIcon; } if ( $attr['metaStyle'] == 'style5' ) { $post_loop .= '
' . $authorImgOnly . '
' . $authorBy . $dateIcon . $dateModifiedIcon . $commentsIcon . $viewIcon . $postTimeIcon . $readingIcon . '
'; } if ( $attr['metaStyle'] == 'style6' ) { $post_loop .= $authorImgOnly . $authorBy . $dateIcon . $dateModifiedIcon . $commentsIcon . $viewIcon . $postTimeIcon . $readingIcon; } $post_loop .= '
'; }