bulk-add.php
11 years ago
clone-form.php
9 years ago
delete-confirmation-modal.php
9 years ago
empty-trash-modal.php
9 years ago
link-form.php
9 years ago
more-options-modal.php
9 years ago
new-child.php
8 years ago
quickedit-link.php
8 years ago
quickedit-post.php
8 years ago
clone-form.php
70 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Modal Form for cloning posts |
| 4 | */ |
| 5 | ?> |
| 6 | <div class="np-modal fade nestedpages np-modal-form" id="np-clone-modal"> |
| 7 | <div class="modal-dialog"> |
| 8 | <div class="modal-content clone-modal"> |
| 9 | <h3><?php _e('Clone', 'wp-nested-pages'); ?> <span data-clone-parent></span></h3> |
| 10 | |
| 11 | <div class="modal-body"> |
| 12 | |
| 13 | <div class="form-control"> |
| 14 | <label for="clone-quantity"><?php _e('Number of Copies', 'wp-nested-pages'); ?></label> |
| 15 | <select id="clone-quantity" data-clone-quantity> |
| 16 | <option value="1" selected="">1</option> |
| 17 | <?php |
| 18 | for ( $i = 2; $i < 11; $i++ ){ |
| 19 | echo '<option value="' . absint($i) . '">' . absint($i) . '</option>'; |
| 20 | } |
| 21 | ?> |
| 22 | </select> |
| 23 | </div> |
| 24 | |
| 25 | <div class="form-control"> |
| 26 | <label><?php _e( 'Status' ); ?></label> |
| 27 | <select name="_status" data-clone-status> |
| 28 | <?php if ( $can_publish ) : ?> |
| 29 | <option value="publish"><?php _e( 'Published' ); ?></option> |
| 30 | <?php endif; ?> |
| 31 | <option value="pending"><?php _e( 'Pending Review' ); ?></option> |
| 32 | <option value="draft"><?php _e( 'Draft' ); ?></option> |
| 33 | </select> |
| 34 | </div> |
| 35 | |
| 36 | <?php |
| 37 | $authors_dropdown = ''; |
| 38 | if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) : |
| 39 | $users_opt = array( |
| 40 | 'hide_if_only_one_author' => false, |
| 41 | 'who' => 'authors', |
| 42 | 'name' => 'post_author', |
| 43 | 'id' => 'post_author', |
| 44 | 'class'=> 'authors', |
| 45 | 'multi' => 1, |
| 46 | 'echo' => 0 |
| 47 | ); |
| 48 | |
| 49 | if ( $authors = wp_dropdown_users( $users_opt ) ) : |
| 50 | $authors_dropdown = '<div class="form-control" data-clone-author><label>' . __( 'Author' ) . '</label>'; |
| 51 | $authors_dropdown .= $authors; |
| 52 | $authors_dropdown .= '</div>'; |
| 53 | endif; |
| 54 | echo $authors_dropdown; |
| 55 | endif; |
| 56 | ?> |
| 57 | </div><!-- .modal-body --> |
| 58 | |
| 59 | </div><!-- /.modal-content --> |
| 60 | <div class="modal-footer"> |
| 61 | <button type="button" class="button modal-close" data-dismiss="modal"> |
| 62 | <?php _e('Cancel'); ?> |
| 63 | </button> |
| 64 | <a accesskey="s" class="button-primary alignright" data-confirm-clone> |
| 65 | <?php _e( 'Clone', 'wp-nested-pages' ); ?> |
| 66 | </a> |
| 67 | <span class="np-qe-loading np-link-loading" data-clone-loading></span> |
| 68 | </div> |
| 69 | </div><!-- /.modal-dialog --> |
| 70 | </div><!-- /.modal --> |