70 lines
2.3 KiB
PHP
70 lines
2.3 KiB
PHP
<?php
|
|
/**
|
|
* Admin dashboard template.
|
|
*
|
|
* @package WPContentSync
|
|
*
|
|
* @var \WPContentSync\Settings\Settings $settings
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
?>
|
|
<div class="wrap">
|
|
<h1><?php echo esc_html__( 'WP Content Sync', 'wp-content-sync' ); ?></h1>
|
|
<p><?php echo esc_html__( 'Configure sync pairs, test connections, and run push or pull operations from this screen.', 'wp-content-sync' ); ?></p>
|
|
|
|
<div class="notice notice-info">
|
|
<p>
|
|
<?php
|
|
echo esc_html__(
|
|
'The foundation is installed. Sync pair management, URL mappings, file transport, and REST transport will be added in upcoming implementation phases.',
|
|
'wp-content-sync'
|
|
);
|
|
?>
|
|
</p>
|
|
</div>
|
|
|
|
<h2><?php echo esc_html__( 'Current Defaults', 'wp-content-sync' ); ?></h2>
|
|
<table class="widefat striped">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="row"><?php echo esc_html__( 'Configured Sync Pairs', 'wp-content-sync' ); ?></th>
|
|
<td><?php echo esc_html( (string) count( $settings->syncPairs() ) ); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?php echo esc_html__( 'Logging Level', 'wp-content-sync' ); ?></th>
|
|
<td><?php echo esc_html( $settings->loggingLevel() ); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?php echo esc_html__( 'URL Replacement', 'wp-content-sync' ); ?></th>
|
|
<td>
|
|
<?php
|
|
echo esc_html(
|
|
$settings->automaticUrlReplacementEnabled()
|
|
? __( 'Enabled', 'wp-content-sync' )
|
|
: __( 'Disabled', 'wp-content-sync' )
|
|
);
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><?php echo esc_html__( 'Conflict Strategy', 'wp-content-sync' ); ?></th>
|
|
<td><?php echo esc_html( $settings->conflictStrategy() ); ?></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h2><?php echo esc_html__( 'File Package Import', 'wp-content-sync' ); ?></h2>
|
|
<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" enctype="multipart/form-data">
|
|
<input type="hidden" name="action" value="wpcs_import_package" />
|
|
<?php wp_nonce_field( 'wpcs_import_package', 'wpcs_import_package_nonce' ); ?>
|
|
<p>
|
|
<label for="wpcs-package-file"><?php echo esc_html__( 'Package JSON file', 'wp-content-sync' ); ?></label>
|
|
<input id="wpcs-package-file" type="file" name="wpcs_package_file" accept="application/json,.json" />
|
|
</p>
|
|
<?php submit_button( __( 'Validate Package', 'wp-content-sync' ), 'secondary' ); ?>
|
|
</form>
|
|
</div>
|