'; } else { if ( is_front_page() ) { $logo = '

' . get_bloginfo( 'name' ) . '

'; } else { $logo = '

' . get_bloginfo( 'name' ) . '

'; } } return $logo; } endif; if ( ! function_exists( 'hestia_category' ) ) : /** * Display the first category of the post. * * @since Hestia 1.0 */ function hestia_category() { $category = get_the_category(); if ( $category ) { echo '' . esc_html( $category[0]->name ) . ' '; } } endif; if ( ! function_exists( 'hestia_pagination' ) ) : /** * Display a custom number page navigation. * * @since Hestia 1.0 */ function hestia_pagination() { global $wp_query; $big = 999999999; // need an unlikely integer $pages = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $wp_query->max_num_pages, 'type' => 'array', ) ); if ( is_array( $pages ) ) { echo '
'; } } endif; if ( ! function_exists( 'hestia_get_author' ) ) : /** * Returns the author meta data outside the loop. * * @since Hestia 1.0 */ function hestia_get_author( $info ) { global $post; $author_id = $post->post_author; $author = get_the_author_meta( $info, $author_id ); return $author; } endif; if ( ! function_exists( 'hestia_author_box' ) ) : /** * Display author box below the posts. * * @since Hestia 1.0 */ function hestia_author_box() { ?>

'', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'nextpagelink' => esc_html__( 'Next page', 'hestia-pro' ), 'previouspagelink' => esc_html__( 'Previous page', 'hestia-pro' ), 'pagelink' => '%', 'echo' => 1, ); $r = wp_parse_args( $args, $defaults ); $r = apply_filters( 'wp_link_pages_args', $r ); global $page, $numpages, $multipage, $more, $pagenow; $output = ''; if ( $multipage ) { if ( 'number' == $r['next_or_number'] ) { $output .= $r['before']; for ( $i = 1; $i < ( $numpages + 1 ); $i = $i + 1 ) { $j = str_replace( '%', $i, $r['pagelink'] ); $output .= ' '; $output .= $r['link_before']; if ( $i != $page || ( ( ! $more ) && ( $page == 1 ) ) ) { $output .= _wp_link_page( $i ); } else { $output .= ''; } $output .= $j; if ( $i != $page || ( ( ! $more ) && ( $page == 1 ) ) ) { $output .= ''; } else { $output .= ''; } $output .= $r['link_after']; } $output .= $r['after']; } else { if ( $more ) { $output .= $r['before']; $i = $page - 1; if ( $i && $more ) { $output .= _wp_link_page( $i ); $output .= $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . ''; } $i = $page + 1; if ( $i <= $numpages && $more ) { $output .= _wp_link_page( $i ); $output .= $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . ''; } $output .= $r['after']; } }// End if(). }// End if(). if ( $r['echo'] ) { echo wp_kses( $output, array( 'div' => array( 'class' => array(), 'id' => array(), ), 'ul' => array( 'class' => array(), ), 'a' => array( 'href' => array(), ), 'li' => array(), 'span' => array( 'class' => array(), ), ) ); } return $output; } endif; if ( ! function_exists( 'hestia_comments_list' ) ) : /** * Custom list of comments for the theme. * * @since Hestia 1.0 */ function hestia_comments_list( $comment, $args, $depth ) { ?>
id="comment-">

'; } $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); $args = array( 'class_form' => 'form', 'class_submit' => 'btn btn-primary pull-right', 'title_reply_before' => '

', 'title_reply_after' => '

' . $current_user . '
', 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '
', 'email' => '
', 'url' => '
', ) ), 'comment_field' => '
', ); return $args; } endif; if ( ! function_exists( 'hestia_comments_pagination' ) ) : /** * Display a custom number page navigation for comments. * * @since Hestia 1.0 */ function hestia_comments_pagination() { $pages = paginate_comments_links( array( 'echo' => false, 'type' => 'array', ) ); if ( is_array( $pages ) ) { echo '
'; } } endif; if ( ! function_exists( 'hestia_related_posts' ) ) : /** * Related posts for single view. * * @since Hestia 1.0 */ function hestia_related_posts() { global $post; $cats = wp_get_object_terms( $post->ID, 'category', array( 'fields' => 'ids' ) ); $args = array( 'posts_per_page' => 3, 'cat' => $cats, 'orderby' => 'rand', 'ignore_sticky_posts' => true, 'post__not_in' => array( $post->ID ), ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) : ?>

have_posts() ) : $loop->the_post(); ?>
{$image[1]} × {$image[2]}"; } } /* Join the links in a string and return. */ return join( ' | ', $links ); } endif;