-
Notifications
You must be signed in to change notification settings - Fork 0
/
extra-neighborhood-fields.php
86 lines (81 loc) · 2.47 KB
/
extra-neighborhood-fields.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
global $post;
$custom = get_post_custom($post->ID);
/**
* $is_active keeps getting reset to an empty string and I don't know why
* So I'm going to use the boundaries to determine if it's active (until I figure it out)
*/
$is_active = $custom['neighborhood_is_active'][0];
$north_boundary = (array_key_exists('north_boundary', $custom)) ? $custom['north_boundary'][0] : '';
$east_boundary = (array_key_exists('east_boundary', $custom)) ? $custom['east_boundary'][0] : '';
$south_boundary = (array_key_exists('south_boundary', $custom)) ? $custom['south_boundary'][0] : '';
$west_boundary = (array_key_exists('west_boundary', $custom)) ? $custom['west_boundary'][0] : '';
$expires_at = (array_key_exists('expires_at', $custom)) ? $custom['expires_at'][0] : '';
?>
<table class="form-table">
<!--
<tr>
<th>
<label for="wbb-neighborhood-is-active">
Is Active:
</label>
</th>
<td>
<select name="neighborhood_is_active" id="wbb-neighborhood-is-active">
<option value="0"<?php if ($is_active == '0') { ?> selected<?php } ?>>No</option>
<option value="1"<?php if ($is_active == '1') { ?> selected<?php } ?>>Yes</option>
</select>
</td>
</tr>
-->
<tr>
<th>
<label for="wbb-neighborhood-expires-at">
Last Day to Register:
</label>
</th>
<td>
<input name="expires_at" id="wbb-neighborhood-expires-at" value="<?php echo esc_html($expires_at); ?>" placeholder="ex: 10/15/2015">
</td>
</tr>
<tr>
<th>
<label for="wbb-neighborhood-north-boundary">
North Boundary:
</label>
</th>
<td>
<input name="north_boundary" id="wbb-neighborhood-north-boundary" value="<?php echo esc_html($north_boundary); ?>" placeholder="ex: 47.1234">
</td>
</tr>
<tr>
<th>
<label for="wbb-neighborhood-east-boundary">
East Boundary:
</label>
</th>
<td>
<input name="east_boundary" id="wbb-neighborhood-east-boundary" value="<?php echo esc_html($east_boundary); ?>" placeholder="ex: -117.1234">
</td>
</tr>
<tr>
<th>
<label for="wbb-neighborhood-south-boundary">
South Boundary:
</label>
</th>
<td>
<input name="south_boundary" id="wbb-neighborhood-south-boundary" value="<?php echo esc_html($south_boundary); ?>" placeholder="ex: 47.1234">
</td>
</tr>
<tr>
<th>
<label for="wbb-neighborhood-west-boundary">
West Boundary:
</label>
</th>
<td>
<input name="west_boundary" id="wbb-neighborhood-west-boundary" value="<?php echo esc_html($west_boundary); ?>" placeholder="ex: -117.1234">
</td>
</tr>
</table>