post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) return; } if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) return; $nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation'; ?> ', 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', 'suits' ), get_the_author() ) ), esc_html( get_the_author() ) ); // Post format $format = get_post_format(); if ( $format ) { $format_text = sprintf( '%2$s', esc_url( get_post_format_link( $format ) ), get_post_format_string( $format ) ); } // Translators: 1 is category, 2 is post format, 3 is tag, 4 is the date, 5 is the author's name. if ( $tag_list && ! empty( $format_text ) && ! is_wp_error( $tag_list ) ) { $utility_text = __( 'Posted in %1$s, %2$s format and tagged %3$s on %4$s by %5$s.', 'suits' ); } elseif ( $tag_list && ! is_wp_error( $tag_list ) ) { $utility_text = __( 'Posted in %1$s and tagged %3$s on %4$s by %5$s.', 'suits' ); } elseif ( $categories_list && ! empty( $format_text ) ) { $utility_text = __( 'Posted in %1$s, %2$s format on %4$s by %5$s.', 'suits' ); } elseif ( $categories_list ) { $utility_text = __( 'Posted in %1$s on %4$s by %5$s.', 'suits' ); } else { $utility_text = __( 'Posted on %4$s by %5$s.', 'suits' ); } // If $tag_list contains a WP Error, empty it before passing to printf(), just in case if ( is_wp_error( $tag_list ) ) { $tag_list = ''; } printf( $utility_text, $categories_list, $format_text, $tag_list, $date, $author ); } endif;