-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpost-form.php
More file actions
72 lines (63 loc) · 2.64 KB
/
post-form.php
File metadata and controls
72 lines (63 loc) · 2.64 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
<?php
// Get ID's to work with the post form
$user = get_userdata( $current_user->ID );
$first_name = attribute_escape( $user->first_name );
$prioridades = get_option('bach_priorities');
$priorities = get_cat_id($prioridades);
$proyectos = get_option('bach_projects');
$projects = get_cat_id($proyectos);
$usuarios = get_option('bach_users');
$users = get_cat_id($usuarios);
// POST FORM
?>
<div align="center">
<div id="postbox">
<form id="new_post" name="new_post" method="post" action="<?php bloginfo( 'url' ); ?>/">
<input type="hidden" name="action" value="post" />
<?php wp_nonce_field( 'new-post' ); ?>
<?php echo prologue_get_avatar( $user->ID, $user->user_email, 48 ); ?>
<input type="text" name="postTitle" id="postTitle" tabindex="1" size="60" />
<br />
<textarea name="posttext" id="posttext" rows="3" cols="60" tabindex="2" ></textarea>
<label for="cats" id="tags"><?php _e('Categories', 'bach'); ?></label>
<span style="padding-left: 70px;"> <?php wp_dropdown_categories( array(
'hide_empty' => 0,
'name' => 'prioridad',
'orderby' => 'name',
'class' => 'catSelection',
'heirarchical' => 1,
'child_of' => $priorities,
'show_option_none' => __('Priority','bach'),
//'selected' => , // how to select default cat by default?
'tab_index' => 3
)
); ?>
<?php wp_dropdown_categories( array(
'hide_empty' => 0,
'name' => 'proyecto',
'orderby' => 'name',
'class' => 'catSelection',
'heirarchical' => 1,
'child_of' => $projects,
'show_option_none' => __('Project','bach'),
//'selected' => , // how to select default cat by default?
'tab_index' => 4
)
); ?>
<?php wp_dropdown_categories( array(
'hide_empty' => 0,
'name' => 'usuario',
'orderby' => 'name',
'class' => 'catSelection',
'heirarchical' => 1,
'child_of' => $users,
'show_option_none' => __('User','bach'),
//'selected' => , // how to select default cat by default?
'tab_index' => 5
)
); ?>
<input id="submit" type="submit" value="<?php _e('Publish','bach'); ?>" style="margin-left: 30px;margin-bottom: 20px;" tabindex="7" />
</form>
</div> <!-- // postbox -->
</div><!-- // center -->
<?php echo $post_category; ?>