<?php

/**
 * Included file to display admin options
 */
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_QTRANSLATEX, true);
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::OPTION_INDEXES, true);
$extension_options_name = 'wdm_solr_extension_qtranslatex_data';
$settings_fields_name = 'solr_extension_qtranslatex_options';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_QTRANSLATEX);
$plugin_name = "qTranslate X";
$plugin_link = "https://wordpress.org/plugins/qtranslate-x/";
$plugin_version = "";
if ($is_plugin_active) {
    $ml_plugin = PluginQTranslateX::create();
}
?>

<?php 
include_once WpSolrExtensions::get_option_file(WpSolrExtensions::EXTENSION_WPML, 'template.inc.php');
<?php

/**
 * Included file to display admin options
 */
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_S2MEMBER, true);
PluginS2Member::update_custom_field_capabilities(PluginS2Member::CUSTOM_FIELD_NAME_STORING_POST_CAPABILITIES);
$extension_options_name = 'wdm_solr_extension_s2member_data';
$settings_fields_name = 'solr_extension_s2member_options';
$array_extension_options = get_option($extension_options_name);
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_S2MEMBER);
$is_plugin_custom_field_for_indexing = PluginS2Member::get_custom_field_capabilities(PluginS2Member::CUSTOM_FIELD_NAME_STORING_POST_CAPABILITIES);
$custom_field_for_indexing_name = PluginS2Member::CUSTOM_FIELD_NAME_STORING_POST_CAPABILITIES;
$plugin_name = "s2member";
?>

<div id="extension_s2member-options" class="wdm-vertical-tabs-content">
	<form action="options.php" method="POST" id='extension_s2member_settings_form'>
		<?php 
settings_fields($settings_fields_name);
$solr_extension_s2member_options = get_option($extension_options_name, array('is_extension_active' => '0', 'is_users_without_capabilities_see_all_results' => '0', 'is_result_without_capabilities_seen_by_all_users' => '0', 'message_user_without_capabilities_shown_no_results' => '', 'message_result_capability_matches_user_group' => ''));
?>

		<div class='wrapper'>
			<h4 class='head_div'>s2Member plugin Options</h4>

			<div class="wdm_note">

				In this section, you will configure how to restrict Solr search with levels
				and capabilities.<br/>
<?php

/**
 * Included file to display admin options
 */
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_POLYLANG, true);
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::OPTION_INDEXES, true);
$extension_options_name = 'wdm_solr_extension_polylang_data';
$settings_fields_name = 'solr_extension_polylang_options';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_POLYLANG);
$plugin_name = "Polylang";
$plugin_link = "https://polylang.wordpress.com/documentation/";
$plugin_version = "(>= 1.7.11)";
if ($is_plugin_active) {
    $ml_plugin = PluginPolylang::create();
}
?>

<?php 
include_once WpSolrExtensions::get_option_file(WpSolrExtensions::EXTENSION_WPML, 'template.inc.php');
<?php

/**
 * Included file to display admin options
 */
global $license_manager;
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_BBPRESS, true);
$extension_options_name = 'wdm_solr_extension_bbpress_data';
$settings_fields_name = 'solr_extension_bbpress_options';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_BBPRESS);
$plugin_name = "bbPress";
$plugin_link = "https://wordpress.org/plugins/bbpress/";
$plugin_version = "(>= 2.5.10)";
?>

<div id="extension_groups-options" class="wdm-vertical-tabs-content">
	<form action="options.php" method="POST" id='extension_groups_settings_form'>
		<?php 
settings_fields('solr_extension_bbpress_options');
$extension_options = get_option($extension_options_name, array('is_extension_active' => '0'));
?>

		<div class='wrapper'>
			<h4 class='head_div'><?php 
echo $plugin_name;
?>
 plugin Options</h4>

			<div class="wdm_note">
<?php

/**
 * Included file to display admin options
 */
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_TYPES, true);
$extension_options_name = 'wdm_solr_extension_types_data';
$settings_fields_name = 'solr_extension_types_options';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_TYPES);
$plugin_name = "Types";
$plugin_link = "https://wordpress.org/plugins/types/";
$plugin_version = "(>=  1.8.10)";
if ($is_plugin_active) {
    $ml_plugin = PluginTypes::create();
}
?>

<div id="extension_groups-options" class="wdm-vertical-tabs-content">
	<form action="options.php" method="POST" id='extension_groups_settings_form'>
		<?php 
settings_fields('solr_extension_types_options');
$extension_options = get_option($extension_options_name, array('is_extension_active' => '0'));
?>

		<div class='wrapper'>
			<h4 class='head_div'><?php 
echo $plugin_name;
?>
 plugin Options</h4>
<?php

/**
 * Included file to display admin options
 */
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_GROUPS, true);
PluginGroups::update_custom_field_capabilities(PluginGroups::CUSTOM_FIELD_NAME_STORING_POST_CAPABILITIES);
$array_extension_options = get_option('wdm_solr_extension_groups_data');
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_GROUPS);
$is_plugin_custom_field_for_indexing = PluginGroups::get_custom_field_capabilities(PluginGroups::CUSTOM_FIELD_NAME_STORING_POST_CAPABILITIES);
$custom_field_for_indexing_name = PluginGroups::CUSTOM_FIELD_NAME_STORING_POST_CAPABILITIES;
$plugin_name = "Groups";
?>

<div id="extension_groups-options" class="wdm-vertical-tabs-content">
	<form action="options.php" method="POST" id='extension_groups_settings_form'>
		<?php 
settings_fields('solr_extension_groups_options');
$solr_extension_groups_options = get_option('wdm_solr_extension_groups_data', array('is_extension_active' => '0', 'is_users_without_groups_see_all_results' => '0', 'is_result_without_capabilities_seen_by_all_users' => '0', 'message_user_without_groups_shown_no_results' => '', 'message_result_capability_matches_user_group' => ''));
?>

		<div class='wrapper'>
			<h4 class='head_div'>Groups plugin Options</h4>

			<div class="wdm_note">

				In this section, you will configure how to restrict Solr search with groups
				and capabilities.<br/>

				<?php 
if (!$is_plugin_active) {
<?php

/**
 * Included file to display admin options
 */
global $license_manager;
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_PDF_EMBEDDER, true);
$extension_options_name = WPSOLR_Option::OPTION_PDF_EMBEDDER;
$settings_fields_name = 'extension_pdf_embedder_opt';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_PDF_EMBEDDER);
$plugin_name = "PDF Embedder";
$plugin_link = "https://wordpress.org/plugins/pdf-embedder/";
$plugin_version = "(>= 2.7.3)";
?>

<div id="extension_groups-options" class="wdm-vertical-tabs-content">
	<form action="options.php" method="POST" id='extension_groups_settings_form'>
		<?php 
settings_fields($settings_fields_name);
$extension_options = get_option($extension_options_name, array('is_extension_active' => '0'));
?>

		<div class='wrapper'>
			<h4 class='head_div'><?php 
echo $plugin_name;
?>
 plugin Options</h4>

			<div class="wdm_note">
<?php

/**
 * Included file to display admin options
 */
global $license_manager;
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_WOOCOMMERCE, true);
$extension_options_name = 'wdm_solr_extension_woocommerce_data';
$settings_fields_name = 'solr_extension_woocommerce_options';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_WOOCOMMERCE);
$plugin_name = "WooCommerce";
$plugin_link = "https://wordpress.org/plugins/woocommerce/";
$plugin_version = "(>= 2.4.10)";
if ($is_plugin_active) {
    $ml_plugin = PluginWooCommerce::create();
}
?>

<div id="extension_groups-options" class="wdm-vertical-tabs-content">
	<form action="options.php" method="POST" id='extension_groups_settings_form'>
		<?php 
settings_fields('solr_extension_woocommerce_options');
$extension_options = get_option($extension_options_name, array('is_extension_active' => '0'));
?>

		<div class='wrapper'>
			<h4 class='head_div'><?php 
echo $plugin_name;
?>
 plugin Options</h4>
<?php

/**
 * Included file to display admin options
 */
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_WPML, true);
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::OPTION_INDEXES, true);
$extension_options_name = 'wdm_solr_extension_wpml_data';
$settings_fields_name = 'solr_extension_wpml_options';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_WPML);
$plugin_name = "WPML";
$plugin_link = "https://wpml.org/";
$plugin_version = "(WPML Multilingual CMS > 3.1.6)";
$ml_plugin = PluginWpml::create();
?>

<?php 
include_once 'template.inc.php';
<?php

/**
 * Included file to display admin options
 */
global $license_manager;
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_EMBED_ANY_DOCUMENT, true);
$extension_options_name = WPSOLR_Option::OPTION_EMBED_ANY_DOCUMENT;
$settings_fields_name = 'extension_embed_any_document_opt';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_EMBED_ANY_DOCUMENT);
$plugin_name = "Embed Any Document";
$plugin_link = "https://wordpress.org/plugins/embed-any-document/";
$plugin_version = "(>= 2.2.5)";
?>

<div id="extension_groups-options" class="wdm-vertical-tabs-content">
	<form action="options.php" method="POST" id='extension_groups_settings_form'>
		<?php 
settings_fields('extension_embed_any_document_opt');
$extension_options = get_option($extension_options_name, array('is_extension_active' => '0'));
?>

		<div class='wrapper'>
			<h4 class='head_div'><?php 
echo $plugin_name;
?>
 plugin Options</h4>

			<div class="wdm_note">
<?php

/**
 * Included file to display admin options
 */
global $license_manager;
WpSolrExtensions::require_once_wpsolr_extension(WpSolrExtensions::EXTENSION_GOOGLE_DOC_EMBEDDER, true);
$extension_options_name = WPSOLR_Option::OPTION_GOOGLE_DOC_EMBEDDER;
$settings_fields_name = 'extension_google_doc_embedder_opt';
$options = get_option($extension_options_name, array('is_extension_active' => '0'));
$is_plugin_active = WpSolrExtensions::is_plugin_active(WpSolrExtensions::EXTENSION_GOOGLE_DOC_EMBEDDER);
$plugin_name = "Google Doc Embedder";
$plugin_link = "https://wordpress.org/plugins/google-document-embedder/";
$plugin_version = "(>= 2.6)";
?>

<div id="extension_groups-options" class="wdm-vertical-tabs-content">
	<form action="options.php" method="POST" id='extension_groups_settings_form'>
		<?php 
settings_fields($settings_fields_name);
$extension_options = get_option($extension_options_name, array('is_extension_active' => '0'));
?>

		<div class='wrapper'>
			<h4 class='head_div'><?php 
echo $plugin_name;
?>
 plugin Options</h4>

			<div class="wdm_note">