1869 posts YOU TOUCH IT YOU BUY IT
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+6 more
FRESHFACE says

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!

3524 posts Ruben Bristian
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
KrownThemes says

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 :D

560 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
Gareth_Gillman says
3 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 100+ items on Envato Market
momofone says
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 :D
Maybe this http://tgmpluginactivation.com/ ?
707 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
ChillThemes says

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 :D

Most use this http://tgmpluginactivation.com

There’s also this http://codex.wordpress.org/Must_Use_Plugins

48 posts
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+6 more
minti says
1869 posts YOU TOUCH IT YOU BUY IT
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+6 more
FRESHFACE says

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?

60 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
+3 more
DavidGuns says

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

1869 posts YOU TOUCH IT YOU BUY IT
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+6 more
FRESHFACE says

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.

491 posts
  • Has referred 1000+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+8 more
pixelentity says

What that does is it redirects all requests (recursively) from the /plugins/ directory to homepage.
you’re afraid of users trying to directly download the plugin zip from your theme folder ?
by
by
by
by
by
by