post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; } // Don't print empty markup in archives if there's only one page. if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) return; $nav_class = 'site-navigation paging-navigation'; if ( is_single() ) $nav_class = 'site-navigation post-navigation'; ?> post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; } // Don't print empty markup in archives if there's only one page. if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) return; $nav_class = 'site-navigation paging-navigation'; if ( is_single() ) $nav_class = 'site-navigation post-navigation'; ?> comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %1$s %2$s', get_comment_author_link(), // If current post author is also comment author, make it known visually. ( $comment->user_id === $post->post_author ) ? ' ' . __( 'Post author', 'adventurous' ) . '' : '' ); printf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'adventurous' ), get_comment_date(), get_comment_time() ) ); ?>
    comment_approved ) : ?>

    ', '

    ' ); ?>
    __( 'Reply', 'adventurous' ), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    ', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $author = sprintf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'adventurous' ), get_the_author() ) ), get_the_author() ); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. $utility_text = __( 'Posted on %1$s by %2$s', 'adventurous' ); printf( $utility_text, $date, $author ); } endif; if ( ! function_exists( 'adventurous_footer_meta' ) ) : /** * Prints HTML with meta information for the normal post footer: date and author * * Create your own adventurous_footer_meta() to override in a child theme. * * @since Adventurous 1.0 */ function adventurous_footer_meta() { $utility_text = ''; // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list( __( ', ', 'adventurous' ) ); // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list( '', __( ', ', 'adventurous' ) ); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. if ( $tag_list ) { $utility_text = __( 'Posted in %1$s | Tagged %2$s', 'adventurous' ); } elseif ( $categories_list ) { $utility_text = __( 'Posted in %1$s', 'adventurous' ); } if ( $utility_text ) { printf( $utility_text, $categories_list, $tag_list ); } } endif; if ( ! function_exists( 'adventurous_post_format_meta' ) ) : /** * Prints HTML with meta information for current post format: categories, tags, permalink, author, and date. * * Create your own adventurous_post_format_meta() to override in a child theme. * * @since Adventurous 1.0 */ function adventurous_post_format_meta() { // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list( __( ', ', 'adventurous' ) ); // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list( '', __( ', ', 'adventurous' ) ); $date = sprintf( '', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $author = sprintf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'adventurous' ), get_the_author() ) ), get_the_author() ); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. if ( $tag_list ) { $utility_text = __( 'Posted on %3$s under %1$s | Tagged %2$s | By %4$s', 'adventurous' ); } elseif ( $categories_list ) { $utility_text = __( 'Posted on %3$s under in %1$s | By %4$s.', 'adventurous' ); } else { $utility_text = __( 'Posted on %3$s | By %4$s.', 'adventurous' ); } printf( $utility_text, $categories_list, $tag_list, $date, $author ); } endif; /** * Returns true if a blog has more than 1 category * * @since Adventurous 1.0 */ function adventurous_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) { // Create an array of all the categories that are attached to posts $all_the_cool_cats = get_categories( array( 'hide_empty' => 1, ) ); // Count the number of categories that are attached to the posts $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'all_the_cool_cats', $all_the_cool_cats ); } if ( '1' != $all_the_cool_cats ) { // This blog has more than 1 category so adventurous_categorized_blog should return true return true; } else { // This blog has only 1 category so adventurous_categorized_blog should return false return false; } } /** * Flush out the transients used in adventurous_categorized_blog * * @since Adventurous 1.0 */ function adventurous_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'all_the_cool_cats' ); } add_action( 'edit_category', 'adventurous_category_transient_flusher' ); add_action( 'save_post', 'adventurous_category_transient_flusher' );