PluginProbe
Filter Everything — WordPress & WooCommerce Filters / 1.9.7
Filter Everything — WordPress & WooCommerce Filters v1.9.7
1.9.7 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 All 52 releases
← All changes | views/frontend/posts-found.php +25 -22 1.6.11.9.7 View file →
@@ -6,36 +6,39 @@
6 6 *
7 7 * $posts_found - int|NULL, posts found number
8 8 * $singular_label - string label for single found post
9 9 * $plural_label - string label for multiple found posts
10 + * $hidden - makes an element hidden
10 11 *
11 12 * @see https://filtereverything.pro/resources/templates-overriding/
12 13 */
13 14
14 -if ( ! defined('WPINC') ) {
15 - wp_die();
15 +if ( ! defined('ABSPATH') ) {
16 + exit;
16 17 }
17 18
18 19 ?>
19 -<div class="wpc-posts-found" data-found="<?php echo esc_attr( $posts_found_count ); ?>">
20 -<p><?php
21 - if( $posts_found_count !== NULL ) {
22 - $class = ( $posts_found_count > 1 ) ? 'wpc-posts-found-number wpc-plural' : 'wpc-posts-found-number';
23 - $label = ( $posts_found_count > 1 ) ? $plural_label : $singular_label;
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;
24 26
25 - echo wp_kses(
26 - sprintf( _n(
27 - '<span class="%s">%d</span> %s found',
28 - '<span class="%s">%d</span> %s found',
29 - $posts_found_count,
30 - 'filter-everything'
31 - ), $class, $posts_found_count, $label ),
32 - array(
33 - 'span' => array('class' => true)
34 - )
35 - );
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 + );
36 38
37 - }else{
38 - echo '&nbsp;';
39 - }
40 -?></p>
39 + }else{
40 + echo '&nbsp;';
41 + }
42 + ?></p>
43 +<?php endif; ?>
41 44 </div>