706 | | $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", |
707 | | 'first-page' . $disable_first, |
708 | | esc_attr__( 'Go to the first page' ), |
709 | | esc_url( remove_query_arg( 'paged', $current_url ) ), |
710 | | '«' |
711 | | ); |
| 707 | |
| 708 | if ( $disable_last == ' disabled' ) { |
| 709 | $page_links[] = sprintf( "<a class='%s'>%s</a>", |
| 710 | 'prev-page' . $disable_first, |
| 711 | '‹' |
| 712 | ); |
| 713 | } |
713 | | $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", |
714 | | 'prev-page' . $disable_first, |
715 | | esc_attr__( 'Go to the previous page' ), |
716 | | esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ), |
717 | | '‹' |
718 | | ); |
| 715 | if ( $disable_first == ' disabled' ) { |
| 716 | $page_links[] = sprintf( "<span class='%s'>%s</span>", |
| 717 | 'navspan first-page' . $disable_first, |
| 718 | '«' |
| 719 | ); |
| 720 | } else { |
| 721 | $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", |
| 722 | 'first-page' . $disable_first, |
| 723 | esc_attr__( 'Go to the first page' ), |
| 724 | esc_url( remove_query_arg( 'paged', $current_url ) ), |
| 725 | '«' |
| 726 | ); |
| 727 | } |
| 729 | if ( $disable_first == ' disabled' ) { |
| 730 | $page_links[] = sprintf( "<span class='%s'>%s</span>", |
| 731 | 'navspan prev-page' . $disable_first, |
| 732 | '‹' |
| 733 | ); |
| 734 | } else { |
| 735 | $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", |
| 736 | 'prev-page' . $disable_first, |
| 737 | esc_attr__( 'Go to the previous page' ), |
| 738 | esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ), |
| 739 | '‹' |
| 740 | ); |
| 741 | } |
| 742 | |
733 | | $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", |
734 | | 'next-page' . $disable_last, |
735 | | esc_attr__( 'Go to the next page' ), |
736 | | esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ), |
737 | | '›' |
738 | | ); |
| 756 | if ( $disable_last == ' disabled' ) { |
| 757 | $page_links[] = sprintf( "<span class='%s'>%s</span>", |
| 758 | 'navspan next-page' . $disable_last, |
| 759 | '›' |
| 760 | ); |
| 761 | } else { |
| 762 | $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", |
| 763 | 'next-page' . $disable_last, |
| 764 | esc_attr__( 'Go to the next page' ), |
| 765 | esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ), |
| 766 | '›' |
| 767 | ); |
| 768 | } |
| 769 | |
| 770 | if ( $disable_last == ' disabled' ) { |
| 771 | $page_links[] = sprintf( "<span class='%s'>%s</span>", |
| 772 | 'navspan last-page' . $disable_last, |
| 773 | '»' |
| 774 | ); |
| 775 | } else { |
| 776 | $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", |
| 777 | 'last-page' . $disable_last, |
| 778 | esc_attr__( 'Go to the last page' ), |
| 779 | esc_url( remove_query_arg( 'paged', $total_pages, $current_url ) ), |
| 780 | '»' |
| 781 | ); |
| 782 | } |