Advertisement
rolies106

P2P Init

Jun 20th, 2012
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  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' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement