max_num_pages < 2 ) { return; } ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> %2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( _x( 'Posted on %s', 'post date', 'brawny' ), '' . $time_string . '' ); $byline = sprintf( _x( 'by %s', 'post author', 'brawny' ), '' ); echo '' . $posted_on . ''; } endif; if ( ! function_exists( 'brawny_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function brawny_entry_footer() { // Hide category and tag text for pages. if ( 'post' == get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'brawny' ) ); if ( $categories_list && brawny_categorized_blog() ) { printf( '' . __( 'Posted in %1$s', 'brawny' ) . '', $categories_list ); } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'brawny' ) ); if ( $tags_list ) { printf( '', $tags_list ); } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( __( 'Leave a comment', 'brawny' ), __( '1 Comment', 'brawny' ), __( '% Comments', 'brawny' ) ); echo ''; } edit_post_link( __( 'Edit', 'brawny' ), '', '' ); } endif; /** * Returns true if a blog has more than 1 category. * * @return bool */ function brawny_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'brawny_categories' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'fields' => '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( 'brawny_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so brawny_categorized_blog should return true. return true; } else { // This blog has only 1 category so brawny_categorized_blog should return false. return false; } } /** * Flush out the transients used in brawny_categorized_blog. */ function brawny_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'brawny_categories' ); } add_action( 'edit_category', 'brawny_category_transient_flusher' ); add_action( 'save_post', 'brawny_category_transient_flusher' ); if( ! function_exists( 'brawny_breadcrumbs' )) { function brawny_breadcrumbs() { /* === OPTIONS === */ $text['home'] = ''; // text for the 'Home' link $text['category'] = 'Archive by Category "%s"'; // text for a category page $text['search'] = 'Search Results for "%s" Query'; // text for a search results page $text['tag'] = 'Posts Tagged "%s"'; // text for a tag page $text['author'] = 'Articles Posted by %s'; // text for an author page $text['404'] = 'Error 404'; // text for the 404 page $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show $showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show //$delimiter = ( isset( $brawny['breadcrumb-char'] ) && $brawny['breadcrumb-char'] != '' ) ? $brawny['breadcrumb-char'] : ' » '; // delimiter between crumbs $brawny_breadcrumb_char = get_theme_mod('brawny_breadcrumb_chars' ) != '' ? get_theme_mod('brawny_breadcrumb_chars' ) : '»'; switch ( $brawny_breadcrumb_char ) { case '2' : $delimiter = ' > '; break; case '3': $delimiter = ' / '; break; case '1': default: $delimiter = ' » '; break; } $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb /* === END OF OPTIONS === */ global $post; $homeLink = home_url() . '/'; $linkBefore = ''; $linkAfter = ''; $linkAttr = ' rel="v:url" property="v:title"'; $link = $linkBefore . '%2$s' . $linkAfter; if (is_home() || is_front_page()) { if ($showOnHome == 1) echo '
'; } else { echo '