<?php
/**
* LayerSlider v5.1.2 - Responsive Slideshow Module http://layerslider.webshopworks.com
*
*  @author    WebshopWorks <info@webshopworks.com>
*  @copyright 2015 WebshopWorks
*  @license   One Domain Licence
*/

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

add_filter('contextual_help', 'layerslider_help', 10, 3);
function layerslider_help($contextual_help, $screen_id, $screen)
{
	if (strpos($screen->base, 'ls-skin-editor') !== false)
		$screen->add_help_tab(array(
			'id' => 'skin_overview',
			'title' => 'Overview',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/skin_overview.html')));

	elseif (strpos($screen->base, 'ls-style-editor') !== false)
		$screen->add_help_tab(array(
			'id' => 'styles_overview',
			'title' => 'Overview',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/styles_overview.html')));

	elseif (strpos($screen->base, 'ls-transition-builder') !== false)
	{
		$screen->add_help_tab(array(
			'id' => 'transition_overview',
			'title' => 'Overview',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/transition_overview.html')));

		$screen->add_help_tab(array(
			'id' => 'transition_start',
			'title' => 'Getting started',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/transition_start.html')));

		$screen->add_help_tab(array(
			'id' => 'transition_3d',
			'title' => '3D transitions',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/transition_3d.html')));

		$screen->add_help_tab(array(
			'id' => 'transition_easings',
			'title' => 'Easings',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/transition_easings.html')));

	}
	elseif (strpos($screen->base, 'layerslider') !== false)
	{
		$screen->add_help_tab(array(
			'id' => 'home_overview',
			'title' => 'Overview',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/home_overview.html')));

		$screen->add_help_tab(array(
			'id' => 'home_screen',
			'title' => 'Managing sliders',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/home_managing_sliders.html')));

		$screen->add_help_tab(array(
			'id' => 'inserting_slider',
			'title' => 'Inserting sliders into pages',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/inserting_slider.html')));

		$screen->add_help_tab(array(
			'id' => 'exportimport',
			'title' => 'Export / Import',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/home_exportimport.html')));

		$screen->add_help_tab(array(
			'id' => 'sample_slider',
			'title' => 'Sample sliders',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/home_sample_slider.html')));

		$screen->add_help_tab(array(
			'id' => 'ls_google_fonts',
			'title' => 'Using Google Fonts',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/home_google_fonts.html')));

		$screen->add_help_tab(array(
			'id' => 'ls_advanced_settings',
			'title' => 'Advanced settings',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/home_advanced_settings.html')));

		$screen->add_help_tab(array(
			'id' => 'ls_faq',
			'title' => 'Need more help?',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/faq.html')));

	}
	elseif (strpos($screen->base, 'edit') !== false)
	{
		$screen->add_help_tab(array(
			'id' => 'overview',
			'title' => 'Overview',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_overview.html')));

		$screen->add_help_tab(array(
			'id' => 'interface',
			'title' => 'Interface tips',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_interface.html')));

		$screen->add_help_tab(array(
			'id' => 'inserting_slider',
			'title' => 'Inserting sliders into pages',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/inserting_slider.html')));

		$screen->add_help_tab(array(
			'id' => 'slider_types',
			'title' => 'Layout & Responsive mode',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_layout.html')));

		$screen->add_help_tab(array(
			'id' => 'sublayer_options',
			'title' => 'Layer options',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_layer_options.html')));

		$screen->add_help_tab(array(
			'id' => 'post_contents',
			'title' => 'Dynamic sliders from articles/products',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_post_content.html')));

		$screen->add_help_tab(array(
			'id' => 'embedding_videos',
			'title' => 'Embedding videos',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_multimedia.html')));
		$screen->add_help_tab(array(
			'id' => 'other_features',
			'title' => 'Other features',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_other_features.html')));

		$screen->add_help_tab(array(
			'id' => 'event_callbacks',
			'title' => 'Event callbacks',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_event_callbacks.html')));

		$screen->add_help_tab(array(
			'id' => 'layerslider_api',
			'title' => 'LayerSlider API',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/editor_api.html')));

		$screen->add_help_tab(array(
			'id' => 'ls_faq',
			'title' => 'Need more help?',
			'content' => Tools::file_get_contents(LS_ROOT_PATH.'/docs/faq.html')));
	}
}

?>
