PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.4.0-beta2
Secure Custom Fields v6.4.0-beta2
6.9.5 6.9.4 6.9.3 6.9.2 6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / includes / admin / views / acf-field-group / location-rule.php
secure-custom-fields / includes / admin / views / acf-field-group Last commit date
conditional-logic.php 1 year ago field.php 1 year ago fields.php 1 year ago index.php 1 year ago list-empty.php 1 year ago location-group.php 1 year ago location-rule.php 1 year ago locations.php 1 year ago options.php 1 year ago
location-rule.php
90 lines
1 <?php
2
3 // vars
4 $prefix = 'acf_field_group[location][' . $rule['group'] . '][' . $rule['id'] . ']';
5
6 ?>
7 <tr data-id="<?php echo esc_attr( $rule['id'] ); ?>">
8 <td class="param">
9 <?php
10
11 // vars
12 $choices = acf_get_location_rule_types();
13
14 // array
15 if ( is_array( $choices ) ) {
16 acf_render_field(
17 array(
18 'type' => 'select',
19 'name' => 'param',
20 'prefix' => $prefix,
21 'value' => $rule['param'],
22 'choices' => $choices,
23 'class' => 'refresh-location-rule',
24 )
25 );
26 }
27
28 ?>
29 </td>
30 <td class="operator">
31 <?php
32
33 // vars
34 $choices = acf_get_location_rule_operators( $rule );
35
36
37 // array
38 if ( is_array( $choices ) ) {
39 acf_render_field(
40 array(
41 'type' => 'select',
42 'name' => 'operator',
43 'prefix' => $prefix,
44 'value' => $rule['operator'],
45 'choices' => $choices,
46 )
47 );
48
49 // custom
50 } else {
51 echo acf_esc_html( $choices );
52 }
53
54 ?>
55 </td>
56 <td class="value">
57 <?php
58
59 // vars
60 $choices = acf_get_location_rule_values( $rule );
61
62
63 // array
64 if ( is_array( $choices ) ) {
65 acf_render_field(
66 array(
67 'type' => 'select',
68 'name' => 'value',
69 'class' => 'location-rule-value',
70 'prefix' => $prefix,
71 'value' => $rule['value'],
72 'choices' => $choices,
73 )
74 );
75
76 // custom
77 } else {
78 echo acf_esc_html( $choices );
79 }
80
81 ?>
82 </td>
83 <td class="add">
84 <a href="#" class="button add-location-rule"><?php esc_html_e( 'and', 'acf' ); ?></a>
85 </td>
86 <td class="remove">
87 <a href="#" class="acf-icon -minus remove-location-rule"></a>
88 </td>
89 </tr>
90