- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Referred between 50 and 99 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 250 000 and 1 000 000 dollars
Hey guys,
how do you include custom plugins into your WP themes? I am asking about custom plugins, not plugins hosted on wordpress.org. We want to include Revolution Slider from CodeCanyon into our theme and are wandering how to do it.
Any tips and best practices are most appreciated 
Thanks!
- Most Wanted Bounty Winner
- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 5-6 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Won a Competition
- Bought between 100 and 499 items
- Exclusive Author
- Referred between 200 and 499 users
With include .. Of course, plugins which aren’t too OOP in order to give you high flexibility, need some level of customizing(for example, the plugins directory or other stuff).
So i customize it a bit(i try to keep this at minimum) and have a file where i record all changes(exact files, exact lines), so that when i update i know exactly what to change..
I’m not sure if this is the best way, but i don’t see another way with plugins that need to be modified in order to work..
I’ve bought a theme once, which added the plugin into my plugins folder. No includes, no anything. It simply added the plugin and activated it.. Have no idea how it had done that 
I’ve bought a theme once, which added the plugin into my plugins folder. No includes, no anything. It simply added the plugin and activated it.. Have no idea how it had done thatMaybe this http://tgmpluginactivation.com/ ?![]()
RubenBristian said
I’ve bought a theme once, which added the plugin into my plugins folder. No includes, no anything. It simply added the plugin and activated it.. Have no idea how it had done that![]()
Most use this http://tgmpluginactivation.com
There’s also this http://codex.wordpress.org/Must_Use_Plugins
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Referred between 50 and 99 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 250 000 and 1 000 000 dollars
Thanks everybody, TGM seems perfect 
Just a question, can we add .htaccess file to limit access to the packaged plugin? Otherwise the zip files are publicly accessible from URL – didn’t have time to test it yet but I think TGM probably doesn’t have a way to protect those premium packages from being downloaded directly in browser. I think such vulnerability exceeds the use of extended license. Ideas?
Sorry, I don’t want create new thread to ask this.
Can I use this plugin http://www.pixedelic.com/plugins/camera/wp.php to start selling here? moving the plugin source to my themes part.
Thank you
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Referred between 50 and 99 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 250 000 and 1 000 000 dollars
Since nobody replied, I will just share what we came up with. Giving restricted permissions on the zip files does not usually “stick” when uploading via FTP app, has inconsistencies in server environments etc so we went with that .htaccess file. We tried to block access with 403 but for some reason that did not work on our localhost (but did work on production server). So to play it on the safe side, we went with a simple redirect which should hopefully work in 99% cases. Here is the code in .htaccess:
RewriteEngine On
RewriteRule ^(.*)$ http://%{HTTP_HOST} [L,R=301]
What that does is it redirects all requests (recursively) from the /plugins/ directory to homepage.
We put this .htaccess file to:
/wp-content/themes/ourtheme/plugins/.htaccess
The plugins zip files are in this location:
/wp-content/themes/ourtheme/plugins/plugin.zip
This thread is still open for ideas, this is just me sharing what we want to use at this point.
- Sold between 100 000 and 250 000 dollars
- Won a Competition
- Author was Featured
- Item was Featured
- Referred between 500 and 999 users
- Author had a Free File of the Month
- Author had a File in an Envato Bundle
- Bought between 10 and 49 items
freshface saidyou’re afraid of users trying to directly download the plugin zip from your theme folder ?
What that does is it redirects all requests (recursively) from the /plugins/ directory to homepage.
