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/result-count.php +14 -10 1.4.55 → 2.4.0 View file →
@@ -10,24 +10,28 @@
10 10 */
11 11
12 12 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13 13
14 -global $propertyhive, $wp_query;
14 +global $propertyhive;
15 15
16 16 ?>
17 17 <p class="propertyhive-result-count">
18 18 <?php
19 - $paged = max( 1, $wp_query->get( 'paged' ) );
20 - $per_page = $wp_query->get( 'posts_per_page' );
21 - $total = $wp_query->found_posts;
22 - $first = ( $per_page * $paged ) - $per_page + 1;
23 - $last = min( $total, $wp_query->get( 'posts_per_page' ) * $paged );
24 -
25 19 if ( 1 == $total ) {
26 - _e( 'Showing the single result', 'propertyhive' );
20 + esc_html_e( 'Showing the single result', 'propertyhive' );
27 21 } elseif ( $total <= $per_page || -1 == $per_page ) {
28 - printf( __( 'Showing %s properties', 'propertyhive' ), number_format($total) );
22 + printf(
23 + /* translators: %s: total number of properties */
24 + esc_html__( 'Showing %s properties', 'propertyhive' ),
25 + esc_html( number_format_i18n( $total ) )
26 + );
29 27 } else {
30 - printf( _x( 'Showing %1$s–%2$s of %3$s properties', '%1$s = first, %2$s = last, %3$s = total', 'propertyhive' ), number_format($first), number_format($last), number_format($total) );
28 + printf(
29 + /* translators: 1: first result number, 2: last result number, 3: total number of properties */
30 + esc_html__( 'Showing %1$s–%2$s of %3$s properties', 'propertyhive' ),
31 + esc_html( number_format_i18n( $first ) ),
32 + esc_html( number_format_i18n( $last ) ),
33 + esc_html( number_format_i18n( $total ) )
34 + );
31 35 }
32 36 ?>
33 37 </p>