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() ) ); if ( is_sticky() && is_home() ) : printf( __( '%1$s by %2$s', 'editor' ), __( 'Featured', 'editor' ), sprintf( '%2$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ) ) ); else : printf( __( '%1$s by %2$s', 'editor' ), sprintf( '%2$s', esc_url( get_permalink() ), $time_string ), sprintf( '%2$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ) ) ); endif; } endif; if ( ! function_exists( 'editor_comment' ) ) : /** * Template for comments and pingbacks. * * Used as a callback by wp_list_comments() for displaying the comments. */ function editor_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; ?>
  • id="li-comment-">
    comment_author_email, 51 ); ?>
    %s', 'editor' ), get_comment_author_link() ) ?>

    $depth, 'max_depth' => $args['max_depth'] ) ) ) ?>

    comment_approved == '0' ) : ?>
    '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. $editor_count_cats = is_countable( $editor_count_cats ) ? count( $editor_count_cats ) : 0; set_transient( 'editor_categories', $editor_count_cats ); } if ( $editor_count_cats > 1 ) { // This blog has more than 1 category so editor_categorized_blog should return true. return true; } else { // This blog has only 1 category so editor_categorized_blog should return false. return false; } } /** * Flush out the transients used in editor_categorized_blog. */ function editor_category_transient_flusher() { delete_transient( 'editor_categories' ); } add_action( 'edit_category', 'editor_category_transient_flusher' ); add_action( 'save_post', 'editor_category_transient_flusher' );