PluginProbe
Property Hive / 2.4.0
Property Hive v2.4.0
2.4.0 2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 All 262 releases
← All changes | templates/search/pagination.php +4 -4 1.4.49 → 2.4.0 View file →
@@ -8,19 +8,19 @@
8 8 */
9 9
10 10 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11 11
12 -global $wp_query;
13 12 ?>
14 13 <div class="propertyhive-pagination">
15 14 <?php
16 - if ( $wp_query->max_num_pages > 1 )
15 + if ( $max_num_pages > 1 )
17 16 {
17 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- WordPress builds and escapes pagination links; preserve the PHP pagination customization filter.
18 18 echo paginate_links( apply_filters( 'propertyhive_pagination_args', array(
19 19 'base' => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ),
20 20 'format' => '',
21 21 'current' => max( 1, get_query_var( 'paged' ) ),
22 - 'total' => $wp_query->max_num_pages,
22 + 'total' => $max_num_pages,
23 23 'prev_text' => '&larr;',
24 24 'next_text' => '&rarr;',
25 25 'type' => 'list',
26 26 'end_size' => 3,
@@ -31,5 +31,5 @@
31 31 {
32 32 echo '&nbsp;';
33 33 }
34 34 ?>
35 -</div>
35 +</div>