Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. $updatedPostId= wp_update_post(
  2. array(
  3. 'ID' => $thisId,
  4. 'post_title' => $newTitle
  5. )
  6. );
  7.  
  8. if(
  9. ($newTitle!='')&&
  10. (strcmp($newTitle, get_the_title($thisId))!=0)
  11. )
  12.  
  13. Eg:
  14. From 3rd party: Arnold Iron Whey [2 LBS] [Cookies & Cream]
  15. From Wordpress: Arnold Iron Whey [2 LBS] [Cookies & Cream]
  16.  
  17. (Note: My text editor highlights the ampersand and the space immediately after it
  18. in the 3rd-party product name but not in the one from Wordpress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement