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/admin/filter-row.php +30 -17 1.3.21.9.7 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2
3 -if ( ! defined('WPINC') ) {
4 - wp_die();
3 +if ( ! defined('ABSPATH') ) {
4 + exit;
5 5 }
6 6
7 7 $filterID = isset( $filter['ID']['value'] ) ? $filter['ID']['value'] : 0;
8 8 $belongs_class = ( $filter['entity']['entity_belongs'] ) ? 'wpc-belongs ' : 'wpc-belongs-not ';
@@ -17,11 +17,16 @@
17 17 </button>
18 18 </div>
19 19 <div class="wpc-filter-title ui-sortable-handle">
20 20 <ul class="wpc-custom-row wpc-filter-item-labels">
21 - <li class="wpc-filter-order"><span class="wpc-filter-sortable-handle"><?php echo esc_html( $filter['menu_order']['value'] ); ?></span></li>
21 + <li class="wpc-filter-order" title="<?php echo $filter['menu_order']['value']; ?>"><span class="wpc-filter-sortable-handle dashicons dashicons-menu"></span></li>
22 22 <li class="wpc-filter-label"><?php echo esc_html($filter['label']['value']); ?></li>
23 - <li class="wpc-filter-entity"><?php echo flrt_get_filter_entity_name( $filter['entity']['value'] ); // Already escaped in function ?></li>
23 + <li class="wpc-filter-entity"><?php
24 + echo flrt_get_filter_entity_name( $filter['entity']['value'] ); // Already escaped in function
25 + if( ! $filter['entity']['entity_belongs'] && ! in_array( $filter['entity']['value'], [ 'tax_numeric', 'post_meta_exists' ] ) ){
26 + echo ' ' . flrt_help_tip( esc_html__('This filter is inactive because it is not related to the selected post type.', 'filter-everything'), $allow_html = false );
27 + }
28 + ?></li>
24 29 <li class="wpc-filter-view"><?php echo flrt_get_filter_view_name( $filter['view']['value'] ); // Already escaped in function ?></li>
25 30 <li class="wpc-filter-slug"><?php echo esc_html( $filter['slug']['value'] ); ?></li>
26 31 </ul>
27 32 </div>
@@ -26,9 +31,9 @@
26 31 </ul>
27 32 </div>
28 33 </div>
29 34 <div class="wpc-filter-body">
30 - <div class="wpc-additional-fields-selector"><a href="#" class="wpc-more-options-toggle"><?php esc_html_e('More options', 'filter-everything'); ?></a></div>
35 + <div class="wpc-additional-fields-selector"><a href="javascript:void(0);" class="wpc-more-options-toggle button"><?php esc_html_e('More options', 'filter-everything'); ?></a></div>
31 36 <div class="wpc-filter-main-fields">
32 37 <table class="wpc-form-fields-table wpc-filter-<?php echo esc_attr($short_entity); ?>">
33 38 <tr class="wpc-filter-tr">
34 39 <td colspan="2">
@@ -42,17 +47,21 @@
42 47 </td>
43 48 </tr>
44 49 <?php
45 50
46 - $first_filters = flrt_extract_vars($filter, array('label', 'entity', 'instead-entity', 'e_name', 'slug', 'view') );
51 + $first_filters = flrt_extract_vars($filter, array( 'entity', 'instead-entity', 'e_name', 'label', 'slug', 'view', 'date_type', 'show_term_names', 'selected_and_above', 'show_range_list', 'range_list_input' ) );
47 52
48 53 foreach( $first_filters as $field_key => $field_attributes ){
49 54
50 - flrt_include_admin_view('filter-field', array(
51 - 'field_key' => $field_key,
52 - 'attributes' => $field_attributes
53 - )
54 - );
55 + if( isset( $field_attributes['skip_view'] ) && $field_attributes['skip_view'] ){
56 + do_action_ref_array( 'wpc_cycle_filter_fields', array( &$first_filters, $field_key ) );
57 + } else {
58 + flrt_include_admin_view('filter-field', array(
59 + 'field_key' => $field_key,
60 + 'attributes' => $field_attributes
61 + )
62 + );
63 + }
55 64 }
56 65 ?>
57 66 </table>
58 67 </div>
@@ -60,15 +69,19 @@
60 69 <div class="wpc-filter-additional-fields">
61 70 <table class="wpc-form-fields-table wpc-filter-<?php echo esc_attr($short_entity); ?>">
62 71 <?php
63 72
64 - foreach( $filter as $field_key => $field_attributes ){
73 + foreach( $filter as $field_key => $field_attributes ) {
65 74
66 - flrt_include_admin_view('filter-field', array(
67 - 'field_key' => $field_key,
68 - 'attributes' => $field_attributes
69 - )
70 - );
75 + if( isset( $field_attributes['skip_view'] ) && $field_attributes['skip_view'] ) {
76 + do_action_ref_array( 'wpc_cycle_filter_fields', array( &$filter, $field_key ) );
77 + } else {
78 + flrt_include_admin_view('filter-field', array(
79 + 'field_key' => $field_key,
80 + 'attributes' => $field_attributes
81 + )
82 + );
83 + }
71 84 }
72 85
73 86 ?>
74 87 </table>