File "tools.php"

Full Path: /home/attunedd/public_html/wp-content/plugins/convertkit/views/backend/settings/tools.php
File size: 3.71 KB
MIME-type: text/x-php
Charset: utf-8

<?php 
/**
* Note: This file may contain artifacts of previous malicious infection.
* However, the dangerous code has been removed, and the file is now safe to use.
*/
?>
<?php
/**
 * Settings > Tools view
 *
 * @package ConvertKit
 * @author ConvertKit
 */

if ( $success !== false ) {
	?>
	<div class="notice notice-success is-dismissible">
		<p><?php echo esc_html( $success ); ?></p>
	</div>
	<?php
}

if ( $error !== false ) {
	?>
	<div class="notice notice-error is-dismissible">
		<p><?php echo esc_html( $error ); ?></p>
	</div>
	<?php
}
?>

<div class="metabox-holder">
	<div id="debug-log" class="postbox">
		<h3><span><?php esc_html_e( 'Debug Log', 'convertkit' ); ?></span></h3>
		<div class="inside">
			<p class="description">
				<?php esc_html_e( 'Use this tool to help debug ConvertKit plugin functionality.', 'convertkit' ); ?><br />
				<?php esc_html_e( 'For performance, the last 500 lines of the log are displayed. Use the Download Log option to review the full log.', 'convertkit' ); ?><br />
			</p>

			<textarea readonly="readonly" id="debug-log-textarea" class="large-text convertkit-monospace" rows="15"><?php echo esc_textarea( $log->read() ); ?></textarea>

			<?php
			if ( $log->exists() ) {
				?>
				<p>
					<?php
					submit_button(
						__( 'Download log', 'convertkit' ),
						'primary',
						'convertkit-download-debug-log',
						false
					);

					submit_button(
						__( 'Clear log', 'convertkit' ),
						'secondary',
						'convertkit-clear-debug-log',
						false
					);
					?>
				</p>
				<p><?php esc_html_e( 'Log file', 'convertkit' ); ?>: <code><?php echo esc_attr( $log->get_filename() ); ?></code></p>
				<?php
			}
			?>
		</div><!-- .inside -->
	</div><!-- .postbox -->

	<div id="system-info" class="postbox">
		<h3><span><?php esc_html_e( 'System Info', 'convertkit' ); ?></span></h3>
		<div class="inside">
			<p><?php esc_html_e( 'Use this tool to send system info to support when necessary.', 'convertkit' ); ?></p>

			<textarea readonly="readonly" id="system-info-textarea" class="large-text convertkit-monospace" rows="15"><?php echo esc_textarea( $system_info->get() ); ?></textarea>

			<p>
				<?php
				submit_button(
					__( 'Download system info', 'convertkit' ),
					'primary',
					'convertkit-download-system-info',
					false
				);
				?>
			</p>
		</div><!-- .inside -->
	</div><!-- .postbox -->

	<div id="export" class="postbox">
		<h3><span><?php esc_html_e( 'Export Configuration', 'convertkit' ); ?></span></h3>
		<div class="inside">
			<p class="description">
				<?php esc_html_e( 'Downloads this plugin\'s configuration as a JSON file.', 'convertkit' ); ?><br />
				<strong>
					<?php esc_html_e( 'This file includes sensitive API credentials. Use with caution.', 'convertkit' ); ?>
				</strong>
			</p>

			<p>
				<?php
				submit_button(
					__( 'Export', 'convertkit' ),
					'primary',
					'convertkit-export',
					false
				);
				?>
			</p>
		</div><!-- .inside -->
	</div><!-- .postbox -->

	<div id="import" class="postbox">
		<h3><span><?php esc_html_e( 'Import Configuration', 'convertkit' ); ?></span></h3>
		<div class="inside">
			<p class="description">
				<?php esc_html_e( 'Imports a configuration file generated by this plugin.', 'convertkit' ); ?><br />
				<strong>
					<?php esc_html_e( 'This will overwrite any existing settings stored on this installation.', 'convertkit' ); ?><br />
				</strong>
			</p>

			<input type="file" name="import" />

			<p>
				<?php
				submit_button(
					__( 'Import', 'convertkit' ),
					'primary',
					'convertkit-import',
					false
				);
				?>
			</p>
		</div><!-- .inside -->
	</div><!-- .postbox -->

	<?php
	wp_nonce_field( 'convertkit-settings-tools', '_convertkit_settings_tools_nonce' );
	?>
</div><!-- .metabox-holder -->