Changed a private function to public, to be able to make use of it within a theme.