includes/api/class-wc-rest-taxes-controller.php 1 location
|
@@ 260-267 (lines=8) @@
|
| 257 |
|
$response->header( 'X-WP-TotalPages', (int) $max_pages ); |
| 258 |
|
|
| 259 |
|
$base = add_query_arg( $request->get_query_params(), rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ) ); |
| 260 |
|
if ( $page > 1 ) { |
| 261 |
|
$prev_page = $page - 1; |
| 262 |
|
if ( $prev_page > $max_pages ) { |
| 263 |
|
$prev_page = $max_pages; |
| 264 |
|
} |
| 265 |
|
$prev_link = add_query_arg( 'page', $prev_page, $base ); |
| 266 |
|
$response->link_header( 'prev', $prev_link ); |
| 267 |
|
} |
| 268 |
|
if ( $max_pages > $page ) { |
| 269 |
|
$next_page = $page + 1; |
| 270 |
|
$next_link = add_query_arg( 'page', $next_page, $base ); |
includes/abstracts/abstract-wc-rest-terms-controller.php 1 location
|
@@ 329-336 (lines=8) @@
|
| 326 |
|
$response->header( 'X-WP-TotalPages', (int) $max_pages ); |
| 327 |
|
|
| 328 |
|
$base = add_query_arg( $request->get_query_params(), rest_url( '/' . $this->namespace . '/' . $this->rest_base ) ); |
| 329 |
|
if ( $page > 1 ) { |
| 330 |
|
$prev_page = $page - 1; |
| 331 |
|
if ( $prev_page > $max_pages ) { |
| 332 |
|
$prev_page = $max_pages; |
| 333 |
|
} |
| 334 |
|
$prev_link = add_query_arg( 'page', $prev_page, $base ); |
| 335 |
|
$response->link_header( 'prev', $prev_link ); |
| 336 |
|
} |
| 337 |
|
if ( $max_pages > $page ) { |
| 338 |
|
$next_page = $page + 1; |
| 339 |
|
$next_link = add_query_arg( 'page', $next_page, $base ); |
includes/api/class-wc-rest-customers-controller.php 1 location
|
@@ 280-287 (lines=8) @@
|
| 277 |
|
$response->header( 'X-WP-TotalPages', (int) $max_pages ); |
| 278 |
|
|
| 279 |
|
$base = add_query_arg( $request->get_query_params(), rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ) ); |
| 280 |
|
if ( $page > 1 ) { |
| 281 |
|
$prev_page = $page - 1; |
| 282 |
|
if ( $prev_page > $max_pages ) { |
| 283 |
|
$prev_page = $max_pages; |
| 284 |
|
} |
| 285 |
|
$prev_link = add_query_arg( 'page', $prev_page, $base ); |
| 286 |
|
$response->link_header( 'prev', $prev_link ); |
| 287 |
|
} |
| 288 |
|
if ( $max_pages > $page ) { |
| 289 |
|
$next_page = $page + 1; |
| 290 |
|
$next_link = add_query_arg( 'page', $next_page, $base ); |
includes/abstracts/abstract-wc-rest-posts-controller.php 1 location
|
@@ 380-387 (lines=8) @@
|
| 377 |
|
} |
| 378 |
|
$base = add_query_arg( $request_params, rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ) ); |
| 379 |
|
|
| 380 |
|
if ( $page > 1 ) { |
| 381 |
|
$prev_page = $page - 1; |
| 382 |
|
if ( $prev_page > $max_pages ) { |
| 383 |
|
$prev_page = $max_pages; |
| 384 |
|
} |
| 385 |
|
$prev_link = add_query_arg( 'page', $prev_page, $base ); |
| 386 |
|
$response->link_header( 'prev', $prev_link ); |
| 387 |
|
} |
| 388 |
|
if ( $max_pages > $page ) { |
| 389 |
|
$next_page = $page + 1; |
| 390 |
|
$next_link = add_query_arg( 'page', $next_page, $base ); |