Advertisement
reneelung

reneelung's p2p_register_connection_type

Apr 10th, 2012
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. if (!function_exists('p2p_register_connection_type'))
  2. return;
  3.  
  4. p2p_register_connection_type(array(
  5. 'name' => 'posts_to_athletes',
  6. 'to' => 'post',
  7. 'from' => 'athletes'
  8.  
  9. ));
  10.  
  11.  
  12. p2p_register_connection_type(array(
  13. 'name' => 'galleries_to_photos',
  14. 'to' => 'galleries',
  15. 'from' => 'photos'
  16. ));
  17.  
  18. p2p_register_connection_type(array(
  19. 'name' => 'athletes_to_sports',
  20. 'to' => 'athletes',
  21. 'from' => 'sports'
  22. ));
  23.  
  24. p2p_register_connection_type(array(
  25. 'name' => 'posts_to_sports',
  26. 'to' => 'post',
  27. 'from' => 'sports'
  28. ));
  29.  
  30. p2p_register_connection_type(array(
  31. 'name' => 'photos_to_athletes',
  32. 'to' => 'photos',
  33. 'from' => 'athletes'
  34. ));
  35.  
  36. p2p_register_connection_type(array(
  37. 'name' => 'videos_to_athletes',
  38. 'from' => 'videos',
  39. 'to' => 'athletes'
  40. ));
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement