bulk.php
1 month ago
delete.php
1 month ago
index.php
1 month ago
scheduling.php
1 month ago
update.php
1 month ago
bulk.php
58 lines
| 1 | <?php if ( ! defined( 'ABSPATH' ) ) exit; // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals ?> |
| 2 | <h2><?php esc_html_e('Bulk Delete Imports', 'wp-all-import');?></h2> |
| 3 | |
| 4 | <form method="post"> |
| 5 | <input type="hidden" name="action" value="bulk" /> |
| 6 | <input type="hidden" name="bulk-action" value="<?php echo esc_attr($action) ?>" /> |
| 7 | <?php foreach ($ids as $id): ?> |
| 8 | <input type="hidden" name="items[]" value="<?php echo esc_attr($id) ?>" /> |
| 9 | <?php endforeach ?> |
| 10 | |
| 11 | <p><?php echo wp_kses( sprintf( |
| 12 | /* translators: 1: number of selected imports, 2: singular or plural label */ |
| 13 | __('Are you sure you want to delete <strong>%1$s</strong> selected %2$s?', 'wp-all-import'), |
| 14 | intval($items->count()), |
| 15 | esc_html(_n('import', 'imports', $items->count(), 'wp-all-import')) |
| 16 | ), array('strong' => array()) ); ?></p> |
| 17 | <div class="input"> |
| 18 | <input type="checkbox" id="is_delete_posts" name="is_delete_posts" class="switcher"/> <label for="is_delete_posts"><?php esc_html_e('Delete associated posts as well','wp-all-import');?> </label> |
| 19 | <div class="switcher-target-is_delete_posts" style="padding: 5px 17px;"> |
| 20 | <div class="input"> |
| 21 | <input type="hidden" name="is_delete_images" value="no"/> |
| 22 | <input type="checkbox" id="is_delete_images" name="is_delete_images" value="yes" /> |
| 23 | <label for="is_delete_images"><?php esc_html_e('Delete associated images from media gallery', 'wp-all-import') ?></label> |
| 24 | </div> |
| 25 | <div class="input"> |
| 26 | <input type="hidden" name="is_delete_attachments" value="no"/> |
| 27 | <input type="checkbox" id="is_delete_attachments" name="is_delete_attachments" value="yes" /> |
| 28 | <label for="is_delete_attachments"><?php esc_html_e('Delete associated files from media gallery', 'wp-all-import') ?></label> |
| 29 | </div> |
| 30 | </div> |
| 31 | <?php foreach($items->convertRecords() as $item) : ?> |
| 32 | <?php if ( ! empty($item->options['deligate']) and $item->options['deligate'] == 'wpallexport' and class_exists('PMXE_Plugin')): ?> |
| 33 | <?php |
| 34 | $export = new PMXE_Export_Record(); |
| 35 | $export->getById($item->options['export_id']); |
| 36 | if ( ! $export->isEmpty() ){ |
| 37 | ?> |
| 38 | <p class="wpallimport-delete-posts-warning"><strong><?php esc_html_e('Important', 'wp-all-import'); ?></strong>: <?php printf( |
| 39 | /* translators: %s: export friendly name */ |
| 40 | esc_html__('this import was created automatically by WP All Export. All posts exported by the "%s" export job have been automatically associated with this import.', 'wp-all-import'), |
| 41 | esc_html($export->friendly_name) |
| 42 | ); ?></p> |
| 43 | <?php |
| 44 | } |
| 45 | ?> |
| 46 | <?php endif; ?> |
| 47 | <?php endforeach; ?> |
| 48 | </div> |
| 49 | |
| 50 | <p class="submit"> |
| 51 | <?php wp_nonce_field('bulk-imports', '_wpnonce_bulk-imports') ?> |
| 52 | <input type="hidden" name="is_confirmed" value="1" /> |
| 53 | <?php foreach ($ids as $id): ?> |
| 54 | <input type="hidden" name="import_ids[]" value="<?php echo esc_attr($id) ?>" /> |
| 55 | <?php endforeach ?> |
| 56 | <input type="submit" class="button-primary" value="Delete" /> |
| 57 | </p> |
| 58 | </form> |