SHARE
TWEET

P2P Init

rolies106 Jun 20th, 2012 50 Never
  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' );
RAW Paste Data
Top