PluginProbe
Flexmls® IDX Plugin / 3.8.2
Flexmls® IDX Plugin v3.8.2
4.0.1 4.0.0 3.18.2 trunk 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 2.0 2.1 2.2 2.3 2.3.1 2.3.2 2.3.3 2.4 2.4.1 2.4.2 3.0.0 3.0.1 3.0.10 3.0.11 All 157 releases
flexmls-idx / SparkAPI / PropertyTypes.php

PropertyTypes.php in Flexmls® IDX Plugin 3.8.2, at SparkAPI/PropertyTypes.php

31 lines 863 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace SparkAPI;
3
4 defined( 'ABSPATH' ) or die( 'This plugin requires WordPress' );
5
6 class PropertyTypes extends Core {
7
8 function __construct(){
9 parent::__construct();
10 }
11
12 function get_property_sub_types() {
13 $response = $this->get_from_api( 'GET', 'standardfields/PropertySubType', DAY_IN_SECONDS );
14 if( true == $response[ 'success' ] && array_key_exists( 'FieldList', $response[ 'results' ][ 0 ][ 'PropertySubType' ] ) ){
15 return $response[ 'results' ][ 0 ][ 'PropertySubType' ][ 'FieldList' ];
16 }
17 return false;
18 }
19
20 function get_property_types(){
21 $records = false;
22 $response = $this->get_from_api( 'GET', 'propertytypes', DAY_IN_SECONDS );
23 if( true == $response[ 'success' ] ){
24 $records = array();
25 foreach( $response[ 'results' ] as $res ){
26 $records[ $res[ 'MlsCode' ] ] = $res[ 'MlsName' ];
27 }
28 }
29 return $records;
30 }
31 }