Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/12/2017 11:28:11 AM (10 years ago)
Author:
johnjamesjacoby
Message:

Pagination: Use preg_replace to find & remove page=1 query arguments.

Fixes #2702. Props thebrandonallen, tharsheblows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/search/template.php

    r5951 r6228  
    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        }
Note: See TracChangeset for help on using the changeset viewer.