PluginProbe
Advanced Custom Fields (ACF®) / 5.9.4
Advanced Custom Fields (ACF®) v5.9.4
6.8.9 6.8.8 6.8.7 6.8.6 6.8.5 6.8.4 6.8.3 6.8.2 6.8.1 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.2 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 All 230 releases
advanced-custom-fields / includes / admin / views / html-location-rule.php
html-location-rule.php
91 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 // vars
4 $prefix = 'acf_field_group[location]['.$rule['group'].']['.$rule['id'].']';
5
6 ?>
7 <tr data-id="<?php echo $rule['id']; ?>">
8 <td class="param">
9 <?php
10
11 // vars
12 $choices = acf_get_location_rule_types();
13
14
15 // array
16 if( is_array($choices) ) {
17
18 acf_render_field(array(
19 'type' => 'select',
20 'name' => 'param',
21 'prefix' => $prefix,
22 'value' => $rule['param'],
23 'choices' => $choices,
24 'class' => 'refresh-location-rule'
25 ));
26
27 }
28
29 ?>
30 </td>
31 <td class="operator">
32 <?php
33
34 // vars
35 $choices = acf_get_location_rule_operators( $rule );
36
37
38 // array
39 if( is_array($choices) ) {
40
41 acf_render_field(array(
42 'type' => 'select',
43 'name' => 'operator',
44 'prefix' => $prefix,
45 'value' => $rule['operator'],
46 'choices' => $choices
47 ));
48
49 // custom
50 } else {
51
52 echo $choices;
53
54 }
55
56 ?>
57 </td>
58 <td class="value">
59 <?php
60
61 // vars
62 $choices = acf_get_location_rule_values( $rule );
63
64
65 // array
66 if( is_array($choices) ) {
67
68 acf_render_field(array(
69 'type' => 'select',
70 'name' => 'value',
71 'prefix' => $prefix,
72 'value' => $rule['value'],
73 'choices' => $choices
74 ));
75
76 // custom
77 } else {
78
79 echo $choices;
80
81 }
82
83 ?>
84 </td>
85 <td class="add">
86 <a href="#" class="button add-location-rule"><?php _e("and",'acf'); ?></a>
87 </td>
88 <td class="remove">
89 <a href="#" class="acf-icon -minus remove-location-rule"></a>
90 </td>
91 </tr>