index.php
152 lines
| 1 | <form class="settings" method="post" action="<?php echo $this->baseUrl ?>" enctype="multipart/form-data"> |
| 2 | |
| 3 | <div class="wpallexport-header"> |
| 4 | <div class="wpallexport-logo"></div> |
| 5 | <div class="wpallexport-title"> |
| 6 | <p><?php _e('WP All Export', 'wp_all_export_plugin'); ?></p> |
| 7 | <h3><?php _e('Settings', 'wp_all_export_plugin'); ?></h3> |
| 8 | </div> |
| 9 | </div> |
| 10 | <h2 style="padding:0px;"></h2> |
| 11 | |
| 12 | <div class="wpallexport-setting-wrapper"> |
| 13 | <?php if ($this->errors->get_error_codes()): ?> |
| 14 | <?php $this->error() ?> |
| 15 | <?php endif ?> |
| 16 | |
| 17 | <h3><?php _e('Import/Export Templates', 'wp_all_export_plugin') ?></h3> |
| 18 | <?php $templates = new PMXE_Template_List(); $templates->getBy()->convertRecords() ?> |
| 19 | <?php wp_nonce_field('delete-templates', '_wpnonce_delete-templates') ?> |
| 20 | <?php if ($templates->total()): ?> |
| 21 | <table> |
| 22 | <?php foreach ($templates as $t): ?> |
| 23 | <tr> |
| 24 | <td> |
| 25 | <label class="selectit" for="template-<?php echo $t->id ?>"><input id="template-<?php echo $t->id ?>" type="checkbox" name="templates[]" value="<?php echo $t->id ?>" /> <?php echo $t->name ?></label> |
| 26 | </td> |
| 27 | </tr> |
| 28 | <?php endforeach ?> |
| 29 | </table> |
| 30 | <p class="submit-buttons"> |
| 31 | <input type="submit" class="button-primary" name="delete_templates" value="<?php _e('Delete Selected', 'wp_all_export_plugin') ?>" /> |
| 32 | <input type="submit" class="button-primary" name="export_templates" value="<?php _e('Export Selected', 'wp_all_export_plugin') ?>" /> |
| 33 | </p> |
| 34 | <?php else: ?> |
| 35 | <em><?php _e('There are no templates saved', 'wp_all_export_plugin') ?></em> |
| 36 | <?php endif ?> |
| 37 | <p> |
| 38 | <input type="hidden" name="is_templates_submitted" value="1" /> |
| 39 | <input type="file" name="template_file"/> |
| 40 | <input type="submit" class="button-primary" name="import_templates" value="<?php _e('Import Templates', 'wp_all_export_plugin') ?>" /> |
| 41 | </p> |
| 42 | </div> |
| 43 | |
| 44 | </form> |
| 45 | <br /> |
| 46 | |
| 47 | <form name="settings" class="settings" method="post" action="<?php echo $this->baseUrl ?>"> |
| 48 | |
| 49 | <h3><?php _e('Cron Exports', 'wp_all_export_plugin') ?></h3> |
| 50 | |
| 51 | <table class="form-table"> |
| 52 | <tbody> |
| 53 | <tr> |
| 54 | <th scope="row"><label><?php _e('Secret Key', 'wp_all_export_plugin'); ?></label></th> |
| 55 | <td> |
| 56 | <input type="text" class="regular-text" name="cron_job_key" value="<?php echo esc_attr($post['cron_job_key']); ?>"/> |
| 57 | <p class="description"><?php _e('Changing this will require you to re-create your existing cron jobs.', 'wp_all_export_plugin'); ?></p> |
| 58 | </td> |
| 59 | </tr> |
| 60 | </tbody> |
| 61 | </table> |
| 62 | |
| 63 | <div class="clear"></div> |
| 64 | |
| 65 | <h3><?php _e('Files', 'wp_all_export_plugin') ?></h3> |
| 66 | |
| 67 | <table class="form-table"> |
| 68 | <tbody> |
| 69 | <tr> |
| 70 | <th scope="row"><label><?php _e('Secure Mode', 'wp_all_export_plugin'); ?></label></th> |
| 71 | <td> |
| 72 | <fieldset style="padding:0;"> |
| 73 | <legend class="screen-reader-text"><span><?php _e('Secure Mode', 'wp_all_export_plugin'); ?></span></legend> |
| 74 | <input type="hidden" name="secure" value="0"/> |
| 75 | <label for="secure"><input type="checkbox" value="1" id="secure" name="secure" <?php echo (($post['secure']) ? 'checked="checked"' : ''); ?>><?php _e('Randomize folder names', 'wp_all_export_plugin'); ?></label> |
| 76 | </fieldset> |
| 77 | <p class="description"> |
| 78 | <?php |
| 79 | $wp_uploads = wp_upload_dir(); |
| 80 | ?> |
| 81 | <?php printf(__('If enabled, exported files and temporary files will be saved in a folder with a randomized name in %s.<br/><br/>If disabled, exported files will be saved in the Media Library.', 'wp_all_export_plugin'), $wp_uploads['basedir'] . DIRECTORY_SEPARATOR . WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY ); ?> |
| 82 | </p> |
| 83 | </td> |
| 84 | </tr> |
| 85 | </tbody> |
| 86 | </table> |
| 87 | |
| 88 | <h3><?php _e('Zapier Integration', 'wp_all_export_plugin') ?></h3> |
| 89 | |
| 90 | <table class="form-table"> |
| 91 | <tbody> |
| 92 | <tr> |
| 93 | <th scope="row"><label><?php _e('Getting Started', 'wp_all_export_plugin'); ?></label></th> |
| 94 | <td> |
| 95 | <p class="description"><?php printf(__('Zapier acts as a middle man between WP All Export and hundreds of other popular apps. To get started go to Zapier.com, create an account, and make a new Zap. Read more: <a target="_blank" href="https://zapier.com/zapbook/wp-all-export-pro/">https://zapier.com/zapbook/wp-all-export-pro/</a>', 'wp_all_export_plugin'), "https://zapier.com/zapbook/wp-all-export-pro/"); ?></p> |
| 96 | </td> |
| 97 | </tr> |
| 98 | <tr> |
| 99 | <th scope="row"><label><?php _e('API Key', 'wp_all_export_plugin'); ?></label></th> |
| 100 | <td> |
| 101 | <input type="text" class="regular-text" name="zapier_api_key" readOnly="readOnly" value="<?php if (!empty($post['zapier_api_key'])) esc_attr_e( $post['zapier_api_key'] ); ?>"/> |
| 102 | <input type="submit" class="button-secondary" name="pmxe_generate_zapier_api_key" value="<?php _e('Generate New API Key', 'wp_all_export_plugin'); ?>"/> |
| 103 | <p class="description"><?php _e('Changing the key will require you to update your existing Zaps on Zapier.', 'wp_all_export_plugin'); ?></p> |
| 104 | </td> |
| 105 | </tr> |
| 106 | </tbody> |
| 107 | </table> |
| 108 | |
| 109 | <div class="wpallexport-free-edition-notice" style="margin: 15px 0; padding: 20px;"> |
| 110 | <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=118611&edd_options%5Bprice_id%5D=1&utm_source=wordpress.org&utm_medium=custom-php&utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export for Zapier Integration','wp_all_export_plugin');?></a> |
| 111 | <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p> |
| 112 | </div> |
| 113 | |
| 114 | <div class="clear"></div> |
| 115 | |
| 116 | <p class="submit-buttons"> |
| 117 | <?php wp_nonce_field('edit-settings', '_wpnonce_edit-settings') ?> |
| 118 | <input type="hidden" name="is_settings_submitted" value="1" /> |
| 119 | <input type="submit" class="button-primary" value="Save Settings" /> |
| 120 | </p> |
| 121 | |
| 122 | </form> |
| 123 | |
| 124 | <?php |
| 125 | $uploads = wp_upload_dir(); |
| 126 | $functions = $uploads['basedir'] . DIRECTORY_SEPARATOR . WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'functions.php'; |
| 127 | ?> |
| 128 | <hr /> |
| 129 | <br> |
| 130 | <h3><?php _e('Function Editor', 'pmxe_plugin') ?></h3> |
| 131 | |
| 132 | <textarea id="wp_all_export_code" name="wp_all_export_code"><?php echo "<?php\n\n?>";?></textarea> |
| 133 | <div class="wpallexport-free-edition-notice" style="margin: 15px 0; padding: 20px;"> |
| 134 | <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=118611&edd_options%5Bprice_id%5D=1&utm_source=wordpress.org&utm_medium=custom-php&utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to enable the Function Editor','wp_all_export_plugin');?></a> |
| 135 | <p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p> |
| 136 | </div> |
| 137 | |
| 138 | <div class="input" style="margin-top: 10px;"> |
| 139 | |
| 140 | <div class="input" style="display:inline-block; margin-right: 20px;"> |
| 141 | <input type="button" class="button-primary wp_all_export_save_functions" disabled="disabled" value="<?php _e("Save Functions", 'wp_all_export_plugin'); ?>"/> |
| 142 | <a href="#help" class="wpallexport-help" title="<?php printf(__("Add functions here for use during your export. You can access this file at %s", "wp_all_export_plugin"), preg_replace("%.*wp-content%", "wp-content", $functions));?>" style="top: 0;">?</a> |
| 143 | <div class="wp_all_export_functions_preloader"></div> |
| 144 | </div> |
| 145 | <div class="input wp_all_export_saving_status" style="display:inline-block;"> |
| 146 | |
| 147 | </div> |
| 148 | |
| 149 | </div> |
| 150 | |
| 151 | <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php _e('Created by', 'wp_all_export_plugin'); ?> <span></span></a> |
| 152 |