Fixed: Undefined function when finding image from parent page. Bug from porting this from a theme to a plugin.