This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'propertyhive_demo_data_num_items', 'increase_demo_data_items' ); | |
| function increase_demo_data_items($num) | |
| { | |
| return 20; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'houzez_property_feed_auto_create_new_features', 'dont_auto_create_features' ); | |
| function dont_auto_create_features($auto_create) | |
| { | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'propertyhive_reapit_foundations_json_properties_requests', 'remove_sales_from_foundations_requests' ); | |
| function remove_sales_from_foundations_requests( $requests ) | |
| { | |
| unset($requests['sales']); | |
| return $requests; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'propertyhive_property_import_cron', 'run_blm_export', 10, 3 ); | |
| function run_blm_export( $options, $instance_id, $import_id ) | |
| { | |
| do_action( 'phblmexportcronhook' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( "propertyhive_apex27_xml_properties_due_import", 'exclude_office_from_apex27', 10, 2 ); | |
| function exclude_office_from_apex27($properties, $import_id) | |
| { | |
| $new_properties = array(); | |
| foreach ($properties as $property) | |
| { | |
| if ( isset($property->Branch) && (string)$property->Branch == 'C21 Estrie RE' ) | |
| { | |
| // do nothing, we don't want this property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( "propertyhive_property_imported_street_json", 'set_buyer_report', 10, 2 ); | |
| function set_buyer_report($post_id, $property) | |
| { | |
| if ( isset($property['attributes']['property_urls']) && !empty($property['attributes']['property_urls']) ) | |
| { | |
| foreach ( $property['attributes']['property_urls'] as $url ) | |
| { | |
| if ( $url['media_type'] == 'brochure' ) | |
| { | |
| update_post_meta( $post_id, '_buyer_report', $url['media_url'] ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( "houzez_property_feed_pre_import_properties_xml", 'check_for_big_drop', 10, 2 ); | |
| function check_for_big_drop( $properties, $import_id ) | |
| { | |
| // get number of existing published properties imported for this import | |
| $args = array( | |
| 'post_type' => 'property', | |
| 'posts_per_page' => -1, | |
| 'post_status' => 'publish', | |
| 'fields' => 'ids', | |
| 'meta_query' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "propertyCode":"BOMAAP9945", | |
| "propertyReference":"P7205A", | |
| "propertyDescriptions":[ | |
| { | |
| "descriptionLanguage": "english", | |
| "descriptionText":"This exclusive plot in Marbella offers a unique opportunity to build your dream residence on the Costa del Sol. With a generous extension of 1493 square metres, the plot is strategically positioned with south orientation, guaranteeing optimal solar exposure and dazzling panoramic views. Located in a privileged area, the plot enjoys proximity to amenities, beaches and places of interest, providing convenience and luxurious lifestyle.\r\n\r\nWith a building coefficient of 0.60 for semi-detached houses and 0.40 for detached villas, future owners have the flexibility to design a spacious and elegant residence, making the most of the plot''s potential. This standard allows for the creation of a home that blends harmoniously with its surroundings, combining modernity and contemporary comforts. Whether for a permanent residence or a luxury getaway, this plot represent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( "houzez_property_feed_property_imported_street", 'convert_sq_m_to_sq_ft', 10, 4 ); | |
| function convert_sq_m_to_sq_ft( $post_id, $property, $import_id, $instance_id ) | |
| { | |
| if ( isset($property['attributes']['floor_area']) && !empty($property['attributes']['floor_area']) ) | |
| { | |
| $floor_area = $property['attributes']['floor_area']; | |
| // convert | |
| $floor_area = $floor_area * 10.764; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'propertyhive_rex_property_request_body', 'filter_account_in_rex_request' ); | |
| function filter_account_in_rex_request($data) | |
| { | |
| $data['criteria'][] = array( | |
| "name" => "account_id", | |
| "type" => "=", | |
| "value" => "4392" | |
| ); | |
| return $data; |