Skip to content

Javascript API

scribu edited this page Mar 22, 2013 · 7 revisions

(since 1.5.3-alpha)

The public API of the admin metabox is exposed via the window.P2PAdmin property.

Examples

Manually trigger a refresh of the connection candidates for a given metabox:

P2PAdmin.boxes['YOUR_CONNECTION_TYPE'].candidates.sync()

Delete all the connections for a particular connection type (for the current post):

P2PAdmin.boxes['YOUR_CONNECTION_TYPE'].connections.clear()

Clone this wiki locally