| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Tools page |
| 5 |
* |
| 6 |
* @package Wow_Plugin |
| 7 |
* @subpackage Admin/Main_page |
| 8 |
* @author Wow-Company <helper@wow-company.com> |
| 9 |
* @copyright 2019 Wow-Company |
| 10 |
* @license GNU Public License |
| 11 |
* @version 1.0 |
| 12 |
*/ |
| 13 |
|
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
?> |
| 19 |
|
| 20 |
<div class="wrap"> |
| 21 |
<div class="box"> |
| 22 |
<h3><span><?php esc_attr_e( 'Export Settings', $this->plugin['text'] ); ?></span></h3> |
| 23 |
<div class="inside"> |
| 24 |
<p><?php |
| 25 |
printf( esc_attr__( 'Export the settings for %s as a .json file. This allows you to easily import the configuration into another site.', $this->plugin['text'] ), '<b>' . esc_attr( $this->plugin['name'] ) . '</b>' );; ?></p> |
| 26 |
<form method="post" action=""> |
| 27 |
<p><input type="hidden" name="wow_action" value="export_database"/></p> |
| 28 |
<p> |
| 29 |
<?php wp_nonce_field( $this->plugin['slug'] . '_export_nonce', $this->plugin['slug'] . '_export_nonce' ); ?><?php submit_button( __( 'Export', $this->plugin['text'] ), 'secondary', 'submit', false ); ?> |
| 30 |
</p> |
| 31 |
</form> |
| 32 |
</div> |
| 33 |
</div> |
| 34 |
|
| 35 |
<div class="box"> |
| 36 |
<h3><span><?php esc_attr_e( 'Import Settings', $this->plugin['text'] ); ?></span></h3> |
| 37 |
<div class="inside"> |
| 38 |
<p><?php |
| 39 |
printf( esc_attr__( 'Import the %s settings from a .json file. This file can be obtained by exporting the settings on another site using the form above.', $this->plugin['text'] ), '<b>' . esc_attr( $this->plugin['name'] ) . '</b> ' );; ?></p> |
| 40 |
<form method="post" enctype="multipart/form-data" action=""> |
| 41 |
<p> |
| 42 |
<input type="file" name="import_file"/> |
| 43 |
</p> |
| 44 |
<p> |
| 45 |
<label> |
| 46 |
<input type="checkbox" name="wow_import_update" value="1"> |
| 47 |
<?php esc_attr_e( 'Update item if item already exists.' ); ?> |
| 48 |
</label> |
| 49 |
|
| 50 |
</p> |
| 51 |
|
| 52 |
<p> |
| 53 |
<input type="hidden" name="wow_action" value="import_database"/> |
| 54 |
<?php wp_nonce_field( $this->plugin['slug'] . '_import_nonce', $this->plugin['slug'] . '_import_nonce' ); ?> |
| 55 |
<?php submit_button( __( 'Import', $this->plugin['text'] ), 'secondary', 'submit', false ); ?> |
| 56 |
</p> |
| 57 |
</form> |
| 58 |
</div> |
| 59 |
</div> |
| 60 |
|
| 61 |
|
| 62 |
</div> |
| 63 |
|
| 64 |
<?php |
| 65 |
|
| 66 |
|
| 67 |
|