the_title_attribute( array( 'echo' => false ) ) ) ); ?>
%s'; $next_string = '%s '; switch ( $context ) { case 'posts': the_posts_pagination( array( 'prev_text' => sprintf( $prev_string, esc_html__( 'Newer Posts', 'flock' ) ), 'next_text' => sprintf( $next_string, esc_html__( 'Older Posts', 'flock' ) ) ) ); break; case 'comments': the_comments_navigation( array( 'prev_text' => sprintf( $prev_string, esc_html__( 'Older Comments', 'flock' ) ), 'next_text' => sprintf( $next_string, esc_html__( 'Newer Comments', 'flock' ) ) ) ); break; default: return false; } return true; } } if (! function_exists( 'lc_flock_post_metadata' ) ) { /** * Prints meta information about the current post. * * @since 1.0 * * @param string $context Valid values: header, footer. * @return bool */ function lc_flock_post_metadata( $context ) { if ( ( $context !== 'header' ) && ( get_post_type() !== 'post' ) ) { return false; } switch ( $context ) { case 'header': $author_link = ''; $time_string = ''; if (! is_author() ) { $author_link = ' · '; } echo '
', $author_link, $time_string, ' · '; comments_number( __( 'No Comments', 'flock' ), __( '1 Comment', 'flock' ), __( '% Comments', 'flock' ) ); echo '
'; break; case 'footer': $categories = get_the_category(); if ( $categories ) { if ( ( 1 === count( $categories ) ) && ( ( 1 == $categories[0]->cat_ID ) || ( 1 == $categories[0]->category_parent ) ) ) { return lc_flock_post_tags_list(); } $categories_list = get_the_category_list( ', ' ); if ( $categories_list ) { echo '

'; printf( __( 'Posted in %s', 'flock' ), $categories_list ); echo '

'; } } elseif ( has_tag() ) { lc_flock_post_tags_list(); } break; default: return false; } return true; } } if (! function_exists( 'lc_flock_post_tags_list' ) ) { /** * Prints the list of tags for the current post. * * @since 1.0 * @return bool */ function lc_flock_post_tags_list() { $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ) { echo '

'; printf( __( 'Tagged as %s', 'flock' ), $tags_list ); echo '

'; return true; } return false; } } if (! function_exists( 'lc_flock_archive_posts_count' ) ) { /** * Prints a one-liner summary of the number of posts contained * in the current archive page. * * @since 1.0 */ function lc_flock_archive_posts_count() { global $wp_query; $posts_count = (int) $wp_query->found_posts; echo '

'; if ( is_author() ) { printf( esc_html__( '%s has published %d posts to date.', 'flock' ), get_the_author(), $posts_count ); } else { $taxonomy_labels = get_taxonomy_labels( get_taxonomy( get_queried_object()->taxonomy ) ); $taxonomy_name = strtolower( $taxonomy_labels->singular_name ); printf( esc_html__( '%d posts have been filed under this %s.', 'flock' ), $posts_count, $taxonomy_name ); } echo '

'; } } if (! function_exists( 'lc_flock_search_results_title' ) ) { /** * Prints the title of search results pages. * * @since 1.0 */ function lc_flock_search_results_title() { echo '

'; printf( esc_html__( 'Results for %s', 'flock' ), '"' . esc_html( get_search_query() ) . '"' ); echo '

'; } } if (! function_exists( 'lc_flock_page_nav_links' ) ) { /** * Prints the navigation menu for paginated posts and pages. * * @since 1.0 */ function lc_flock_page_nav_links() { wp_link_pages( array( 'before' => '', 'pagelink' => esc_html__( 'Page %', 'flock' ), ) ); } } ?>