PluginProbe
Filter Everything — WordPress & WooCommerce Filters / 1.9.5
Filter Everything — WordPress & WooCommerce Filters v1.9.5
1.9.6 1.9.5 1.9.4 1.9.3 1.9.2.2 1.9.2.1 trunk 1.2.1 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.1 1.4.4 1.4.5 1.4.8 1.4.9 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 1.6.3 All 51 releases
filter-everything / views / frontend / posts-found.php

posts-found.php in Filter Everything — WordPress & WooCommerce Filters 1.9.5, at views/frontend/posts-found.php

44 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Template for displaying Filters found posts number.
4 *
5 * This template can be overridden by copying it to yourtheme/filters/posts-found.php.
6 *
7 * $posts_found - int|NULL, posts found number
8 * $singular_label - string label for single found post
9 * $plural_label - string label for multiple found posts
10 * $hidden - makes an element hidden
11 *
12 * @see https://filtereverything.pro/resources/templates-overriding/
13 */
14
15 if ( ! defined('ABSPATH') ) {
16 exit;
17 }
18
19 ?>
20 <div class="wpc-posts-found<?php echo ($hidden) ? " wpc-posts-found-hidden" : ''; ?>" data-found="<?php echo esc_attr( $posts_found_count ); ?>">
21 <?php if( !$hidden ) : ?>
22 <p><?php
23 if( $posts_found_count !== NULL ) {
24 $class = ( $posts_found_count > 1 ) ? 'wpc-posts-found-number wpc-plural' : 'wpc-posts-found-number';
25 $label = ( $posts_found_count > 1 ) ? $plural_label : $singular_label;
26
27 echo wp_kses(
28 sprintf( _n(
29 '<span class="%s">%d</span> %s found',
30 '<span class="%s">%d</span> %s found',
31 $posts_found_count,
32 'filter-everything'
33 ), $class, $posts_found_count, $label ),
34 array(
35 'span' => array('class' => true)
36 )
37 );
38
39 }else{
40 echo '&nbsp;';
41 }
42 ?></p>
43 <?php endif; ?>
44 </div>