Removed folder from function and created plugin for it.
Created plugin "TweetLocation" which uses shortcode
as "[twitterLocation]" and task is finished.