• Resolved Derek Perkins

    (@ploobers)


    For most of my connections, I don’t care whether I connected the object ‘from’ or ‘to’ the other. I’d like to see when I’m editing a post any posts that are connected, regardless where the connection was made from.

    Also, I’d like to be able to call a function from the API that returns all the connections without regard to direction. I know that the way that it currently works, I can just call the p2p_get_connected function twice, but that seems awkward.

    Related, what if a connection is made both from and to? That seems like double effort.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author scribu

    (@scribu)

    For most of my connections, I don’t care whether I connected the object ‘from’ or ‘to’ the other. I’d like to see when I’m editing a post any posts that are connected, regardless where the connection was made from.

    You can do this:

    p2p_register_connection_type( 'post_type_a', 'post_type_b', true );

    Notice the third parameter.

    Related, what if a connection is made both from and to? That seems like double effort.

    Yes, it has a certain overhead, but it avoids inconsistencies.

    Also, I’d like to be able to call a function from the API that returns all the connections without regard to direction. I know that the way that it currently works, I can just call the p2p_get_connected function twice, but that seems awkward.

    I’ve added that option in the development version (0.4-alpha2)

    Thread Starter Derek Perkins

    (@ploobers)

    Thanks for the quick response. I have been using the third parameter as true, I must have just not checked for it to display on both sides of the connection since I upgraded to 0.3.

    I’ve added that option in the development version (0.4-alpha2)

    When do you expect to release 0.4?

    Plugin Author scribu

    (@scribu)

    You can already use it as is (see the link).

    I don’t have a feature plan for 0.4 so I don’t know when that will be.

    Thread Starter Derek Perkins

    (@ploobers)

    I’m using it and it’s working like a charm. Thanks so much for your quick response and lightning fast implementation.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Posts 2 Posts] Returns all connection, regardless of direction’ is closed to new replies.