-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin-options-page.php
75 lines (68 loc) · 1.8 KB
/
admin-options-page.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
<?php
if ( !current_user_can( 'manage_options' ) ) {
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
}
function plugin_section_text(){
?>
<div class="wrap">
<?php plugin_section_text(); ?>
<form method="post" action="options.php">
<?php settings_fields('twc_bps_options'); ?>
<h2>Blog Post Service Options</h2>
<table class="form-table">
<tr>
<th scope="row">
<label for="table-data">Table Header</label>
</th>
<td>
<input name="" type="text" id="table-data" value="Table Data" class="regular-text" />
</td>
</tr>
<tr>
<th scope="row">
<label for="number-of-posts">Number of Posts</label>
</th>
<td>
<input name="" type="number" step="1" min="1" id="number-of-posts" value="1" class="small-text" />
</td>
</tr>
<tr>
<th scope="row">
<label for="table-data">Service Slug</label><br>
</th>
<td>
<input name="" type="text" id="table-data" value="blog-service" class="regular-text" />
<p>
This is the URL name that you would like to serve your Blog Post Service from<br>
For Example "http://your-site-name.org/blog-post-service"
</p>
</td>
</tr>
</table>
<h3>Blog Parts</h3>
<hr>
<p>
Please select which parts of the blog post you wish to display.
</p>
<table class="form-table">
<?php
foreach ($postPartKeyArray as $key=>$value) {
?>
<tr>
<th scope="row">
<label for="post-part-<?php echo $value; ?>"><?php echo $key; ?></label><br>
</th>
<td>
<input name="<?php echo $value;?>" type="checkbox" id="post-part-<?php echo $value; ?>" value="1" />
</td>
</tr>
<?php
}
?>
</table>
</form>
</div>
<?php
}
echo plugin_section_text();
?>