PluginProbe
Nested Pages / 1.1.9
Nested Pages v1.1.9
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 / views / quickedit.php
quickedit.php
191 lines 6.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * See public inline_edit method of WP_Posts_List_Table class
4 */
5 $post_type_object = get_post_type_object( 'page' );
6 $can_publish = current_user_can( $post_type_object->cap->publish_posts );
7 ?>
8
9 <form method="get" action="">
10 <div class="form-interior">
11 <h3><?php _e('Quick Edit'); ?><span class="page_id"></span></h3>
12
13 <div class="np-quickedit-error" style="clear:both;display:none;"></div>
14
15 <div class="fields">
16
17 <div class="left">
18
19 <div class="form-control">
20 <label><?php _e( 'Title' ); ?></label>
21 <input type="text" name="post_title" class="np_title" value="" />
22 </div>
23 <div class="form-control">
24 <label><?php _e( 'Slug' ); ?></label>
25 <input type="text" name="post_name" class="np_slug" value="" />
26 </div>
27 <div>
28 <label><?php _e( 'Date' ); ?></label>
29 <div class="dates"><?php touch_time( 1, 1, 0, 1 ); ?></div>
30 </div>
31
32 <?php
33 /*
34 * Authors Dropdown
35 */
36 $authors_dropdown = '';
37 if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) :
38 $users_opt = array(
39 'hide_if_only_one_author' => false,
40 'who' => 'authors',
41 'name' => 'post_author',
42 'id' => 'post_author',
43 'class'=> 'authors',
44 'multi' => 1,
45 'echo' => 0
46 );
47
48 if ( $authors = wp_dropdown_users( $users_opt ) ) :
49 $authors_dropdown = '<div class="form-control np_author"><label>' . __( 'Author' ) . '</label>';
50 $authors_dropdown .= $authors;
51 $authors_dropdown .= '</div>';
52 endif;
53 echo $authors_dropdown;
54 endif;
55 ?>
56
57 <div class="form-control">
58 <label><?php _e( 'Status' ); ?></label>
59 <select name="_status" class="np_status">
60 <?php if ( $can_publish ) : ?>
61 <option value="publish"><?php _e( 'Published' ); ?></option>
62 <option value="future"><?php _e( 'Scheduled' ); ?></option>
63 <?php endif; ?>
64 <option value="pending"><?php _e( 'Pending Review' ); ?></option>
65 <option value="draft"><?php _e( 'Draft' ); ?></option>
66 </select>
67 </div>
68
69 </div><!-- .left -->
70
71 <div class="right">
72 <div class="form-control">
73 <label><?php _e( 'Template' ); ?></label>
74 <select name="page_template" class="np_template">
75 <option value="default"><?php _e( 'Default Template' ); ?></option>
76 <?php page_template_dropdown() ?>
77 </select>
78 </div>
79
80 <?php if ( $can_publish ) : ?>
81 <div class="form-control password">
82 <label><?php _e( 'Password' ); ?></label>
83 <input type="text" class="post_password" name="post_password" value="" />
84 <div class="private">
85 <em style="margin:2px 8px 0 0" class="alignleft"><?php _e( '&ndash;OR&ndash;' ); ?></em>
86 <label>
87 <input type="checkbox" class="keep_private" name="keep_private" value="private" />
88 <?php echo __( 'Private' ); ?>
89 </label>
90 </div>
91 </div>
92 <?php endif; ?>
93
94 <div class="comments">
95 <label>
96 <input type="checkbox" name="comment_status" class="np_cs" value="open" />
97 <span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
98 </label>
99 </div>
100
101 <?php if ( current_user_can('edit_theme_options') ) : ?>
102 <div class="comments">
103 <label>
104 <input type="checkbox" name="nested_pages_status" class="np_status" value="hide" />
105 <span class="checkbox-title"><?php _e( 'Hide in Nested Pages', 'nestedpages' ); ?></span>
106 </label>
107 </div>
108 <?php endif; // Edit theme options?>
109
110
111 <?php if ( $this->user->canSortPages() ) : // Menu Options Button ?>
112 <div class="form-control np-toggle-options">
113 <a href="#" class="np-btn np-btn-half np-toggle-menuoptions"><?php _e('Menu Options', 'nestedpages'); ?></a>
114 <?php if ( !empty($this->h_taxonomies) ) : ?>
115 <a href="#" class="np-btn np-btn-half btn-right np-toggle-taxonomies"><?php _e('Taxonomies', 'nestedpages'); ?></a>
116 <?php endif; ?>
117 </div>
118 <?php endif; ?>
119
120 </div><!-- .right -->
121
122 <?php if ( !empty($this->h_taxonomies) ) : ?>
123 <div class="np-taxonomies">
124 <?php foreach ( $this->h_taxonomies as $taxonomy ) : ?>
125 <div class="np-taxonomy">
126 <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span>
127 <input type="hidden" name="<?php echo ( $taxonomy->name == 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
128 <ul class="cat-checklist <?php echo esc_attr( $taxonomy->name )?>-checklist">
129 <?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ) ?>
130 </ul>
131 </div><!-- .np-taxonomy -->
132 <?php endforeach; ?>
133
134 <?php foreach ( $this->f_taxonomies as $taxonomy ) : ?>
135 <div class="np-taxonomy">
136 <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span>
137 <textarea id="<?php echo esc_attr($taxonomy->name); ?>" cols="22" rows="1" name="tax_input[<?php echo esc_attr( $taxonomy->name )?>]" class="tax_input_<?php echo esc_attr( $taxonomy->name )?>" data-autotag data-taxonomy="<?php echo esc_attr($taxonomy->name); ?>"></textarea>
138 </div><!-- .np-taxonomy -->
139 <?php endforeach; ?>
140 </div><!-- .taxonomies -->
141 <?php endif; // if taxonomies ?>
142
143
144 <?php if ( $this->user->canSortPages() ) : // Menu Options?>
145 <div class="np-menuoptions">
146 <div class="menuoptions-left">
147 <div class="form-control">
148 <label><?php _e( 'Navigation Label' ); ?></label>
149 <input type="text" name="np_nav_title" class="np_nav_title" value="" />
150 </div>
151 <div class="form-control">
152 <label><?php _e( 'Title Attribute' ); ?></label>
153 <input type="text" name="np_title_attribute" class="np_title_attribute" value="" />
154 </div>
155 <div class="form-control">
156 <label><?php _e( 'CSS Classes' ); ?></label>
157 <input type="text" name="np_nav_css_classes" class="np_nav_css_classes" value="" />
158 </div>
159 </div><!-- .menuoptions-left -->
160 <div class="menuoptions-right">
161 <div class="form-control">
162 <label>
163 <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" />
164 <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'nestedpages' ); ?></span>
165 </label>
166 </div>
167 <div class="form-control">
168 <label>
169 <input type="checkbox" name="link_target" class="link_target" value="_blank" />
170 <span class="checkbox-title"><?php _e( 'Open link in a new window/tab' ); ?></span>
171 </label>
172 </div>
173 </div><!-- .menuoptions-right -->
174 </div>
175 <?php endif; ?>
176
177 </div><!-- .fields -->
178
179 </div><!-- .form-interior -->
180
181 <div class="buttons">
182 <input type="hidden" name="post_id" class="np_id" value="<?php echo get_the_id(); ?>">
183 <a accesskey="c" href="#inline-edit" class="button-secondary alignleft np-cancel-quickedit">
184 <?php _e( 'Cancel' ); ?>
185 </a>
186 <a accesskey="s" href="#inline-edit" class="button-primary np-save-quickedit alignright">
187 <?php _e( 'Update' ); ?>
188 </a>
189 <span class="np-qe-loading"></span>
190 </div>
191 </form>