Ticket #2702: 2702.2.diff
File 2702.2.diff, 1.5 KB (added by , 10 years ago) |
---|
-
src/includes/replies/template.php
273 273 // Remove first page from pagination 274 274 if ( $wp_rewrite->using_permalinks() ) { 275 275 $bbp->reply_query->pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $bbp->reply_query->pagination_links ); 276 } else { 277 $bbp->reply_query->pagination_links = str_replace( '&paged=1', '', $bbp->reply_query->pagination_links ); 276 } else{ 277 $bbp->reply_query->pagination_links = preg_replace_callback( '/&paged=1[^0-9]/', 278 function( $matches ){ 279 return str_replace( '&paged=1', '', $matches[0] ); 280 }, 281 $bbp->reply_query->pagination_links ); 278 282 } 279 283 } 280 284 } -
src/includes/topics/template.php
914 914 if ( $wp_rewrite->using_permalinks() ) { 915 915 $pagination_links = str_replace( $wp_rewrite->pagination_base . '/1/', '', $pagination_links ); 916 916 } else { 917 $pagination_links = str_replace( '&paged=1', '', $pagination_links ); 917 $pagination_links = preg_replace_callback( '/&paged=1[^0-9]/', 918 function( $matches ){ 919 return str_replace( '&paged=1', '', $matches[0] ); 920 }, 921 $pagination_links ); 918 922 } 919 923 920 924 // Add before and after to pagination links