PluginProbe
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings / 6.3.8
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings v6.3.8
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 / includes / mlsimport-status-taxonomy.php

mlsimport-status-taxonomy.php in MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings 6.3.8, at includes/mlsimport-status-taxonomy.php

33 lines 925 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Pure resolver for the taxonomy that holds a listing's MLS status.
4 *
5 * No WordPress calls — safe to unit-test in isolation.
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 /**
13 * Return the taxonomy that holds a listing's MLS status.
14 *
15 * Honors the user's StandardStatus field mapping (the global
16 * mls-fields-map-taxonomy array) and falls back to the theme default when
17 * StandardStatus is not mapped.
18 *
19 * @param mixed $taxonomy_map The mls-fields-map-taxonomy array (anything else is treated as unmapped).
20 * @param string $default_taxonomy The theme's default status taxonomy.
21 * @return string
22 */
23 function mlsimport_status_taxonomy( $taxonomy_map, $default_taxonomy ) {
24 if ( is_array( $taxonomy_map ) && isset( $taxonomy_map['StandardStatus'] ) ) {
25 $mapped = trim( (string) $taxonomy_map['StandardStatus'] );
26 if ( '' !== $mapped ) {
27 return $mapped;
28 }
29 }
30
31 return $default_taxonomy;
32 }
33