absint( $post_count ),
'post__not_in' => array( get_the_ID() )
);
if( $related_posts_filter_by === 'category' ) :
$current_post_categories = get_the_category(get_the_ID());
if( $current_post_categories ) :
foreach( $current_post_categories as $current_post_cat ) :
$query_cats[] = $current_post_cat->term_id;
endforeach;
$related_posts_args['category__in'] = $query_cats;
endif;
else :
$current_post_tags = get_the_tags(get_the_ID());
if( $current_post_tags ) :
foreach( $current_post_tags as $current_post_tag ) :
$query_tags[] = $current_post_tag->term_id;
endforeach;
$related_posts_args['tag__in'] = $query_tags;
endif;
endif;
$related_posts = new WP_Query( $related_posts_args );
if( ! $related_posts->have_posts() ) return;
$show_on_popup = true;
?>
';
?>
' .wp_kses_post( paginate_links( array( 'prev_text' => '', 'next_text' => '', 'type' => 'list' ) ) ). '';
}
add_action( 'bloginwp_pagination_link_hook', 'bloginwp_pagination_fnc' );
endif;