mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 23:41:38 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@26525 git-svn-id: http://core.svn.wordpress.org/trunk@26418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0e5af31e0f
commit
ba55e433a4
@ -2801,13 +2801,13 @@ class WP_Query {
|
|||||||
if ( !$page )
|
if ( !$page )
|
||||||
$page = 1;
|
$page = 1;
|
||||||
|
|
||||||
$pgstrt = ($page - 1) * $q['posts_per_page'];
|
if ( empty($q['offset']) ) {
|
||||||
|
$pgstrt = ($page - 1) * $q['posts_per_page'] . ', ';
|
||||||
if ( ! empty( $q['offset'] ) ) {
|
} else { // we're ignoring $page and using 'offset'
|
||||||
$q['offset'] = absint($q['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
|
// Comments feeds
|
||||||
|
Loading…
Reference in New Issue
Block a user