I’m pleased to announce that the Posts 2 Posts plugin now also supports posts-to-users connections. (It supports users-to-users connections as well, but there’s no UI for them).
This is made possible by a new p2p_type column on the wp_p2p table, with which we can clearly distinguish between user ids and post ids. If you’re upgrading from a previous version of Posts 2 Posts, all the existing connections will be automatically updated to have the correct value for this column.
For the next version, I’m thinking of supporting connections between posts on different blogs in a multisite network.


Thanks, what would be use case for p2u or u2u connections?
Oh, plenty. For example:
Note that for each connection, you can also store the date at which it was created, as well as any other arbitrary information.
Sounds great.
great, thanks.
Hi scribu,
After updating to 1.1.1 I get this error: ‘Call to undefined function p2p_split_posts()’
Any idea how to fix this?
I decided not to include the
p2p_split_posts()function in the plugin anymore, since you seem to be the only one that needs it.Here is the function definition:
Just put it in your
functions.phpfile.Hi Scribu,
Thanks, I can understand that you don’t want to maintain a function that no one uses… I’m still having troubles though with the function after upgrading. I posted it over here: http://wordpress.org/support/topic/plugin-posts-2-posts-access-values-in-connection-field-array
Thanks again!
“..supporting connections between posts on different blogs in a multisite network..”
The answer to the multilingual issue, please and thanks!!
That’s interesting. Note that the kind of support I’m thinking about is one in which a connection type connects at most two different blogs, i.e. posts from blog A are connected to posts from blog B.
So, if you are going for a different language per blog, you would need a new connection type for each additional language.
Fair enough.. I don’t mind having a box for each language..
I’m currently using (in a very small 20 pages site with 2 languages):
`’reciprocal’ => true,
‘cardinality’ => ‘many-to-one’`
to emulate a “one-to-one” connection.
But anyhow, this is great news, I’m starting a project now in which hopefully this new feature will be put to the test (coding would start sometime in January probably).
Thanks again!
Scribu,
after the update there is no option to add new posts in the connection box. Is there something we need to do to enable this?
Please post your call to
p2p_register_connection_type().$my_connection_type = p2p_register_connection_type( array(
‘from’ => ‘post’,
‘to’ => ‘osobe’,
‘fields’ => array(
‘uloga’ => ‘uloga:’,
‘lik’ => ‘lik:’
),
‘reciprocal’ => true,
‘prevent_duplicates’ => false,
));
$my_connection_type = p2p_register_connection_type( array(
‘from’ => ‘osobe’,
‘to’ => ‘filmovi’,
‘fields’ => array(
‘uloga’ => ‘uloga:’,
‘lik’ => ‘lik:’
),
‘reciprocal’ => true,
‘prevent_duplicates’ => false,
));
That’s a bug. Should be fixed in the development version (1.1.2-alpha).