PluginProbe
Nested Pages / 1.2.0
Nested Pages v1.2.0
3.3.1 3.2.15 3.2.14 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 trunk 1.0 1.1 1.1.1 1.1.2 1.1.3 All 106 releases
wp-nested-pages / app / Views / new-child.php
new-child.php
87 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $post_type_object = get_post_type_object( 'page' );
3 $can_publish = current_user_can( $post_type_object->cap->publish_posts );
4 ?>
5 <form method="get" action="">
6 <div class="form-interior">
7 <h3><strong><?php _e('Add Child Page'); ?></strong><span class="parent_name"></span></h3>
8
9 <div class="np-quickedit-error" style="clear:both;display:none;"></div>
10
11 <div class="fields">
12
13 <div class="left">
14
15 <ol class="new-page-titles">
16 <li>
17 <i class="handle np-icon-menu"></i>
18 <div class="form-control new-child-row">
19 <label><?php _e( 'Title' ); ?></label>
20 <div>
21 <input type="text" name="post_title[]" class="np_title" placeholder="<?php _e('Page Title', 'nestedpages'); ?>" value="" />
22 <a href="#" class="button-secondary np-remove-child">-</a>
23 </div>
24 </div>
25 </li>
26 </ol>
27
28 <a href="#" class="add-new-child-row button-primary" style="clear:both;"><?php _e('+', 'nestedpages'); ?></a>
29 </div><!-- .left -->
30
31
32 <div class="right">
33
34 <div class="form-control">
35 <label><?php _e( 'Status' ); ?></label>
36 <select name="_status" class="np_status">
37 <?php if ( $can_publish ) : ?>
38 <option value="publish"><?php _e( 'Published' ); ?></option>
39 <?php endif; ?>
40 <option value="draft"><?php _e( 'Draft' ); ?></option>
41 </select>
42 </div>
43
44 <?php
45 /*
46 * Authors Dropdown
47 */
48 $authors_dropdown = '';
49 if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) :
50 $users_opt = array(
51 'hide_if_only_one_author' => false,
52 'who' => 'authors',
53 'name' => 'post_author',
54 'id' => 'post_author',
55 'class'=> 'authors',
56 'multi' => 1,
57 'echo' => 0
58 );
59
60 if ( $authors = wp_dropdown_users( $users_opt ) ) :
61 $authors_dropdown = '<div class="form-control np_author"><label>' . __( 'Author' ) . '</label>';
62 $authors_dropdown .= $authors;
63 $authors_dropdown .= '</div>';
64 endif;
65 echo $authors_dropdown;
66 endif;
67 ?>
68
69 </div><!-- .right -->
70
71 </div><!-- .fields -->
72
73 </div><!-- .form-interior -->
74
75
76 <div class="buttons">
77 <input type="hidden" name="parent_id" class="page_parent_id" />
78 <a accesskey="c" href="#" class="button-secondary alignleft np-cancel-newchild">
79 <?php _e( 'Cancel' ); ?>
80 </a>
81 <a accesskey="s" href="#" class="button-primary np-save-newchild alignright">
82 <?php _e( 'Add Page' ); ?>
83 </a>
84 <span class="np-qe-loading"></span>
85 </div>
86 </form>
87