-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit-post.php
More file actions
76 lines (67 loc) · 2.47 KB
/
edit-post.php
File metadata and controls
76 lines (67 loc) · 2.47 KB
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
<?php
require('template/temp-header.php');
$post_ID = @$_GET['post'];
?>
<section class="content-header">
<h1>
Edit posts
</h1>
</section>
<?php if($post_ID == ""):?>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-12">
<!--The main input box, and text field-->
<?php add_metabox_top('Edit post', 'large')?>
<?php get_all_posts('post');?>
<?php add_metabox_bottom()?>
</div>
</div><!-- /.row -->
</section><!-- /.content -->
<?php endif;?>
<?php if($post_ID != ""): ?>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-9">
<!--The main input box, and text field-->
<?php add_metabox_top('Edit Post', 'large')?>
<?php add_form_start('nw_post_editor_edit', 'nw_post_editor_name_edit');?>
<div class="col-md-12">
<input type"text" id="nw_title_post_edit" name="nw_title_post_edit" class="form-control" value="<?php get_the_title($post_ID); ?>" placeholder="Enter title here"/></br>
<?php echo add_editor('nw_post_editor_edit', 'nw_post_editor_name_edit', get_the_content($post_ID))?>
</div>
<?php add_metabox_bottom()?>
<!--/END The mian input box, and text field-->
</div>
<div class="col-md-3">
<!--The publish box-->
<?php add_metabox_top('Publish', 'large')?>
<div class="col-md-12">
<div class="col-md-6 text-left">
<input type="submit" id="update_draft" name="update_draft" class="btn btn-default" value="Save Draft" /> </br></br>
<i class="fa fa-circle"></i> Status: <b><?php get_post_status($post_ID);?></b>
</div>
<div class="col-md-6 text-right">
<input type="submit" id="delete_post" name="delete_post" class="btn btn-default text-right" value="Delete post" /></br></br>
<input type="submit" id="update_post" name="update_post" class="btn btn-primary" value="Update"/>
</div>
</div>
<?php add_metabox_bottom();?>
<!--/END The publish box-->
<!--The category box-->
<?php add_metabox_top('Category', 'large')?>
<div class="col-md-12">
<?php get_post_category_edit($post_ID);?>
</div>
<?php add_metabox_bottom();?>
</form>
<!--/END The publish box-->
</div>
</div><!-- /.row -->
</section><!-- /.content -->
<?php endif;?>
<?php
require('template/temp-footer.php');
?>