<?php

function store_prima_guide_add() {
    add_theme_page( __('Store Prima Guide', 'store-prima'), __('Store Prima Guide', 'store-prima'), 'edit_theme_options', 'store_prima_guide', 'store_prima_guide_callable' );
}
add_action( 'admin_menu', 'store_prima_guide_add' );

function store_prima_guide_callable(){
	
	$output = '';
	
	$output .= '<div class="store-prima-info-container">';
	
	$output .= 		'<div class="store-prima-info-container-inner">';
	
	$output .= 			'<div class="store-prima-info-content">';
	
	$output .= 				'<div class="store-prima-info-tabs">';
	
	$output .= 					'<div class="store-prima-info-tabs-item"><h3>' . __('How to show woocommerce products in homepage?', 'store-prima') . '</h3><div class="store-prima-info-tabs-item-content"><p>' . __('Go to customizer, click on "General settings", then on "FrontPage Settings", then set "Your homepage displays" to "A static page" and select pages for "Homepage" and "Blog". Now go to edit the page you selected as homepage and select "woocommerce shop" from dropdown for "page attributes" and save.', 'store-prima') . '</p></div><span></span></div>';	
	
	$output .= 					'<div class="store-prima-info-tabs-item"><h3>' . __('How to setup the slider?', 'store-prima') . '</h3><div class="store-prima-info-tabs-item-content"><p>' . __('Edit the product you want to show in slider and you will see a section "Slider settings" on the right side bar, select for "show in slider" setting.', 'store-prima') . '</p></div><span></span></div>';
	

	
	$output .= 					'<div class="store-prima-info-tabs-item"><h3>' . __('How to setup the testimonials?', 'store-prima') . '</h3><div class="store-prima-info-tabs-item-content"><p>' . __('Put all posts you want to show in a separate category and select that category in "Testimonials Settings tag of customizer screen."', 'store-prima') . '</p></div><span></span></div>';	
	
	$output .=				'</div>';	
	
	$output .=			'</div>';
	
	$output .= 			'<div class="store-prima-info-ads">';
	$output .=			'<h2>' . __('Want More features?', 'store-prima') . '</h2>';
	$output .=			'<a href="https://wpenclave.com/theme">' . __('Get Pro version', 'store-prima') . '</a>';	
	$output .=			'</div>';	
	
	$output .=		'</div>';
	
	$output .= '</div>';
	
	echo $output;
	
}

add_action( 'admin_print_styles-appearance_page_store_prima_guide', 'store_prima_guide_styles', 11 );
function store_prima_guide_styles(){
	
	wp_enqueue_style( 'store-prima-info-page', get_template_directory_uri() . '/assets/css/theme-info.css' );
	wp_enqueue_script( 'store-prima-info-page', get_template_directory_uri() . '/assets/js/theme-info.js', array('jquery'), '20151215', true );
	
}