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
clone-form.php
83 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Modal Form for cloning posts |
| 4 | */ |
| 5 | ?> |
| 6 | <div class="nestedpages-modal-backdrop" data-nestedpages-modal="np-clone-modal"></div> |
| 7 | <div class="nestedpages-modal-content small short <?php if ( $this->integrations->plugins->dark_mode->installed ) echo 'np-dark-mode'; ?>" id="np-clone-modal" data-nestedpages-modal="np-clone-modal"> |
| 8 | |
| 9 | <div class="modal-content clone-modal np-modal-form <?php if ( $this->integrations->plugins->dark_mode->installed ) echo 'np-dark-mode'; ?>"> |
| 10 | <h3><?php _e('Clone', 'wp-nested-pages'); ?> <span data-clone-parent></span></h3> |
| 11 | |
| 12 | <div class="modal-body"> |
| 13 | |
| 14 | <div class="form-control"> |
| 15 | <label for="clone-quantity"><?php _e('Number of Copies', 'wp-nested-pages'); ?></label> |
| 16 | <select id="clone-quantity" data-clone-quantity> |
| 17 | <option value="1" selected="">1</option> |
| 18 | <?php |
| 19 | for ( $i = 2; $i < 11; $i++ ){ |
| 20 | echo '<option value="' . absint($i) . '">' . absint($i) . '</option>'; |
| 21 | } |
| 22 | ?> |
| 23 | </select> |
| 24 | </div> |
| 25 | |
| 26 | <div class="form-control"> |
| 27 | <label><?php _e( 'Status', 'wp-nested-pages' ); ?></label> |
| 28 | <select name="_status" data-clone-status> |
| 29 | <?php if ( $can_publish ) : ?> |
| 30 | <option value="publish"><?php _e( 'Published', 'wp-nested-pages' ); ?></option> |
| 31 | <?php endif; ?> |
| 32 | <option value="pending"><?php _e( 'Pending Review', 'wp-nested-pages' ); ?></option> |
| 33 | <option value="draft"><?php _e( 'Draft', 'wp-nested-pages' ); ?></option> |
| 34 | </select> |
| 35 | </div> |
| 36 | |
| 37 | <?php |
| 38 | $authors_dropdown = ''; |
| 39 | if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) : |
| 40 | $users_opt = [ |
| 41 | 'hide_if_only_one_author' => false, |
| 42 | 'capability' => 'edit_posts', |
| 43 | 'name' => 'post_author', |
| 44 | 'id' => 'post_author', |
| 45 | 'class'=> 'authors', |
| 46 | 'multi' => 1, |
| 47 | 'echo' => 0 |
| 48 | ]; |
| 49 | |
| 50 | if ( $authors = wp_dropdown_users( $users_opt ) ) : |
| 51 | $authors_dropdown = '<div class="form-control" data-clone-author><label>' . __( 'Author' ) . '</label>'; |
| 52 | $authors_dropdown .= $authors; |
| 53 | $authors_dropdown .= '</div>'; |
| 54 | endif; |
| 55 | echo $authors_dropdown; |
| 56 | endif; |
| 57 | ?> |
| 58 | |
| 59 | <?php if ( $this->post_type->hierarchical ) : ?> |
| 60 | <div class="form-control"> |
| 61 | <label> |
| 62 | <input type="checkbox" data-clone-children value="true" /> |
| 63 | <?php _e( 'Clone Children', 'wp-nested-pages' ); ?></label> |
| 64 | </div> |
| 65 | <?php endif; ?> |
| 66 | |
| 67 | </div><!-- .modal-body --> |
| 68 | |
| 69 | |
| 70 | <div class="modal-footer"> |
| 71 | <button type="button" class="button modal-close" data-nestedpages-modal-close> |
| 72 | <?php _e('Cancel', 'wp-nested-pages'); ?> |
| 73 | </button> |
| 74 | <a accesskey="s" class="button-primary alignright" data-confirm-clone> |
| 75 | <?php _e( 'Clone', 'wp-nested-pages' ); ?> |
| 76 | </a> |
| 77 | <div class="np-qe-loading" data-clone-loading> |
| 78 | <?php include( NestedPages\Helpers::asset('images/spinner.svg') ); ?> |
| 79 | </div> |
| 80 | </div> |
| 81 | </div><!-- .modal-content --> |
| 82 | |
| 83 | </div><!-- /.modal --> |