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
new-child.php
101 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><strong><?php _e('Add Child', 'nestedpages'); ?></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('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 | <?php if ( $this->post_type->hierarchical ) : ?> |
| 70 | <div class="form-control"> |
| 71 | <label><?php _e( 'Template' ); ?></label> |
| 72 | <select name="page_template" class="np_template"> |
| 73 | <option value="default"><?php _e( 'Default Template' ); ?></option> |
| 74 | <?php page_template_dropdown() ?> |
| 75 | </select> |
| 76 | </div> |
| 77 | <?php endif; ?> |
| 78 | |
| 79 | </div><!-- .right --> |
| 80 | |
| 81 | </div><!-- .fields --> |
| 82 | |
| 83 | </div><!-- .form-interior --> |
| 84 | |
| 85 | |
| 86 | <div class="buttons"> |
| 87 | <input type="hidden" name="parent_id" class="page_parent_id" /> |
| 88 | <input type="hidden" name="post_type" value="<?php echo $this->post_type->name; ?>" /> |
| 89 | <a accesskey="c" href="#" class="button-secondary alignleft np-cancel-newchild"> |
| 90 | <?php _e( 'Cancel' ); ?> |
| 91 | </a> |
| 92 | <a accesskey="s" href="#" class="button-primary np-save-newchild alignright" style="margin-left:10px;"> |
| 93 | <?php _e( 'Add', 'nestedpages' ); ?> |
| 94 | </a> |
| 95 | <a href="#" class="button-secondary np-save-newchild add-edit alignright"> |
| 96 | <?php _e( 'Add & Edit', 'nestedpages' ); ?> |
| 97 | </a> |
| 98 | <span class="np-qe-loading"></span> |
| 99 | </div> |
| 100 | </form> |
| 101 |