PluginProbe ʕ •ᴥ•ʔ
Nested Pages / 3.2.15
Nested Pages v3.2.15
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 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.3.0 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.2 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.3.1 1.6.3.2 1.6.4 1.6.5 1.6.5.1 1.6.5.2 1.6.6 1.6.7 1.6.8 1.7.0 1.7.1 2.0.1 2.0.2 2.0.3 2.0.4 3.0.1 3.0.10 3.0.11 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.21 3.1.22 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7
wp-nested-pages / app / Views / forms / new-child.php
wp-nested-pages / app / Views / forms Last commit date
bulk-add.php 6 years ago clone-form.php 3 years ago delete-confirmation-modal.php 6 years ago empty-trash-modal.php 6 years ago link-form.php 2 days ago new-child.php 2 days ago quickedit-link.php 6 years ago quickedit-post.php 2 days ago
new-child.php
123 lines
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="" class="np-new-child-form">
6 <div class="form-interior">
7 <h3 data-new-post-relation-title><strong><?php _e('Add Child', 'wp-nested-pages'); ?></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 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg>
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('Title', 'wp-nested-pages'); ?>" value="" tabindex="1" />
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('+', 'wp-nested-pages'); ?></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 = [
51 'hide_if_only_one_author' => false,
52 'capability' => 'edit_posts',
53 'name' => 'post_author',
54 'id' => 'post_author',
55 'class'=> 'authors',
56 'multi' => 1,
57 'echo' => 0,
58 'selected' => get_current_user_id()
59 ];
60
61 if ( $authors = wp_dropdown_users( $users_opt ) ) :
62 $authors_dropdown = '<div class="form-control np_author"><label>' . __( 'Author' ) . '</label>';
63 $authors_dropdown .= $authors;
64 $authors_dropdown .= '</div>';
65 endif;
66 echo $authors_dropdown;
67 endif;
68 ?>
69
70 <?php if ( $this->post_type->hierarchical ) : ?>
71 <div class="form-control">
72 <label><?php _e( 'Template' ); ?></label>
73 <select name="page_template" class="np_template">
74 <option value="default"><?php _e( 'Default Template' ); ?></option>
75 <?php
76 if ( is_page() ){
77 page_template_dropdown();
78 } else {
79 page_template_dropdown('', $this->post_type->name);
80 }
81 ?>
82 </select>
83 </div>
84 <?php endif; ?>
85
86 <?php if ( $this->post_type->name == 'page' && $this->user->canSortPosts($this->post_type->name) && !$this->listing_repo->isSearch() ) : ?>
87 <div class="form-control full checkbox">
88 <label>
89 <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" <?php if ( $this->settings->defaultHideInNav() ) echo 'checked'; ?> />
90 <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'wp-nested-pages' ); ?></span>
91 </label>
92 </div>
93 <?php endif; ?>
94
95 </div><!-- .right -->
96
97 </div><!-- .fields -->
98
99 </div><!-- .form-interior -->
100
101
102 <div class="buttons">
103 <div class="buttons-inner">
104 <input type="hidden" name="parent_id" class="page_parent_id" />
105 <input type="hidden" name="before_id" class="page_before_id" />
106 <input type="hidden" name="after_id" class="page_after_id" />
107 <input type="hidden" name="post_type" value="<?php echo $this->post_type->name; ?>" />
108 <a accesskey="c" href="#" class="button-secondary alignleft np-cancel-newchild" data-nestedpages-modal-close>
109 <?php _e( 'Cancel' ); ?>
110 </a>
111 <a accesskey="s" href="#" class="button-primary np-save-newchild alignright" style="margin-left:10px;">
112 <?php _e( 'Add', 'wp-nested-pages' ); ?>
113 </a>
114 <a href="#" class="button-secondary np-save-newchild add-edit alignright">
115 <?php _e( 'Add & Edit', 'wp-nested-pages' ); ?>
116 </a>
117 <div class="np-qe-loading">
118 <?php include( NestedPages\Helpers::asset('images/spinner.svg') ); ?>
119 </div>
120 </div>
121 </div>
122 </form>
123