$category ): if ($index > 0) : $categories_output .= $separator; endif; $categories_output .= '' . esc_html( $category->name ) . ''; endforeach; endif; if ( 'post' == get_post_type() && ! empty( $categories_output ) ) : $output .= '
' . $categories_output . '
'; endif; if ( $echo ) { echo html_entity_decode( esc_html( $output ) ); } else { return $output; } } } if ( ! function_exists( 'arendelle_meta_date' ) ) { /** * Prints HTML with meta information for the current post-date/time. */ function arendelle_meta_date() { if ( is_single() ) { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( DATE_W3C ) ), esc_html( get_the_modified_date() ) ); } else { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date( 'd' ) ), esc_html( get_the_date( 'M' ) ), esc_attr( get_the_modified_date( DATE_W3C ) ), esc_html( get_the_modified_date() ) ); } echo '' . html_entity_decode( esc_html( $time_string ) ) . ''; } } if ( ! function_exists( 'arendelle_meta_author' ) ) { /** * Prints HTML with meta information for the current author. */ function arendelle_meta_author() { ?> 1 ) { $comments = $comments_num . esc_html__(' Comments', 'arendelle'); } else { $comments = esc_html__('1 Comment', 'arendelle'); } $comments = sprintf('%2$s', get_comments_link(), $comments ); } else { $comments = esc_html__('Comments are closed', 'arendelle'); } $output .= '' . $comments . ''; echo html_entity_decode( esc_html( $output ) ); } } if ( ! function_exists( 'arendelle_related_posts' ) ) { /** * Related Posts */ function arendelle_related_posts() { global $post; $tags = wp_get_post_tags( $post->ID ); $author_id = get_the_author_meta( 'ID' ); $related_by = get_theme_mod( 'arendelle_settings_related_posts_relation', 'category' ); $args = array( 'post_type'=>'post', 'post_status' => 'publish', 'posts_per_page' => 3, 'post__not_in' => array( get_the_ID() ), 'ignore_sticky_posts' => true, ); if ( $tags && 'tag' === $related_by ) { $tag_ids = array(); foreach ( $tags as $tag ) { $tag_ids[] = $tag->term_id; } $args['tag__in'] = $tag_ids; } elseif ( 'category' === $related_by ) { $args['category__in'] = wp_get_post_categories( get_the_ID() ); } elseif ( 'author' === $related_by ) { $args['author'] = $author_id; } $query = new WP_Query( $args ); ?> have_posts() ) : ?> '', 'link_before' => '' . esc_html__( 'Page', 'arendelle' ) . ' ', 'link_after' => '', 'separator' => ' ', 'pagelink' => '%', 'echo' => 1 ); wp_link_pages( $defaults ); } } if ( ! function_exists( 'arendelle_post_pagination' ) ) { /** * Post pagination * * @since 1.0.0 */ function arendelle_post_pagination() { // Don't print empty markup if there's only one page. if ( $GLOBALS['wp_query']->max_num_pages < 2 ) { return; } $prev_text = sprintf( '%s', __( 'Previous Page', 'arendelle' ) ); $next_text = sprintf( '%s', __( 'Next Page', 'arendelle' ) ); ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); $get_next_post = get_next_post(); $get_previous_post = get_previous_post(); if ( ! $next && ! $previous ) { return; } ?> get_the_author_meta( 'facebook' ), 'twitter' => get_the_author_meta( 'twitter' ), 'linkedin' => get_the_author_meta( 'linkedin' ), 'instagram' => get_the_author_meta( 'instagram' ), 'youtube' => get_the_author_meta( 'youtube' ), 'vimeo' => get_the_author_meta( 'vimeo' ), 'github' => get_the_author_meta( 'github' ) ); $website = rtrim( get_the_author_meta( 'url' ), '/' ); if ( get_the_author_meta( 'description' ) ) : ?>
array( 'entry-author__img' ) ) ); ?>
' ) { $description = apply_filters( 'get_the_archive_description', wp_strip_all_tags( term_description() ) ); if ( ! empty( $description ) ) { echo html_entity_decode( esc_html( $before . $description . $after ) ); } } }