post_author ); $user_meta[] = sprintf( '%s %s', esc_html__( 'by', 'all-in-one-video-gallery' ), esc_url( $author_url ), esc_html( get_the_author() ) ); } if ( count( $user_meta ) ) { printf( '
%s
', esc_html__( 'Posted', 'all-in-one-video-gallery' ) . ' ' . implode( ' ', $user_meta ) ); } // Category(s) if ( $attributes['show_category'] && ! empty( $attributes['categories'] ) ) { $term_meta = array(); foreach ( $attributes['categories'] as $category ) { $category_url = aiovg_get_category_page_url( $category ); $term_meta[] = sprintf( '%s', esc_url( $category_url ), esc_html( $category->name ) ); } printf( '
%s
', implode( ', ', $term_meta ) ); } // Tag(s) if ( $attributes['show_tag'] && ! empty( $attributes['tags'] ) ) { $term_meta = array(); foreach ( $attributes['tags'] as $tag ) { $tag_url = aiovg_get_tag_page_url( $tag ); $term_meta[] = sprintf( '%s', esc_url( $tag_url ), esc_html( $tag->name ) ); } printf( '
%s
', implode( ', ', $term_meta ) ); } ?>
term_id; } $atts[] = 'category="' . implode( ',', $ids ) . '"'; } if ( ! empty( $attributes['tags'] ) ) { $ids = array(); foreach ( $attributes['tags'] as $tag ) { $ids[] = $tag->term_id; } $atts[] = 'tag="' . implode( ',', $ids ) . '"'; } $atts[] = 'related="1"'; $atts[] = 'exclude="' . (int) $attributes['id'] . '"'; $atts[] = 'show_count="0"'; $atts[] = 'columns="' . (int) $attributes['columns'] . '"'; $atts[] = 'limit="' . (int) $attributes['limit'] . '"'; $atts[] = 'orderby="' . sanitize_text_field( $attributes['orderby'] ) . '"'; $atts[] = 'order="' . sanitize_text_field( $attributes['order'] ) . '"'; $atts[] = 'show_pagination="' . (int) $attributes['show_pagination'] . '"'; $related_videos = do_shortcode( '[aiovg_videos ' . implode( ' ', $atts ) . ']' ); if ( $related_videos != aiovg_get_message( 'videos_empty' ) ) { echo $related_videos; } }