PluginProbe
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings / 7.1.1
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings v7.1.1
7.2.1 7.2 7.1.2 7.1.1 7.1 7.0.4 7.0.6 7.0.7 6.3.8 6.3.7 6.3.6 6.3.5 6.3.4 6.3.3 6.3.1 trunk 5.7.3 5.7.5 5.8.1 5.8.2 5.8.3 5.8.4 5.8.6 6.0.4 6.0.5 All 36 releases
mlsimport / admin / partials / mlsimport-admin-display.php

mlsimport-admin-display.php in MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings 7.1.1, at admin/partials/mlsimport-admin-display.php

87 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 // Default tab when none is requested in the URL.
26 $active_tab = 'display_options';
27 // Active tab comes from ?tab= (sanitised); highlights the matching nav link below.
28 if ( isset( $_GET['tab'] ) ) {
29 $active_tab = sanitize_text_field ( wp_unslash( $_GET['tab'] ) );
30 }
31 ?>
32
33 <div class="nav-tab-wrapper mlsimport-tab-wrapper">
34 <a href="?page=mlsimport_plugin_options&tab=display_options" class="nav-tab <?php echo 'display_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'MLS Connection','mlsimport' ); ?></a>
35 <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>
36 <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>
37 </div>
38
39
40 <?php
41 // Extra CSS class applied only to the first tab's card wrapper.
42 $extra_class='';
43 if ( 'display_options' === $active_tab ) {
44 $extra_class='mlsimport_2025_card_admin_options';
45 } ?>
46
47 <div class="content-nav-tab <?php echo esc_attr($extra_class);?> mlsimport_2025_card mlsimport_2025_card_left_oriented <?php echo 'display_options' === $active_tab ? 'content-nav-tab-active' : ''; ?>">
48 <?php
49 // Tab 1 panel — load the MLS/RESO API options partial only when active.
50 if ( 'display_options' === $active_tab ) {
51 include_once '' . $this->plugin_name . '-admin-options.php';
52 }
53 ?>
54 <?php if ( 'display_options' === $active_tab ) : ?>
55 <div class="mlsimport-steps">
56 <ol>
57 <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=mlsimport_plugin_options' ) ); ?>"><?php esc_html_e( 'Connect your MLSImport account and your MLS.', 'mlsimport' ); ?></a></li>
58 <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=mlsimport_plugin_options&tab=field_options' ) ); ?>"><?php esc_html_e( 'Choose which listing details to show on your site.', 'mlsimport' ); ?></a></li>
59 <li><a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=mlsimport_item' ) ); ?>"><?php esc_html_e( 'Start an import and bring in your listings.', 'mlsimport' ); ?></a></li>
60 </ol>
61 </div>
62 <?php endif; ?>
63
64
65 </div>
66
67 <div class="content-nav-tab mlsimport_2025_card mlsimport_2025_card_left_oriented <?php echo 'field_options' === $active_tab ? 'content-nav-tab-active' : ''; ?>">
68 <?php
69 // Tab 2 panel — load the field-selection partial only when active.
70 if ( 'field_options' === $active_tab ) {
71 include_once '' . $this->plugin_name . '-admin-fields-select.php';
72 }
73 ?>
74 </div>
75
76
77
78 <div class="content-nav-tab mlsimport_2025_card mlsimport_2025_card_left_oriented <?php echo 'administrative_options' === $active_tab ? 'content-nav-tab-active' : ''; ?>">
79 <?php
80 // Tab 3 panel — load the Tools / administrative options partial only when active.
81 if ( 'administrative_options' === $active_tab ) {
82 include_once '' . $this->plugin_name . '-administrative-options.php';
83 }
84 ?>
85 </div>
86
87 </div>