max_num_pages < 2 ) { return; } ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> %1$s', get_avatar( get_the_author_meta( 'ID' ), 48 ) ); printf( ' by %1$s', sprintf( '%2$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ) ) ); } endif; if ( ! function_exists( 'brevitas_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function brevitas_posted_on() { $time_string = ''; 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() ) ); printf( ' ' . __( '%1$s', 'brevitas' ) . '', sprintf( '%2$s', esc_url( get_permalink() ), $time_string ) ); echo ! is_single() && strlen( get_the_title() ) == 0 ? '' : ''; } endif; if ( !function_exists( 'brevitas_comment_template' ) ) : /** * Used as a custom callback by wp_list_comments() for displaying * the comments and pings. */ function brevitas_comment_template( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; $avatar_size = apply_filters( 'avatar_size', 48 ); switch ( $comment->comment_type ) { // Pings format case 'pingback' : case 'trackback' : ?>
id="li-comment-">
comment_approved == '0' ) : ?>
' ' . __( 'Reply', 'brevitas' ), 'depth' => $depth, 'max_depth' => $args['max_depth'], ) ) ); ?>
'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( 'brevitas_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so brevitas_categorized_blog should return true. return true; } else { // This blog has only 1 category so brevitas_categorized_blog should return false. return false; } } /** * Flush out the transients used in brevitas_categorized_blog. */ function brevitas_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'brevitas_categories' ); } add_action( 'edit_category', 'brevitas_category_transient_flusher' ); add_action( 'save_post', 'brevitas_category_transient_flusher' );