The kernel of the Posts 2 Posts plugin