Plugin Directory

Posts 2 Posts

Efficient many-to-many connections between posts, pages, custom post types, users.

1.3.1

  • sanitize connection fields values on save, preventing security exploits
  • improved connection field default value handling
  • added 'default_cb' as an optional key when defining connection fields
  • fixed parameter order for 'p2p_admin_box_show' filter
  • pass the current post ID to the 'p2p_new_post_args' filter

1.3

  • allow passing entire objects to get_connected(), connect() etc.
  • made get_related() work with posts-to-users connections
  • made each_connected() work with simple array of posts
  • introduced [p2p_connected] and [p2p_related] shortcodes
  • allow 'default' parameter in 'fields' array
  • more info

1.2

  • added Tools -> Connection Types admin screen
  • fixed migration script
  • made p2p_get_connections() accept arrays of ids
  • added 'separator' parameter to p2p_list_posts()
  • made P2P_Directed_Type->connect() return WP_Error instances instead of just false
  • when a user is deleted, delete all the associated connections
  • fixed conflict with bbPress Topics for Posts plugin
  • more info

1.1.6

  • convert "View All" tab into button
  • refresh candidate list after deleting a connection
  • fix cardinality check
  • introduce 'p2p_connection_type_args' filter
  • make 'connected_type' accept an array of connection type names
  • inadvertently remove support for queries without 'connected_type' parameter

1.1.5

  • added P2P_Connection_Type->replace() method
  • added 'self_connections' flag to p2p_register_connection_type()
  • made P2P_Connection_Type->each_connected() work for posts-to-users connections
  • made admin list table columns work for posts-to-users connections
  • fixed 'from_labels' and 'to_labels' parameters
  • fixed search being limited only to post titles

1.1.4

  • show attachment thumbnail instead of title
  • merged 'from_object' into 'from' and 'to_object' into 'to'
  • made posts-to-users queries respect 'to_query_vars' args
  • added $prop_name parameter to P2P_Type::each_connected()
  • fixed connection field name conflict

1.1.3

  • fixed regression related to posts-to-users direction
  • fixed admin columns overwriting each other
  • fixed incorrect direction in admin column links
  • added notices when connection type is not properly defined

1.1.2

  • fixed fields not being saved for posts-to-users connections
  • fixed missing "New Post" tab in admin box
  • fixed notice when deleting post

1.1.1

  • fixed faulty scbFramework loading
  • simplified syntax for defining posts-to-users connection types

1.1

  • add p2p_type column to the wp_p2p table
  • new low-level api: p2p_create_connection(), p2p_get_connections(), p2p_delete_connections(), p2p_connection_exists()
  • support posts-to-users and users-to-posts connection types in the admin
  • add 'from_labels' and 'to_labels' args to p2p_register_connection_type()
  • more info

1.0.1

  • don't show metabox at all if user doesn't have the required capability
  • fix checkbox handling when there are no other input fields
  • improve metabox styling
  • rename 'show_ui' to 'admin_box'
  • add 'admin_column' parameter

1.0

  • widget can now list related posts
  • add P2P_Connection_Type::get_related() method
  • add 'can_create_post' arg to p2p_register_connection_type()
  • two-box mode for 'reciprocal' => false
  • more options for 'show_ui'
  • allow checkboxes, radio buttons and textareas as connection fields
  • allow drag & drop ordering in both directions
  • added get_previous(), get_next() and get_adjacent() methods to P2P_Connection_Type
  • more info

0.9.5

  • add '{from|to}_query_vars' args to p2p_register_connection_type()
  • add 'cardinality' arg to p2p_register_connection_type()
  • add 'id' arg and p2p_type() function
  • introduce p2p_split_posts()
  • remove p2p_connect(), p2p_disconnect() and p2p_get_connected()
  • more info

0.9.2

  • fix incorrect storage when creating a connection from the other end
  • respect 'reciprocal' => false when 'from' == 'to'
  • pass pagination numbers through number_format_i18n()

0.9.1

  • fix bug with each_connected()
  • add widget
  • allow 'from' and 'to' to be arrays again
  • improve RTL support

0.9

  • introduce dropdown connection fields
  • introduce 'sortable' arg to p2p_register_connection_type()
  • introduce 'data' arg to p2p_register_connection_type()
  • replace 'box' arg with hooks
  • replace p2p_each_connected() with P2P_Post_Type->each_connected()
  • allow using 'connected_meta' and 'connected_orderby' together
  • fix some translations
  • more info

0.8

  • added ability to create draft posts from the connection box. props Oren Kolker
  • show post status in the connection box. props Michael Fields
  • reduced number of queries by caching connection information
  • revamped p2p_each_connected()
  • introduced p2p_list_posts()
  • introduced 'connected_orderby', 'connected_order' and 'connected_order_num' query vars
  • more info

0.7

  • improved UI. props Alex Ciobica
  • added 'fields', 'context' and 'prevent_duplicates' args to p2p_register_connection_type()
  • more info

0.6

  • added p2p_each_connected()
  • fixed p2p_is_connected()
  • made p2p_get_connected() return p2p_ids even with $direction = 'any'
  • made compatible with Proper Network Activation
  • more info

0.5.1

  • fixed fatal error on Menus screen

0.5

  • added 'connected_meta' var to WP_Query
  • attach p2p_id to each post found via WP_Query
  • 'connected_to' => 'any' etc.
  • $data parameter can also be a meta_query
  • metabox bugfixes
  • fixed l10n loading
  • more info

0.4

  • introduced 'connected_from', 'connected_to', 'connected' vars to WP_Query
  • replaced $reciprocal with $data as the third argument
  • p2p_register_connection_type() accepts an associative array as arguments
  • removed p2p_list_connected()
  • added p2p_delete_connection()
  • more info

0.3

  • store connections using a taxonomy instead of postmeta
  • more info

0.2

  • UI that supports multiple related posts. props Patrik Bón
  • added p2p_list_connected() template tag
  • more info

0.1

Requires: 3.2 or higher
Compatible up to: 3.4
Last Updated: 2012-5-21
Downloads: 16,164

Average Rating

4 stars
(76 ratings)

Support

7 of 9 support threads in the last three weeks have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

2 people say it works.
0 people say it's broken.

100,1,1
100,1,1 100,2,2
100,1,1 100,3,3
100,2,2
100,1,1
100,1,1 100,1,1
100,1,1 100,2,2 100,2,2
100,3,3
100,3,3
100,3,3 0,1,0
0,1,0
100,1,1
100,1,1 100,2,2 100,3,3 100,3,3 100,4,4 100,3,3 100,2,2 100,4,4 100,1,1 100,1,1 100,3,3 100,1,1
100,2,2 100,1,1 100,6,6 100,3,3 100,1,1 100,1,1 100,1,1
71,7,5 100,4,4 67,6,4 100,3,3
100,3,3 100,3,3 100,2,2