<?php
/* wppa-setting-see-also.php
* Package: wp-photo-album-plus
*
* manage all options
* Version 8.0.08.005
*
*/

global $wppa_tab_names;
global $wppa_subtab_names;

	// The header tabs
	$wppa_tab_names = array(
		'general' 		=> 	__( 'General', 'wp-photo-album-plus' ),
		'generaladv' 	=> 	__( 'General', 'wp-photo-album-plus' ),
		'layout' 		=> 	__( 'Layout', 'wp-photo-album-plus' ),
		'covers' 		=> 	__( 'Albums', 'wp-photo-album-plus'),
		'photos' 		=>	__( 'Photos', 'wp-photo-album-plus'),
		'thumbs' 		=> 	__( 'Thumbnails', 'wp-photo-album-plus'),
		'slide' 		=>	__( 'Slideshow', 'wp-photo-album-plus'),
		'lightbox' 		=>	__( 'Lightbox', 'wp-photo-album-plus' ),
		'comments' 		=>	__( 'Comments', 'wp-photo-album-plus' ),
		'rating' 		=> 	__( 'Rating', 'wp-photo-album-plus' ),
		'search' 		=> 	__( 'Search', 'wp-photo-album-plus' ),
		'widget' 		=> 	__( 'Widgets', 'wp-photo-album-plus' ),
		'links' 		=>	__( 'Links', 'wp-photo-album-plus' ),
		'users' 		=>	__( 'Users', 'wp-photo-album-plus' ),
		'email' 		=> 	__( 'Email', 'wp-photo-album-plus' ),
		'share' 		=>	__( 'Share', 'wp-photo-album-plus' ),
		'system' 		=> 	__( 'System', 'wp-photo-album-plus' ),
		'files'			=> 	__( 'Files', 'wp-photo-album-plus' ),
		'new' 			=> 	__( 'New', 'wp-photo-album-plus' ),
		'admin' 		=>	__( 'Admin', 'wp-photo-album-plus' ),
		'maintenance' 	=> 	__( 'Maintenance', 'wp-photo-album-plus' ),
		'exif' 			=> 	'EXIF',
		'iptc' 			=> 	'IPTC',
		'gpx' 			=> 	'GPX',
		'watermark' 	=>	__( 'Watermark', 'wp-photo-album-plus' ),
		'custom' 		=> 	__( 'Custom data', 'wp-photo-album-plus' ),
		'constants' 	=>	__( 'Constants', 'wp-photo-album-plus' ),
		'misc' 			=> 	__( 'Misc', 'wp-photo-album-plus' ),
		'miscadv' 		=> __( 'Misc', 'wp-photo-album-plus' ),
	);
	$wppa_subtab_names = array(
		'general' 		=> array(
			'1' => __('On this tab you can select the features you want to use', 'wp-photo-album-plus'),
			),
		'generaladv' 	=> array(
			'1' => __('On this tab you can select the features you want to use', 'wp-photo-album-plus'),
			),
		'layout' 		=> array(
			'1' => __('General layout settings', 'wp-photo-album-plus'),
			'2' => __('Breadcrumb specifications', 'wp-photo-album-plus'),
			'3' => __('Navigation symbol specifications', 'wp-photo-album-plus'),
			'4' => __('Multimedia icon and stubfile specifications', 'wp-photo-album-plus'),
			'5' => __('Fonts', 'wp-photo-album-plus'),
			),
		'covers' 		=> array(
			'1' => __('Album cover size specifications', 'wp-photo-album-plus'),
			'2' => __('Album cover options', 'wp-photo-album-plus'),
			'3' => __('Album cover layout settings', 'wp-photo-album-plus'),
			),
		'photos' 		=> array(
			'1' => __('Photo specifications', 'wp-photo-album-plus'),
			'2' => __('Shortcode [photo ... ] specifications', 'wp-photo-album-plus'),
			'3' => __('Photo of the day settings', 'wp-photo-album-plus'),
			),
		'thumbs' 		=> array(
			'1' => __('Thumbnail size specifications', 'wp-photo-album-plus'),
			'2' => __('Thumbnail display options', 'wp-photo-album-plus'),
			'3' => __('Thumbnail layout settings', 'wp-photo-album-plus'),
			),
		'slide' 		=> array(
			'1' => __('Sllideshow component specifications', 'wp-photo-album-plus'),
			'2' => __('Slideshow component sequence', 'wp-photo-album-plus'),
			'3' => __('Slideshow layout settings', 'wp-photo-album-plus'),
			'4' => __('Slideshow dynamic behaviour', 'wp-photo-album-plus'),
			),
		'lightbox' 		=> array(
			'1' => __('Lightbox overlay configuration settings', 'wp-photo-album-plus'),
			),
		'comments' 		=> array(
			'1' => __('Comments system related settings', 'wp-photo-album-plus'),
			),
		'rating' 		=> array(
			'1' => __('Rating system related settings', 'wp-photo-album-plus'),
			),
		'search' 		=> array(
			'1' => __('Search albums and photos features related settings', 'wp-photo-album-plus'),
			),
		'widget' 		=> array(
			'1' => __('General widget size settings', 'wp-photo-album-plus'),
			'2' => __('Visibility settings', 'wp-photo-album-plus'),
			'3' => __('QR Code widget settings', 'wp-photo-album-plus'),
			),
		'links' 		=> array(
			'1' => __('System Links configuration', 'wp-photo-album-plus'),
			'2' => __('Links from standard images', 'wp-photo-album-plus'),
			'3' => __('Links from items and images in widgets', 'wp-photo-album-plus'),
			'4' => __('Other links', 'wp-photo-album-plus'),
			),
		'users' 		=> array(
			'1' => __('Frontend (user) upload related settings', 'wp-photo-album-plus'),
			),
		'email' 		=> array(
			'1' => __('Email configuration settings', 'wp-photo-album-plus'),
			'2' => __('Failed mails', 'wp-photo-album-plus'),
			'3' => __('Permanently failed mails', 'wp-photo-album-plus'),
			),
		'share' 		=> array(
			'1' => __('Social media related settings', 'wp-photo-album-plus'),
			'2' => __('Search Engine Optimazation settings', 'wp-photo-album-plus'),
			),
		'system' 		=> array(
			'1' => __('System behaviour related settings' , 'wp-photo-album-plus'),
			),
		'files'			=> array(
			'1' => __('Original source file related settings', 'wp-photo-album-plus'),
			),
		'new' 			=> array(
			'1' => __('New albums / photos related settings', 'wp-photo-album-plus'),
			),
		'admin' 		=> array(
			'1' => __('WPPA+ related roles and capabilities', 'wp-photo-album-plus'),
			'2' => __('Frontend create Albums and upload Photos enabling and limiting settings' , 'wp-photo-album-plus'),
			'3' => __('Import related settings', 'wp-photo-album-plus'),
			'4' => __('Admin Functionality restrictions for non administrators' , 'wp-photo-album-plus'),
			'5' => __('Miscellaneous limiting settings' , 'wp-photo-album-plus'),
			'6' => __('Miscellaneous admin related settings', 'wp-photo-album-plus' ),
			),
		'maintenance' 	=> array(
			'1' => __('Regular maintenance procedures', 'wp-photo-album-plus'),
			'2' => __('Clearing and other irreversable maintenance procedures', 'wp-photo-album-plus'),
			),
		'exif' 			=> array(
			'1' => __('EXIF tags and their labels as found in the uploaded photos', 'wp-photo-album-plus'),
			),
		'iptc' 			=> array(
			'1' => __('IPTC tags and their labels as found in the uploaded photos', 'wp-photo-album-plus'),
			),
		'gpx' 			=> array(
			'1' => __('GPX configuration', 'wp-photo-album-plus'),
			),
		'custom' 		=> array(
			'1' => __( 'Album custom data fields configuration', 'wp-photo-album-plus' ),
			'2' => __( 'Photo custom data fields configuration', 'wp-photo-album-plus' ),
			),
		'watermark' 	=> array(
			'1' => __('Watermark related settings', 'wp-photo-album-plus'),
			),
		'constants' 	=> array(
			'1' => __('System constants (read only)', 'wp-photo-album-plus'),
			),
		'misc' 			=> array(
			'1' => __('Miscellaneous settings', 'wp-photo-album-plus'),
			'2' => __('Panorama related settings', 'wp-photo-album-plus'),
			),
		'miscadv' 		=> array(
			'1' => __('Advanced miscellaneous settings', 'wp-photo-album-plus'),
			'2' => __('Logging', 'wp-photo-album-plus'),
			'3' => __('External services related settings and actions', 'wp-photo-album-plus'),
			'4' => __('Other plugins related settings', 'wp-photo-album-plus'),
			),
	);

// See also
function wppa_see_also( $tab, $subtab = '', $items = '', $switch = '', $value = '', $error = false ) {
global $wppa_tab_names;
global $wppa_subtab_names;

	// Do they need us?
	if ( $switch && ! $value ) {
		if ( ! wppa_switch( $switch ) ) {
			return;
		}
	}
	if ( $switch && $value ) {
		if ( wppa_opt( $switch ) != $value ) {
			return;
		}
	}

	// Make the full link
	$link = admin_url( 'admin.php' ) . '?page=wppa_options';
	if ( $tab ) {
		$link .= '&wppa-tab=' . sanitize_text_field( $tab );
	}
	if ( $subtab ) {
		$link .= '&wppa-subtab=' . strval( intval( $subtab ) );
	}
	if ( $items !== '' ) {
		$link .= '&wppa-item=' . sanitize_text_field( $items );
	}
	if ( $error ) {
		$link .= '&wppa-error=1';
	}

	// Make the htnl
	$result = '
	&nbsp;<a
		href="' . $link . '"
		title="' . esc_attr( 'Jump to related (sub)tab', 'wp-photo-album-plus' ) . '"
		style="cursor:pointer;"
		>' .
		__( 'See also', 'wp-photo-album-plus' ) . ': ' . $wppa_tab_names[$tab] . ' -> ' . $wppa_subtab_names[$tab][$subtab] . '
	</a>&nbsp;';

	return $result;
}
