<?php

namespace CarDealerPress\Templates\Admin\Admin;

if ( ! defined( 'ABSPATH' ) ) exit;

function logs() {
	global $wp_filesystem;
	if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base' ) ) {
		include_once ABSPATH . 'wp-admin/includes/file.php';
		$creds = request_filesystem_credentials( site_url() );
		wp_filesystem( $creds );
	}
	$logs = $wp_filesystem->get_contents( CDP_LOGS );

	$content  = '<div id="cdp-logs-wrapper" class="settings-wrapper display">';
	$content .= '<div class="wrap">';
	$content .= '<h3>Logs</h3>';
	$content .= $logs;
	$content .= '</div>';
	return $content;

}

/**
 * Pulls the data from the Options table.
 * For migrating sites. ??? then need an import...maybe another version...
 */
function get_settings() {

}
