PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / trunk
Secure Custom Fields vtrunk
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 2 months ago fields.php 2 months ago index.php 1 year ago list-empty.php 8 months ago location-group.php 1 year ago location-rule.php 8 months ago locations.php 8 months ago options.php 8 months ago
location-rule.php
89 lines
1 <?php
2
3 // vars
4 $prefix = 'acf_field_group[location][' . $rule['group'] . '][' . $rule['id'] . ']';
5 ?>
6 <tr data-id="<?php echo esc_attr( $rule['id'] ); ?>">
7 <td class="param">
8 <?php
9
10 // vars
11 $choices = acf_get_location_rule_types();
12
13 // array
14 if ( is_array( $choices ) ) {
15 acf_render_field(
16 array(
17 'type' => 'select',
18 'name' => 'param',
19 'prefix' => $prefix,
20 'value' => $rule['param'],
21 'choices' => $choices,
22 'class' => 'refresh-location-rule',
23 )
24 );
25 }
26
27 ?>
28 </td>
29 <td class="operator">
30 <?php
31
32 // vars
33 $choices = acf_get_location_rule_operators( $rule );
34
35
36 // array
37 if ( is_array( $choices ) ) {
38 acf_render_field(
39 array(
40 'type' => 'select',
41 'name' => 'operator',
42 'prefix' => $prefix,
43 'value' => $rule['operator'],
44 'choices' => $choices,
45 )
46 );
47
48 // custom
49 } else {
50 echo acf_esc_html( $choices );
51 }
52
53 ?>
54 </td>
55 <td class="value">
56 <?php
57
58 // vars
59 $choices = acf_get_location_rule_values( $rule );
60
61
62 // array
63 if ( is_array( $choices ) ) {
64 acf_render_field(
65 array(
66 'type' => 'select',
67 'name' => 'value',
68 'class' => 'location-rule-value',
69 'prefix' => $prefix,
70 'value' => $rule['value'],
71 'choices' => $choices,
72 )
73 );
74
75 // custom
76 } else {
77 echo acf_esc_html( $choices );
78 }
79
80 ?>
81 </td>
82 <td class="add">
83 <a href="#" class="button add-location-rule"><?php esc_html_e( 'and', 'secure-custom-fields' ); ?></a>
84 </td>
85 <td class="remove">
86 <a href="#" class="acf-icon -minus remove-location-rule"></a>
87 </td>
88 </tr>
89