PluginProbe
Filter Everything — WordPress & WooCommerce Filters / trunk
Filter Everything — WordPress & WooCommerce Filters vtrunk
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 / admin / filters-intersections.php

filters-intersections.php in Filter Everything — WordPress & WooCommerce Filters trunk, at views/admin/filters-intersections.php

50 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined('ABSPATH') ) {
4 exit;
5 }
6
7 ?><table class="wpc-form-fields-table" id="wpc-intersections-table">
8 <tr class="wpc-first-row">
9 <?php if( ! empty( $fields ) ): ?>
10 <?php
11
12 $count = count( $fields );
13 $rows = intdiv( $count, 3 ) + 1;
14 $i = 1;
15
16 foreach( $fields as $key => $attributes ){ ?>
17 <td class="wpc-filter-field-td"<?php
18 if( $count >= 5 && $i == 1 && isset( $fields['wp_entity'] ) ){
19 echo ' rowspan="'.$rows.'" ';
20 }
21 ?>>
22 <?php echo flrt_render_input( $attributes ); ?>
23 </td>
24 <?php
25 // Do not try to understand this code.
26 // Just believe it works.
27 $sep = 4;
28 $k = $i;
29 if( isset( $fields['wp_entity'] ) && $count >= 5 && ($i > 4) ){
30 $sep = 3;
31 $k = $i - 1;
32 }
33 if( ($k % $sep) === 0 ){
34 ?>
35 </tr>
36 <tr>
37 <?php
38 }
39 $i++;
40 } ?>
41
42 <?php else: ?>
43
44 <td class="wpc-filter-field-td">
45 <span class="wpc-no-seo-filters-message"><?php echo esc_html__( 'Sorry. There are no filters active for SEO for the selected post type', 'filter-everything' ); ?></span>
46 </td>
47
48 <?php endif; ?>
49 </tr>
50 </table>