1862 posts YOU TOUCH IT YOU BUY IT
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
+1 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!

3426 posts Ruben Bristian
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
  • Referred between 500 and 999 users
+5 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

503 posts
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • United Kingdom
Gareth_Gillman says
3 posts
  • Bought between 100 and 499 items
  • Has been a member for 4-5 years
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
  • Sold between 10 000 and 50 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • Exclusive Author
  • Envato Studio (Microlancer) Beta Tester
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
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Germany
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Has been a member for 2-3 years
  • Exclusive Author
  • Bought between 100 and 499 items
+1 more
minti says
1862 posts YOU TOUCH IT YOU BUY IT
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
+1 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
  • Bought between 1 and 9 items
  • Sold between 1 000 and 5 000 dollars
  • Indonesia
  • Has been a member for 2-3 years
  • Exclusive Author
  • Envato Studio (Microlancer) Beta Tester
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

1862 posts YOU TOUCH IT YOU BUY IT
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
+1 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
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 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