JS should check for "wp" var before using