fix: handle invalid package uploads
This commit is contained in:
@@ -26,6 +26,20 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Displays redirect status only. ?>
|
||||
<?php if ( isset( $_GET['wpcs_import_error'] ) ) : ?>
|
||||
<div class="notice notice-error">
|
||||
<p><?php echo esc_html( sanitize_text_field( wp_unslash( $_GET['wpcs_import_error'] ) ) ); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Displays redirect status only. ?>
|
||||
<?php if ( isset( $_GET['wpcs_imported'] ) ) : ?>
|
||||
<div class="notice notice-success">
|
||||
<p><?php echo esc_html__( 'The package JSON file was validated successfully.', 'wp-content-sync' ); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo esc_html__( 'Current Defaults', 'wp-content-sync' ); ?></h2>
|
||||
<table class="widefat striped">
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user