| 12 | | if ( ! function_exists( 'twentyfifteen_comment_nav' ) ) : |
| 13 | | /** |
| 14 | | * Display navigation to next/previous comments when applicable. |
| 15 | | * |
| 16 | | * @since Twenty Fifteen 1.0 |
| 17 | | */ |
| 18 | | function twentyfifteen_comment_nav() { |
| 19 | | // Are there comments to navigate through? |
| 20 | | if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : |
| 21 | | ?> |
| 22 | | <nav class="navigation comment-navigation" role="navigation"> |
| 23 | | <h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfifteen' ); ?></h2> |
| 24 | | <div class="nav-links"> |
| 25 | | <?php |
| 26 | | if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) : |
| 27 | | printf( '<div class="nav-previous">%s</div>', $prev_link ); |
| 28 | | endif; |
| 29 | | |
| 30 | | if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) : |
| 31 | | printf( '<div class="nav-next">%s</div>', $next_link ); |
| 32 | | endif; |
| 33 | | ?> |
| 34 | | </div><!-- .nav-links --> |
| 35 | | </nav><!-- .comment-navigation --> |
| 36 | | <?php |
| 37 | | endif; |
| 38 | | } |
| 39 | | endif; |
| 40 | | |