' ); if ( $site_title ) { $site_link = sprintf( '%2$s', esc_url( home_url( '/' ) ), $site_title ); if ( is_front_page() ) { printf( '

%s

', $site_link ); } else { printf( '

%s

', $site_link ); } } if ( $site_description ) { printf( '

%s

', $site_description ); } print( '' ); } /** * Site quick links at the header. * * @since 1.0.0 * * @return void. */ function aesblo_quicklinks() { $show_home_link = ! ( is_front_page() && ! is_paged() ); $show_primary_sidebar_link = has_nav_menu( 'primary' ) || is_active_sidebar( 'primary-sidebar' ); $show_secondary_sidebar_link = is_active_sidebar( 'secondary-sidebar' ); $show_seach_link = true; $show_quick_links = $show_home_link || $show_primary_sidebar_link || $show_secondary_sidebar_link || $show_seach_link; if ( $show_quick_links ) : ?> %2$s %4$s', esc_attr( get_the_date( 'c' ) ), _x( 'Posted on', 'Used before publish date.', 'aesblo' ), esc_url( get_permalink() ), get_the_time( get_option( 'date_format' ) ) ); } } /** * Display the entry header meta. * * @since 1.0.0 * * @return void */ function aesblo_entry_header_meta() { $is_sticky = ( is_sticky() && is_home() && ! is_paged() ); $format = get_post_format(); $is_format = current_theme_supports( 'post-formats', $format ); if ( $is_sticky || $is_format ) : ?>
%1$s: %2$s', _x( 'Format', 'Used before post format.', 'aesblo' ), get_post_format_string( $format ), esc_attr( aesblo_get_format_icon( $format ) ) ); ?>
', '' ); } else { the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); } } if ( ! function_exists( 'aesblo_entry_meta' ) ) : /** * Prints meta at the entry footer with categories, tags, author, etc. * * @since 1.0.0 */ function aesblo_entry_footer() { ?>
  1. ', ', ' ); if ( $tags_list ) : ?>
  2. %2$s × %3$s', esc_url( wp_get_attachment_url() ), $metadata['width'], $metadata['height'] ); ?>
'ids', 'hide_empty' => 1, // We only need to know if there is more than one category. 'number' => 2, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'aesblo_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so aesblo_categorized_blog should return true. return true; } else { // This blog has only 1 category so aesblo_categorized_blog should return false. return false; } } /** * Flush out the transients used in {@see aesblo_categorized_blog()}. * * @since 1.0.0 */ function aesblo_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'aesblo_categories' ); } add_action( 'edit_category', 'aesblo_category_transient_flusher' ); add_action( 'save_post', 'aesblo_category_transient_flusher' ); /** * Display the posts pagination. * * @since 1.0.0 */ function aesblo_posts_pagination() { the_posts_pagination( array( 'mid_size' => 2, 'prev_text' => __( '« Prev', 'aesblo' ), 'next_text' => __( 'Next »', 'aesblo' ), 'before_page_number' => '' . __( 'Page', 'aesblo' ) . ' ', ) ); } /** * Display the title and description at the archive pages. * * @since 1.0.0 */ function aesblo_archive_header() { if ( is_category() ) { $icon = 'folder-open-o'; } elseif ( is_tag() ) { $icon = 'tag'; } elseif ( is_author() ) { $icon = 'user'; } elseif ( $format = get_post_format() ) { if ( current_theme_supports( 'post-formats', $format ) ) { $icon = aesblo_get_format_icon( $format ); } } elseif ( is_date() ) { $icon = 'calendar'; } elseif ( is_search() ) { $icon = 'search'; } $icon = isset( $icon ) && $icon ? $icon : 'list-ul'; ?> ' ' . '' . __( 'Previous post:', 'aesblo' ) . ' ' . '%title', 'next_text' => ' ' . '' . __( 'Next post:', 'aesblo' ) . ' ' . '%title' ) ); } /** * Display the pagination in the single page. * * @since 1.0.0 */ function aesblo_link_pages() { wp_link_pages( array( 'before' => '', 'link_before' => '', 'link_after' => '', 'pagelink' => '' . __( 'Page', 'aesblo' ) . ' %', ) ); } /** * Display the comments pagination. * * @since 1.0.0 * * @return void */ function aesblo_comments_paging() { ?>