Moved function from marketplace to theme