bulk-edit.php
9 years ago
list-header.php
9 years ago
row-link.php
8 years ago
row.php
8 years ago
tool-list.php
8 years ago
wpml-translations.php
8 years ago
bulk-edit.php
135 lines
| 1 | <?php |
| 2 | $post_type_object = get_post_type_object( $this->post_type->name ); |
| 3 | $can_publish = current_user_can( $post_type_object->cap->publish_posts ); |
| 4 | ?> |
| 5 | <form data-np-bulk-edit-form class="nestedpages-bulk-edit" action="<?php echo admin_url('admin-post.php'); ?>" method="post"> |
| 6 | <input type="hidden" name="action" value="npBulkEdit"> |
| 7 | <input type="hidden" name="page" value="<?php echo $this->pageURL(); ?>"> |
| 8 | <input type="hidden" name="post_type" value="<?php echo $this->post_type->name; ?>"> |
| 9 | |
| 10 | <h3><?php _e('Bulk Edit', 'wp-nested-pages'); ?></h3> |
| 11 | |
| 12 | <div class="np-bulk-edit-link-info"> |
| 13 | <div class="np-quickedit-info" data-bulk-edit-link-count><?php _e('There are links selected. Bulk edit will not apply to links.', 'wp-nested-pages'); ?></div> |
| 14 | </div> |
| 15 | |
| 16 | <ul class="np-bulk-titles" data-np-bulk-titles></ul> |
| 17 | |
| 18 | <div class="quick-edit"> |
| 19 | <div class="fields"> |
| 20 | <div class="left"> |
| 21 | <?php |
| 22 | $authors_dropdown = ''; |
| 23 | if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) : |
| 24 | $users_opt = array( |
| 25 | 'show_option_none' => '— ' . __('No Change') . ' —', |
| 26 | 'hide_if_only_one_author' => false, |
| 27 | 'who' => 'authors', |
| 28 | 'name' => 'post_author', |
| 29 | 'id' => 'post_author', |
| 30 | 'class'=> 'authors', |
| 31 | 'multi' => 1, |
| 32 | 'echo' => 0 |
| 33 | ); |
| 34 | if ( $authors = wp_dropdown_users( $users_opt ) ) : |
| 35 | $authors_dropdown = '<div class="form-control"><label>' . __( 'Author' ) . '</label>'; |
| 36 | $authors_dropdown .= $authors; |
| 37 | $authors_dropdown .= '</div>'; |
| 38 | endif; |
| 39 | echo $authors_dropdown; |
| 40 | endif; |
| 41 | ?> |
| 42 | |
| 43 | <div class="form-control"> |
| 44 | <label><?php _e( 'Status' ); ?></label> |
| 45 | <select name="_status"> |
| 46 | <option value="">— <?php _e('No Change'); ?> —</option> |
| 47 | <?php if ( $can_publish ) : ?> |
| 48 | <option value="publish"><?php _e( 'Published' ); ?></option> |
| 49 | <?php endif; ?> |
| 50 | <option value="private"><?php _e( 'Private' ); ?></option> |
| 51 | <option value="pending"><?php _e( 'Pending Review' ); ?></option> |
| 52 | <option value="draft"><?php _e( 'Draft' ); ?></option> |
| 53 | </select> |
| 54 | </div> |
| 55 | |
| 56 | <?php if ( $this->post_type->hierarchical ) : ?> |
| 57 | <div class="form-control"> |
| 58 | <label><?php _e( 'Template' ); ?></label> |
| 59 | <select name="page_template"> |
| 60 | <option value="">— <?php _e('No Change'); ?> —</option> |
| 61 | <option value="default"><?php _e( 'Default Template' ); ?></option> |
| 62 | <?php page_template_dropdown() ?> |
| 63 | </select> |
| 64 | </div> |
| 65 | <?php endif; ?> |
| 66 | |
| 67 | </div><!-- .left --> |
| 68 | |
| 69 | <div class="right"> |
| 70 | |
| 71 | <div class="form-control"> |
| 72 | <label><?php _e( 'Comments' ); ?></label> |
| 73 | <select name="comment_status"> |
| 74 | <option value="">— <?php _e('No Change'); ?> —</option> |
| 75 | <option value="open"><?php _e('Allow'); ?></option> |
| 76 | <option value="closed"><?php _e('Do not allow'); ?></option> |
| 77 | </select> |
| 78 | </div> |
| 79 | |
| 80 | <?php if ( current_user_can('edit_theme_options') ) : ?> |
| 81 | <div class="form-control"> |
| 82 | <label><?php _e( 'Display in Nested View', 'wp-nested-pages' ); ?></label> |
| 83 | <select name="nested_pages_status"> |
| 84 | <option value="">— <?php _e('No Change'); ?> —</option> |
| 85 | <option value="hide"><?php _e('Hide'); ?></option> |
| 86 | <option value="show"><?php _e('Show'); ?></option> |
| 87 | </select> |
| 88 | </div> |
| 89 | |
| 90 | <?php if ( $this->user->canSortPages() && $this->post_type->name == 'page' ) : ?> |
| 91 | <div class="form-control"> |
| 92 | <label><?php _e( 'Hide in Nav Menu', 'wp-nested-pages' ); ?></label> |
| 93 | <select name="nav_status"> |
| 94 | <option value="">— <?php _e('No Change'); ?> —</option> |
| 95 | <option value="hide"><?php _e('Hide'); ?></option> |
| 96 | <option value="show"><?php _e('Show'); ?></option> |
| 97 | </select> |
| 98 | </div> |
| 99 | <?php endif; endif; // Edit theme options ?> |
| 100 | |
| 101 | </div><!-- .right --> |
| 102 | </div><!-- .fields --> |
| 103 | |
| 104 | <?php if ( !empty($this->h_taxonomies) || !empty($this->f_taxonomies)) : ?> |
| 105 | <div class="np-taxonomies"> |
| 106 | <?php foreach ( $this->h_taxonomies as $taxonomy ) : ?> |
| 107 | <div class="np-taxonomy"> |
| 108 | <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span> |
| 109 | <input type="hidden" name="<?php echo ( $taxonomy->name == 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" /> |
| 110 | <ul class="cat-checklist <?php echo esc_attr( $taxonomy->name )?>-checklist"> |
| 111 | <?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ) ?> |
| 112 | </ul> |
| 113 | </div><!-- .np-taxonomy --> |
| 114 | <?php endforeach; ?> |
| 115 | |
| 116 | <?php foreach ( $this->f_taxonomies as $taxonomy ) : ?> |
| 117 | <div class="np-taxonomy"> |
| 118 | <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span> |
| 119 | <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> |
| 120 | </div><!-- .np-taxonomy --> |
| 121 | <?php endforeach; ?> |
| 122 | </div><!-- .taxonomies --> |
| 123 | <?php endif; // if taxonomies ?> |
| 124 | |
| 125 | <div class="np-bulk-footer"> |
| 126 | <button class="button pull-left" data-np-cancel-bulk-edit> |
| 127 | <?php _e('Cancel', 'wp-nested-pages'); ?> |
| 128 | </button> |
| 129 | <button type="submit" class="button button-primary"> |
| 130 | <?php _e('Update', 'wp-nested-pages'); ?> |
| 131 | </button> |
| 132 | </div><!-- .np-bulk-footer --> |
| 133 | |
| 134 | </div><!--.quickedit --> |
| 135 | </form><!-- .nestedpages-bulk-edit --> |