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_wp_rest_api_double_serialized_fields', function ( $fields ) { | |
| $fields[] = '_elementor_page_assets'; | |
| return array_unique( $fields ); | |
| } ); |
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_vaultea_endpoints', 'add_sold_endpoint' ); | |
| function add_sold_endpoint($endpoints) | |
| { | |
| $endpoints[] = array( | |
| 'uri' => 'properties/residential/sale/sold', | |
| 'department' => 'residential-sales', | |
| //'portalStatus' => array( 'listing', 'conditional' ) | |
| ); | |
| return $endpoints; |
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_idealista_export_property_data', 'add_size_to_exported_idealista_data', 10, 3 ); | |
| function add_size_to_exported_idealista_data( $property_data, $post_id, $portal_id ) | |
| { | |
| $area = ''; | |
| $property = new PH_Property( (int) $post_id ); | |
| $features = $property->get_features(); | |
| if ( ! empty( $features ) ) | |
| { |
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_properties_due_import_kyero', function( $properties, $import_id ) { | |
| foreach ( $properties as $property ) { | |
| if ( isset( $property->type ) && (string)$property->type != '' ) | |
| { | |
| $property->type = trim((string)$property->type, " -"); // add any more characters here you wish to trim from the type | |
| } | |
| } |
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
| /** | |
| * Remove video and virtual tour URLs from Kyero imports. | |
| */ | |
| add_filter( 'houzez_property_feed_properties_due_import_kyero', function( $properties, $import_id ) { | |
| foreach ( $properties as $property ) { | |
| // Empty the video URL. | |
| if ( isset( $property->video_url ) ) { | |
| $property->video_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_filter( 'propertyhive_property_import_post_data', function( $postdata, $import_id, $property, $crm_id ) { | |
| unset( $postdata['post_date'] ); | |
| return $postdata; | |
| }, 10, 4 ); |
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
| /** | |
| * Replace "~~" with line breaks in the descrip1 node | |
| * before properties are imported from Inmovilla. | |
| */ | |
| add_filter( | |
| 'houzez_property_feed_properties_due_import_inmovilla', | |
| function( $properties, $import_id ) { | |
| foreach ( $properties as $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_filter( 'propertyhive_property_enquiry_form_fields', 'hide_viewing_fields_on_email', 11, 2 ); | |
| function hide_viewing_fields_on_email( $form_controls, $property_id ) | |
| { | |
| if ( is_ajax() ) | |
| { | |
| // Email is being sent | |
| if ( !isset($_POST['preferred_viewing_date']) ) | |
| { | |
| // This is a normal enquiry form | |
| unset( $form_controls['preferred_viewing_date'] ); |
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_rtdf", "correct_commercial_property_availability", 10, 3 ); | |
| function correct_commercial_property_availability( $post_id, $property, $import_id ) | |
| { | |
| $department = get_post_meta( $post_id, '_department', true ); | |
| if ( $department == 'commercial' ) | |
| { | |
| $to_rent = get_post_meta( $post_id, '_to_rent', true ); | |
| if ( $to_rent == 'yes' ) |
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
| <?php | |
| add_filter( 'ph_zoopla_rtdf_send_request_data', 'td_fix_zoopla_poa_per_channel', 20, 2 ); | |
| function td_fix_zoopla_poa_per_channel( $request_data, $post_id ) { | |
| $department = get_post_meta( $post_id, '_department', true ); | |
| if ( | |
| $department !== 'commercial' && | |
| function_exists( 'ph_get_custom_department_based_on' ) && |
NewerOlder