Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( "propertyhive_property_imported_expert_agent_xml", 'use_advert2_as_summary', 10, 2 );
- function use_advert2_as_summary($post_id, $property)
- {
- if ( isset($property->advert2) && (string)$property->advert2 != '' )
- {
- $my_post = array(
- 'ID' => $post_id,
- 'post_excerpt' => (string)$property->advert2,
- );
- // Update the post into the database
- $post_id = wp_update_post( $my_post );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement