<?php
/**
 * Theme information page
 * @package Aberration Lite
 */

//Add the theme page
add_action('admin_menu', 'aberration_lite_add_theme_info');
function aberration_lite_add_theme_info(){
	$theme_info = add_theme_page( esc_html__('Aberration Lite Info','aberration-lite'), esc_html__('Aberration Lite Info','aberration-lite'), 'manage_options', 'aberration-info.php', 'aberration_lite_info_page' );
    add_action( 'load-' . $theme_info, 'aberration_lite_info_hook_styles' );
}

//Callback
function aberration_lite_info_page() {
?>
	<div class="info-container">
		<h2 class="info-title"><?php esc_html_e('Aberration Lite Info','aberration-lite'); ?></h2>
        
		<div class="info-block"><div class="dashicons dashicons-book-alt info-icon"></div>
        	<p class="info-text"><a href="http://www.shapedpixels.com/setup-aberration-lite/" target="_blank"><?php esc_html_e('Setup Tutorials','aberration-lite'); ?></a></p></div>
            
		<div class="info-block"><div class="dashicons dashicons-sos info-icon"></div>
        	<p class="info-text"><a href="https://wordpress.org/support/theme/aberration-lite" target="_blank"><?php esc_html_e('Support','aberration-lite'); ?></a></p></div>
            
 		<div class="info-block"><div class="dashicons dashicons-testimonial info-icon"></div>
 			<p class="info-text"><a href="https://wordpress.org/support/view/theme-reviews/aberration-lite" target="_blank"><?php esc_html_e('Submit a Testimonial','aberration-lite'); ?></a></p></div>
            
            <div class="info-block"><div class="dashicons dashicons-desktop info-icon"></div>
        	<p class="info-text"><a href="http://demos.shapedpixels.com/aberration-lite" target="_blank"><?php esc_html_e('Theme demo','aberration-lite'); ?></a></p></div>  
             
            <div class="info-block"><div class="dashicons dashicons-smiley info-icon"></div>
        	<p class="info-text"><a href="http://www.shapedpixels.com/aberration" target="_blank"><?php esc_html_e('Aberration Pro Version','aberration-lite'); ?></a></p></div>   
               
	</div>
<?php
}

//Styles
function aberration_lite_info_hook_styles(){
   	add_action( 'admin_enqueue_scripts', 'aberration_lite_info_page_styles' );
}
function aberration_lite_info_page_styles() {
	wp_enqueue_style( 'aberration-info-style', get_template_directory_uri() . '/css/info-page.css', array(), true );
}