Created
February 17, 2026 19:58
-
-
Save propertyhive/7b15fa07c6a696be84089a6930911c2d to your computer and use it in GitHub Desktop.
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_insert_postarr', 'draft_on_insert', 10, 3 ); | |
| function draft_on_insert( $data, $property, $import_id ) | |
| { | |
| $data['post_status'] = 'draft'; | |
| return $data; | |
| } | |
| add_filter( 'houzez_property_feed_update_postarr', 'keep_title_content_and_status', 10, 4 ); | |
| function keep_title_content_and_status($data, $property, $import_id, $post_id) | |
| { | |
| if ( empty($post_id)) | |
| { | |
| return $data; | |
| } | |
| $post = get_post( $post_id ); | |
| $data['post_title'] = $post->post_title; | |
| $data['post_content'] = $post->post_content; | |
| $data['post_status'] = $post->post_status; | |
| return $data; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment