Created
February 23, 2012 21:14
-
-
Save anonymous/1895087 to your computer and use it in GitHub Desktop.
Register connection type by remtheory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p2p_register_connection_type( array( | |
'name' => 'brand_to_product', | |
'from' => 'brand', | |
'to' => 'product' | |
) ); | |
p2p_register_connection_type( array( | |
'name' => 'brand_to_store', | |
'from' => 'brand', | |
'to' => 'store' | |
) ); | |
p2p_register_connection_type( array( | |
'name' => 'product_to_standard', | |
'from' => 'product', | |
'to' => 'standard' | |
) ); | |
p2p_register_connection_type( array( | |
'name' => 'product_to_store', | |
'from' => 'product', | |
'to' => 'store' | |
) ); | |
p2p_register_connection_type( array( | |
'name' => 'brand_to_standard', | |
'from' => 'brand', | |
'to' => 'standard' | |
) ); | |
} | |
add_action( 'wp_loaded', 'my_connection_types' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment