Skip to:
Content

bbPress.org

Ticket #2702: 2702.5.diff

File 2702.5.diff, 2.0 KB (added by thebrandonallen, 8 years ago)
  • src/includes/replies/template.php

    diff --git src/includes/replies/template.php src/includes/replies/template.php
    index 925ff91..c5a0d08 100644
    function bbp_has_replies( $args = array() ) { 
    273273                        if ( bbp_use_pretty_urls() ) {
    274274                                $bbp->reply_query->pagination_links = str_replace( bbp_get_paged_slug() . '/1/', '', $bbp->reply_query->pagination_links );
    275275                        } else {
    276                                 $bbp->reply_query->pagination_links = str_replace( '&paged=1', '', $bbp->reply_query->pagination_links );
     276                                $bbp->reply_query->pagination_links = preg_replace( '/&paged=1(?=[^0-9])/m', '', $bbp->reply_query->pagination_links );
    277277                        }
    278278                }
    279279        }
  • src/includes/search/template.php

    diff --git src/includes/search/template.php src/includes/search/template.php
    index 25e4de3..548a1c9 100644
    function bbp_has_search_results( $args = array() ) { 
    155155                if ( bbp_use_pretty_urls() ) {
    156156                        $bbp->search_query->pagination_links = str_replace( bbp_get_paged_slug() . '/1/', '', $bbp->search_query->pagination_links );
    157157                } else {
    158                         $bbp->search_query->pagination_links = str_replace( '&paged=1', '', $bbp->search_query->pagination_links );
     158                        $bbp->search_query->pagination_links = preg_replace( '/&paged=1(?=[^0-9])/m', '', $bbp->search_query->pagination_links );
    159159                }
    160160        }
    161161
  • src/includes/topics/template.php

    diff --git src/includes/topics/template.php src/includes/topics/template.php
    index 18270c9..e19b85a 100644
    function bbp_topic_pagination( $args = array() ) { 
    909909                        if ( bbp_use_pretty_urls() ) {
    910910                                $pagination_links = str_replace( bbp_get_paged_slug() . '/1/', '', $pagination_links );
    911911                        } else {
    912                                 $pagination_links = str_replace( '&paged=1', '', $pagination_links );
     912                                $pagination_links = preg_replace( '/&paged=1(?=[^0-9])/m', '', $pagination_links );
    913913                        }
    914914
    915915                        // Add before and after to pagination links