| 1 |
<?php |
| 2 |
/** |
| 3 |
* Provide a admin area view for the plugin |
| 4 |
* |
| 5 |
* This file is used to markup the admin-facing aspects of the plugin. |
| 6 |
* |
| 7 |
* @link http://mlsimport.com/ |
| 8 |
* @since 1.0.0 |
| 9 |
* |
| 10 |
* @package mlsimport |
| 11 |
* @subpackage mlsimport/admin/partials |
| 12 |
*/ |
| 13 |
|
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; // Exit if accessed directly |
| 16 |
} |
| 17 |
?> |
| 18 |
<!-- This file should primarily consist of HTML with a little bit of PHP. --> |
| 19 |
<div class="wrap"> |
| 20 |
<h2><?php esc_html_e( 'MLS Import Options', 'mlsimport' ); ?></h2> |
| 21 |
|
| 22 |
<?php |
| 23 |
// Grab all options |
| 24 |
$options = get_option( $this->plugin_name ); |
| 25 |
// Active tab comes from ?tab= (sanitised) and resolves through the single |
| 26 |
// tab rule (mlsimport_settings_active_tab): Connections is the default and |
| 27 |
// the retired 'display_options' value aliases to it — old bookmarks and |
| 28 |
// links keep landing on the one connection surface. |
| 29 |
$active_tab = mlsimport_settings_active_tab( |
| 30 |
isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '' |
| 31 |
); |
| 32 |
?> |
| 33 |
|
| 34 |
<div class="nav-tab-wrapper mlsimport-tab-wrapper"> |
| 35 |
<a href="?page=mlsimport_plugin_options&tab=connections" class="nav-tab <?php echo 'connections' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Connections', 'mlsimport' ); ?></a> |
| 36 |
<a href="?page=mlsimport_plugin_options&tab=field_options" class="nav-tab <?php echo 'field_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Listing Details', 'mlsimport' ); ?></a> |
| 37 |
<a href="?page=mlsimport_plugin_options&tab=administrative_options" class="nav-tab <?php echo 'administrative_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Tools', 'mlsimport' ); ?></a> |
| 38 |
</div> |
| 39 |
|
| 40 |
<div class="content-nav-tab mlsimport_2025_card mlsimport_2025_card_left_oriented <?php echo 'connections' === $active_tab ? 'content-nav-tab-active' : ''; ?>"> |
| 41 |
<?php |
| 42 |
// Connections tab panel (#280) — the multi-MLS Connections screen. |
| 43 |
if ( 'connections' === $active_tab ) { |
| 44 |
include_once '' . $this->plugin_name . '-connections.php'; |
| 45 |
} |
| 46 |
?> |
| 47 |
</div> |
| 48 |
|
| 49 |
<div class="content-nav-tab mlsimport_2025_card mlsimport_2025_card_left_oriented <?php echo 'field_options' === $active_tab ? 'content-nav-tab-active' : ''; ?>"> |
| 50 |
<?php |
| 51 |
// Tab 2 panel — load the field-selection partial only when active. |
| 52 |
if ( 'field_options' === $active_tab ) { |
| 53 |
include_once '' . $this->plugin_name . '-admin-fields-select.php'; |
| 54 |
} |
| 55 |
?> |
| 56 |
</div> |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
<div class="content-nav-tab mlsimport_2025_card mlsimport_2025_card_left_oriented <?php echo 'administrative_options' === $active_tab ? 'content-nav-tab-active' : ''; ?>"> |
| 61 |
<?php |
| 62 |
// Tab 3 panel — load the Tools / administrative options partial only when active. |
| 63 |
if ( 'administrative_options' === $active_tab ) { |
| 64 |
include_once '' . $this->plugin_name . '-administrative-options.php'; |
| 65 |
} |
| 66 |
?> |
| 67 |
</div> |
| 68 |
|
| 69 |
</div> |