WordPress.org

Make WordPress Core

Ticket #32295: 32295-pagination.patch

File 32295-pagination.patch, 775 bytes (added by kitwestneat, 6 years ago)

patch to add future to statuses that don't use permalink structure

  • wordpress/wp-includes/post-template.php

    a b function _wp_link_page( $i ) { 
    913913        if ( 1 == $i ) {
    914914                $url = get_permalink();
    915915        } else {
    916                 if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
     916                if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending', 'future')) )
    917917                        $url = add_query_arg( 'page', $i, get_permalink() );
    918918                elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') == $post->ID )
    919919                        $url = trailingslashit(get_permalink()) . user_trailingslashit("$wp_rewrite->pagination_base/" . $i, 'single_paged');