PHP solution found
wrapped a conditional around the require_once
fixed a bug with the conditional
added a php solution for p2 and possibly pulsepress.. works with p2 but still need to test properly on pulsepress.