BadgeOS initializes Posts-2-Posts Plug-in twice
-
I’m currently using both BadgeOS (which uses a version of Scribu’s Posts-2-Posts plug-in) as well as the Posts-2-Posts plug-in itself for other functionality on my blog.
The problem I am encountering is that it seems like BadgeOS loads Posts-2-Posts a second time, after P2P has already initialized by itself (I assume this is because BadgeOS ignores that P2P initializes itself when P2P is installed as a standalone plug-in side-by-side with BadgeOS.)
In particular, I’m noticing that P2P’s
_p2p_load()
function is executed twice on my blog.I’m not sure which other consequences this has, but one issue I’m noticing is that when I view the admin edit.php page for a post type, for which I have P2P add an additional admin column for a registered connection type, that column populates twice instead of once.
Is there a way to make BadgeOS not load P2P a second time? I was thinking about adding the following to P2P’s _p2p_load() function. Apart from the fact that I don’t know if this would actually work, this is obviously far from ideal:
static $p2p_counter = 0; $p2p_counter++; if ($p2p_counter > 1) { return; }
How can this be resolved?
- The topic ‘BadgeOS initializes Posts-2-Posts Plug-in twice’ is closed to new replies.