|
7 | 7 | exit; |
8 | 8 | } |
9 | 9 |
|
| 10 | +use StaticDeploy\Controller; |
10 | 11 | use StaticDeploy\URLHelper; |
11 | 12 |
|
12 | 13 | /** |
|
43 | 44 | */ |
44 | 45 | $paginator_last_page = $view['paginatorLastPage']; |
45 | 46 |
|
| 47 | +$uri = URLHelper::getCurrent(); |
| 48 | +if ( defined( 'STATIC_DEPLOY_WP_ORG_MODE' ) && STATIC_DEPLOY_WP_ORG_MODE ) { |
| 49 | + $nonce = wp_create_nonce( Controller::getHookName( 'caches_page' ) ); |
| 50 | + $uri = URLHelper::modifyUrl( [ '_wpnonce' => $nonce ], $uri ); |
| 51 | +} |
| 52 | + |
46 | 53 | ?> |
47 | 54 |
|
48 | 55 | <div class="wrap"> |
|
77 | 84 | <span class="tablenav-pages-navspan button disabled" aria-hidden="true">«</span> |
78 | 85 | <span class="tablenav-pages-navspan button disabled" aria-hidden="true">‹</span> |
79 | 86 | <?php else : ?> |
80 | | - <a class="first-page button" href="<?php echo esc_url( URLHelper::modifyUrl( [ 'paged' => 1 ] ) ); ?>"><span class="screen-reader-text">First page</span><span aria-hidden="true">«</span></a> |
81 | | - <a class="prev-page button" href="<?php echo esc_url( URLHelper::modifyUrl( [ 'paged' => $paginator_page - 1 ] ) ); ?>"><span class="screen-reader-text">Previous page</span><span aria-hidden="true">‹</span></a> |
| 87 | + <a class="first-page button" href="<?php echo esc_url( URLHelper::modifyUrl( [ 'paged' => 1 ], $uri ) ); ?>"><span class="screen-reader-text">First page</span><span aria-hidden="true">«</span></a> |
| 88 | + <a class="prev-page button" href="<?php echo esc_url( URLHelper::modifyUrl( [ 'paged' => $paginator_page - 1 ], $uri ) ); ?>"><span class="screen-reader-text">Previous page</span><span aria-hidden="true">‹</span></a> |
82 | 89 | <?php endif; ?> |
83 | 90 | <span class="paging-input"> |
84 | 91 | <label for="current-page-selector" class="screen-reader-text">Current Page</label> |
|
91 | 98 | <span class="tablenav-pages-navspan button disabled" aria-hidden="true">›</span> |
92 | 99 | <span class="tablenav-pages-navspan button disabled" aria-hidden="true">»</span> |
93 | 100 | <?php else : ?> |
94 | | - <a class="next-page button" href="<?php echo esc_url( URLHelper::modifyUrl( [ 'paged' => $paginator_page + 1 ] ) ); ?>"><span class="screen-reader-text">Next page</span><span aria-hidden="true">›</span></a> |
95 | | - <a class="last-page button" href="<?php echo esc_url( URLHelper::modifyUrl( [ 'paged' => $paginator_last_page ] ) ); ?>"><span class="screen-reader-text">Last page</span><span aria-hidden="true">»</span></a> |
| 101 | + <a class="next-page button" href="<?php echo esc_url( URLHelper::modifyUrl( [ 'paged' => $paginator_page + 1 ], $uri ) ); ?>"><span class="screen-reader-text">Next page</span><span aria-hidden="true">›</span></a> |
| 102 | + <a class="last-page button" href="<?php echo esc_url( URLHelper::modifyUrl( [ 'paged' => $paginator_last_page ], $uri ) ); ?>"><span class="screen-reader-text">Last page</span><span aria-hidden="true">»</span></a> |
96 | 103 | <?php endif; ?> |
97 | 104 | </span> |
98 | 105 | </div> |
|
0 commit comments