Skip to content

Admin dropdown display

scribu edited this page Dec 5, 2012 · 1 revision

(Introduced in P2P 1.5)

Below are examples of values you can pass when registering a connection type to control where dropdowns are added, with which you can filter the list of posts in the admin area:

Example

p2p_register_connection_type( array(
  ...
  'admin_dropdown' => 'any'
) );

Possible values

Don't show admin dropdowns at all (default):

'admin_dropdown' => false

Show admin dropdowns everywhere:

'admin_dropdown' => 'any'

Show the admin dropdown only on the 'from' end:

'admin_dropdown' => 'from'

Show the admin dropdown only on the 'to' end:

'admin_dropdown' => 'to'