bulk-add.php
11 years ago
empty-trash-modal.php
11 years ago
link-form.php
11 years ago
new-child.php
11 years ago
quickedit-link.php
11 years ago
quickedit-post.php
11 years ago
quickedit-post.php
214 lines
| 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 | |
| 28 | <?php if ( $this->settings->datepickerEnabled() ) : ?> |
| 29 | <div class="form-control np-datepicker-container"> |
| 30 | <label><?php _e( 'Date' ); ?></label> |
| 31 | <div class="datetime"> |
| 32 | <input type="text" name="np_date" class="np_datepicker" value="" /> |
| 33 | <span><?php _e('@', 'nestedpages'); ?></span> |
| 34 | <div class="np-time-container"> |
| 35 | <select name="np_ampm" class="np_ampm"> |
| 36 | <option value="am"><?php _e('am', 'nestedpages'); ?></option> |
| 37 | <option value="pm"><?php _e('pm', 'nestedpages'); ?></option> |
| 38 | </select> |
| 39 | <input type="text" name="np_time" class="np_time" value="" /> |
| 40 | </div> |
| 41 | </div> |
| 42 | </div> |
| 43 | <?php else : ?> |
| 44 | <div> |
| 45 | <label><?php _e( 'Date' ); ?></label> |
| 46 | <div class="dates"><?php touch_time( 1, 1, 0, 1 ); ?></div> |
| 47 | </div> |
| 48 | <?php endif; ?> |
| 49 | |
| 50 | <?php |
| 51 | /* |
| 52 | * Authors Dropdown |
| 53 | */ |
| 54 | $authors_dropdown = ''; |
| 55 | if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) : |
| 56 | $users_opt = array( |
| 57 | 'hide_if_only_one_author' => false, |
| 58 | 'who' => 'authors', |
| 59 | 'name' => 'post_author', |
| 60 | 'id' => 'post_author', |
| 61 | 'class'=> 'authors', |
| 62 | 'multi' => 1, |
| 63 | 'echo' => 0 |
| 64 | ); |
| 65 | |
| 66 | if ( $authors = wp_dropdown_users( $users_opt ) ) : |
| 67 | $authors_dropdown = '<div class="form-control np_author"><label>' . __( 'Author' ) . '</label>'; |
| 68 | $authors_dropdown .= $authors; |
| 69 | $authors_dropdown .= '</div>'; |
| 70 | endif; |
| 71 | echo $authors_dropdown; |
| 72 | endif; |
| 73 | ?> |
| 74 | |
| 75 | <div class="form-control"> |
| 76 | <label><?php _e( 'Status' ); ?></label> |
| 77 | <select name="_status" class="np_status"> |
| 78 | <?php if ( $can_publish ) : ?> |
| 79 | <option value="publish"><?php _e( 'Published' ); ?></option> |
| 80 | <option value="future"><?php _e( 'Scheduled' ); ?></option> |
| 81 | <?php endif; ?> |
| 82 | <option value="pending"><?php _e( 'Pending Review' ); ?></option> |
| 83 | <option value="draft"><?php _e( 'Draft' ); ?></option> |
| 84 | </select> |
| 85 | </div> |
| 86 | |
| 87 | </div><!-- .left --> |
| 88 | |
| 89 | <div class="right"> |
| 90 | |
| 91 | <?php if ( $this->post_type->hierarchical ) : ?> |
| 92 | <div class="form-control"> |
| 93 | <label><?php _e( 'Template' ); ?></label> |
| 94 | <select name="page_template" class="np_template"> |
| 95 | <option value="default"><?php _e( 'Default Template' ); ?></option> |
| 96 | <?php page_template_dropdown() ?> |
| 97 | </select> |
| 98 | </div> |
| 99 | <?php endif; ?> |
| 100 | |
| 101 | <?php if ( $can_publish ) : ?> |
| 102 | <div class="form-control password"> |
| 103 | <label><?php _e( 'Password' ); ?></label> |
| 104 | <input type="text" class="post_password" name="post_password" value="" /> |
| 105 | <div class="private"> |
| 106 | <em style="margin:2px 8px 0 0" class="alignleft"><?php _e( '–OR–' ); ?></em> |
| 107 | <label> |
| 108 | <input type="checkbox" class="keep_private" name="keep_private" value="private" /> |
| 109 | <?php echo __( 'Private' ); ?> |
| 110 | </label> |
| 111 | </div> |
| 112 | </div> |
| 113 | <?php endif; ?> |
| 114 | |
| 115 | <div class="comments"> |
| 116 | <label> |
| 117 | <input type="checkbox" name="comment_status" class="np_cs" value="open" /> |
| 118 | <span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span> |
| 119 | </label> |
| 120 | </div> |
| 121 | |
| 122 | <?php if ( current_user_can('edit_theme_options') ) : ?> |
| 123 | <div class="comments"> |
| 124 | <label> |
| 125 | <input type="checkbox" name="nested_pages_status" class="np_status" value="hide" /> |
| 126 | <span class="checkbox-title"><?php _e( 'Hide in Nested Pages', 'nestedpages' ); ?></span> |
| 127 | </label> |
| 128 | </div> |
| 129 | <?php endif; // Edit theme options?> |
| 130 | |
| 131 | |
| 132 | |
| 133 | <div class="form-control np-toggle-options"> |
| 134 | <?php if ( $this->user->canSortPages() && $this->post_type->name == 'page' && !$this->isSearch() ) : ?> |
| 135 | <a href="#" class="np-btn np-btn-half np-toggle-menuoptions"><?php _e('Menu Options', 'nestedpages'); ?></a> |
| 136 | <?php endif; ?> |
| 137 | |
| 138 | <?php if ( !empty($this->h_taxonomies) ) : ?> |
| 139 | <a href="#" class="np-btn np-btn-half btn-right np-toggle-taxonomies"><?php _e('Taxonomies', 'nestedpages'); ?></a> |
| 140 | <?php endif; ?> |
| 141 | </div> |
| 142 | |
| 143 | </div><!-- .right --> |
| 144 | |
| 145 | <?php if ( !empty($this->h_taxonomies) ) : ?> |
| 146 | <div class="np-taxonomies"> |
| 147 | <?php foreach ( $this->h_taxonomies as $taxonomy ) : ?> |
| 148 | <div class="np-taxonomy"> |
| 149 | <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span> |
| 150 | <input type="hidden" name="<?php echo ( $taxonomy->name == 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" /> |
| 151 | <ul class="cat-checklist <?php echo esc_attr( $taxonomy->name )?>-checklist"> |
| 152 | <?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ) ?> |
| 153 | </ul> |
| 154 | </div><!-- .np-taxonomy --> |
| 155 | <?php endforeach; ?> |
| 156 | |
| 157 | <?php foreach ( $this->f_taxonomies as $taxonomy ) : ?> |
| 158 | <div class="np-taxonomy"> |
| 159 | <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span> |
| 160 | <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> |
| 161 | </div><!-- .np-taxonomy --> |
| 162 | <?php endforeach; ?> |
| 163 | </div><!-- .taxonomies --> |
| 164 | <?php endif; // if taxonomies ?> |
| 165 | |
| 166 | |
| 167 | <?php if ( $this->user->canSortPages() && !$this->isSearch() ) : ?> |
| 168 | <div class="np-menuoptions"> |
| 169 | <div class="menuoptions-left"> |
| 170 | <div class="form-control"> |
| 171 | <label><?php _e( 'Navigation Label' ); ?></label> |
| 172 | <input type="text" name="np_nav_title" class="np_nav_title" value="" /> |
| 173 | </div> |
| 174 | <div class="form-control"> |
| 175 | <label><?php _e( 'Title Attribute' ); ?></label> |
| 176 | <input type="text" name="np_title_attribute" class="np_title_attribute" value="" /> |
| 177 | </div> |
| 178 | <div class="form-control"> |
| 179 | <label><?php _e( 'CSS Classes' ); ?></label> |
| 180 | <input type="text" name="np_nav_css_classes" class="np_nav_css_classes" value="" /> |
| 181 | </div> |
| 182 | </div><!-- .menuoptions-left --> |
| 183 | <div class="menuoptions-right"> |
| 184 | <div class="form-control"> |
| 185 | <label> |
| 186 | <input type="checkbox" name="nav_status" class="np_nav_status" value="hide" /> |
| 187 | <span class="checkbox-title"><?php _e( 'Hide in Nav Menu', 'nestedpages' ); ?></span> |
| 188 | </label> |
| 189 | </div> |
| 190 | <div class="form-control"> |
| 191 | <label> |
| 192 | <input type="checkbox" name="link_target" class="link_target" value="_blank" /> |
| 193 | <span class="checkbox-title"><?php _e( 'Open link in a new window/tab' ); ?></span> |
| 194 | </label> |
| 195 | </div> |
| 196 | </div><!-- .menuoptions-right --> |
| 197 | </div> |
| 198 | <?php endif; ?> |
| 199 | |
| 200 | </div><!-- .fields --> |
| 201 | |
| 202 | </div><!-- .form-interior --> |
| 203 | |
| 204 | <div class="buttons"> |
| 205 | <input type="hidden" name="post_id" class="np_id" value="<?php echo get_the_id(); ?>"> |
| 206 | <a accesskey="c" href="#inline-edit" class="button-secondary alignleft np-cancel-quickedit"> |
| 207 | <?php _e( 'Cancel' ); ?> |
| 208 | </a> |
| 209 | <a accesskey="s" href="#inline-edit" class="button-primary np-save-quickedit alignright"> |
| 210 | <?php _e( 'Update' ); ?> |
| 211 | </a> |
| 212 | <span class="np-qe-loading"></span> |
| 213 | </div> |
| 214 | </form> |