Guest User

Untitled

a guest
Nov 13th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. add_action( "propertyhive_property_imported_acquaint_xml", 'acquaint_username_to_office', 10, 2 );
  2. function acquaint_username_to_office($post_id, $property)
  3. {
  4. switch ( (string)$property->username )
  5. {
  6. case "Sally Smith":
  7. case "Gordon Greg":
  8. case "Tim Tommy":
  9. {
  10. update_post_meta( $post_id, '_office_id', 123 ); // replace 123 for the relevant office ID
  11. break;
  12. }
  13. case "Henry Harlem":
  14. case "Phil Potter":
  15. {
  16. update_post_meta( $post_id, '_office_id', 321 ); // replace 321 for the relevant office ID
  17. break;
  18. }
  19. }
  20. }
Add Comment
Please, Sign In to add comment