update
This commit is contained in:
@@ -6,21 +6,18 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if(isset($_GET['clear_logs'])) {
|
||||
PYS()->getLog()->remove();
|
||||
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
wp_redirect(remove_query_arg( 'clear_logs',$actual_link ));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="card card-static">
|
||||
<div class="card-header ">
|
||||
<?php PYS()->render_switcher_input('pys_logs_enable');?> Plugin Logs
|
||||
<?php PYS()->render_switcher_input('pys_logs_enable');?> Meta API Logs
|
||||
<div style="float: right;margin-top: 10px;">
|
||||
<a style="margin-right: 30px" href="<?php echo esc_url( buildAdminUrl( 'pixelyoursite', 'logs' ) ); ?>&clear_logs=true">Clear Logs</a>
|
||||
<a href="<?= PYS_Logger::get_log_file_url() ?>" target="_blank" download>Download Logs</a>
|
||||
<a style="margin-right: 30px"
|
||||
href="<?php echo esc_url( buildAdminUrl( 'pixelyoursite', 'logs' ) ); ?>&clear_plugin_logs=true">Clear
|
||||
Meta API Logs</a>
|
||||
<a href="<?= PYS_Logger::get_log_file_url() ?>" target="_blank" download>Download Meta API Logs</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -30,6 +27,26 @@ if(isset($_GET['clear_logs'])) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( Pinterest()->enabled() ) : ?>
|
||||
<div class="card card-static">
|
||||
<div class="card-header ">
|
||||
<?php Pinterest()->render_switcher_input( 'logs_enable' ); ?> Pinterest API Logs
|
||||
<div style="float: right;margin-top: 10px;">
|
||||
<a style="margin-right: 30px"
|
||||
href="<?php echo esc_url( buildAdminUrl( 'pixelyoursite', 'logs' ) ); ?>&clear_pinterest_logs=true">Clear
|
||||
Pinterest API Logs</a>
|
||||
<a href="<?= Pinterest_logger::get_log_file_url() ?>" target="_blank" download>Download Pinterest API
|
||||
Logs</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<textarea style="white-space: nowrap;width: 100%;height: 500px;"><?php
|
||||
echo Pinterest()->getLog()->getLogs();
|
||||
?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-4">
|
||||
<button class="btn btn-block btn-sm btn-save">Save Settings</button>
|
||||
|
||||
Reference in New Issue
Block a user