| 1 |
<?php |
| 2 |
/** |
| 3 |
* Page Name: Tools |
| 4 |
* |
| 5 |
*/ |
| 6 |
|
| 7 |
use BubbleMenu\Admin\ImporterExporter; |
| 8 |
use BubbleMenu\Admin\ManageCapabilities; |
| 9 |
use BubbleMenu\WOWP_Plugin; |
| 10 |
|
| 11 |
defined( 'ABSPATH' ) || exit; |
| 12 |
|
| 13 |
?> |
| 14 |
|
| 15 |
<div class="wpie-block-tool"> |
| 16 |
|
| 17 |
<div class="inside"> |
| 18 |
<h3><span class="dashicons dashicons-database-export wpie-color-orange"></span> |
| 19 |
<span><?php esc_html_e( 'Export Settings', 'bubble-menu' ); ?></span></h3> |
| 20 |
<div class="inside"> |
| 21 |
<p><?php |
| 22 |
/* translators: %s: plugin name */ |
| 23 |
printf( esc_html__( 'Export the settings for %s as a .json file. This allows you to easily import the configuration into another site.', 'bubble-menu' ), '<b>' . esc_attr( WOWP_Plugin::info( 'name' ) ) . '</b>' ); ?></p> |
| 24 |
<?php ImporterExporter::form_export(); ?> |
| 25 |
</div> |
| 26 |
</div> |
| 27 |
<hr> |
| 28 |
|
| 29 |
<div class="inside"> |
| 30 |
<h3><span class="dashicons dashicons-database-import wpie-color-orange"></span> |
| 31 |
<span><?php esc_html_e( 'Import Settings', 'bubble-menu' ); ?></span></h3> |
| 32 |
<div class="inside"> |
| 33 |
<p><?php |
| 34 |
/* translators: %s: plugin name */ |
| 35 |
printf( esc_html__( 'Import the %s settings from a .json file. This file can be obtained by exporting the settings on another site using the form above.', 'bubble-menu' ), '<b>' . esc_attr( WOWP_Plugin::info( 'name' ) ) . '</b> ' ); ?></p> |
| 36 |
<?php ImporterExporter::form_import(); ?> |
| 37 |
</div> |
| 38 |
</div> |
| 39 |
|
| 40 |
<?php if ( current_user_can( 'manage_options' ) ): ?> |
| 41 |
<hr/> |
| 42 |
<div class="inside"> |
| 43 |
<h3><span class="dashicons dashicons-admin-users wpie-color-orange"></span> |
| 44 |
<span><?php esc_html_e( 'Manage Capabilities', 'bubble-menu' ); ?></span></h3> |
| 45 |
<div class="inside"> |
| 46 |
<p><?php esc_html_e( 'Manage the visibility of the plugin for users based on their Manage User Capabilities.', 'bubble-menu' ); ?></p> |
| 47 |
<?php ManageCapabilities::form(); ?> |
| 48 |
</div> |
| 49 |
</div> |
| 50 |
<?php endif; ?> |
| 51 |
|
| 52 |
</div> |
| 53 |
|
| 54 |
<?php |
| 55 |
|