Advertisement
Guest User

wp_p2p_20130105

a guest
Jan 5th, 2014
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1.     p2p_register_connection_type ( array(
  2.         'name' => 'fish_to_catch',
  3.         'from' => 'fish-species',
  4.         'to' => 'catches',
  5.         'cardinality' => 'one-to-many',
  6.         'title' =>  array('to' => 'Fish Species','from' => 'Catch' ),
  7.         'admin_column' => 'to'     
  8.     ) );
  9.    
  10.     # Connect Catches and Users
  11.     p2p_register_connection_type ( array (
  12.         'name' => 'catch_to_user',
  13.         'from' => 'catches',
  14.         'to' => 'user',
  15.         'duplicate_connections' => true,
  16.         'title' =>  array('to' => 'Catch','from' => 'Users' ),
  17.         'admin_column' => 'from'
  18.         'fields' => array (
  19.             'member_role' => array (
  20.                 'title' => "Role",
  21.                 'type' => 'checkbox',
  22.                 'values' => array (
  23.                     'angler' => 'Angler',
  24.                     'boat_captain' => 'Captain'
  25.                 )
  26.             )
  27.         )
  28.     ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement