Revert [26012] for now, which had fixed using `paged` with `offset` in WP_Query but introduced side effects for those working around it.
see #18897. git-svn-id: https://develop.svn.wordpress.org/trunk@26525 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dd5f228729
commit
fdcf1f4c12
|
@ -2801,13 +2801,13 @@ class WP_Query {
|
|||
if ( !$page )
|
||||
$page = 1;
|
||||
|
||||
$pgstrt = ($page - 1) * $q['posts_per_page'];
|
||||
|
||||
if ( ! empty( $q['offset'] ) ) {
|
||||
if ( empty($q['offset']) ) {
|
||||
$pgstrt = ($page - 1) * $q['posts_per_page'] . ', ';
|
||||
} else { // we're ignoring $page and using 'offset'
|
||||
$q['offset'] = absint($q['offset']);
|
||||
$pgstrt += $q['offset'];
|
||||
$pgstrt = $q['offset'] . ', ';
|
||||
}
|
||||
$limits = 'LIMIT ' . $pgstrt . ', ' . $q['posts_per_page'];
|
||||
$limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
|
||||
}
|
||||
|
||||
// Comments feeds
|
||||
|
|
Loading…
Reference in New Issue