Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

P2P Init

By: rolies106 on Jun 20th, 2012  |  syntax: PHP  |  size: 0.34 KB  |  views: 42  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function roots_connection_types() {
  2.   // Make sure the Posts 2 Posts plugin is active.
  3.   if ( !function_exists( 'p2p_register_connection_type' ) )
  4.     return;
  5.  
  6.   p2p_register_connection_type(array(
  7.     'name' => 'article_to_company',
  8.     'from' => 'article',
  9.     'to' => 'company'
  10.   ));
  11. }
  12. add_action( 'wp_loaded', 'roots_connection_types' );