5

Okay, this may sound silly but stay with me.

I am packaging a Wordpress Premium Theme for sales in a major marketplace. The theme is heavily dependant on a couple of plugins (self-developed).

I cannot expect the buyers to manually install both my plugins before installing the theme. Now that I am packaging the themes for sale, how do I package the plugins with it?

I want the plugins to a part of the package I deliver to the buyers and the plugins should automatically install when the theme is installed.

On the other hand, I have seen Premium Theme developers packing some serious custom functionality into their themes. How is such extra functionality integrated with the themes? Can anyone link to any tutorials?

Saddam Azad
  • 53
  • 1
  • 5

2 Answers2

5

This class that I built with another developer should be a good solution for your problem. :)

https://github.com/thomasgriffin/TGM-Plugin-Activation

Thomas
  • 188
  • 3
  • 11
4

A good way to do this is to put your plugins in a directory in your theme. In your theme's functions.php...

  • Require the plugin files
  • For widget plugins, use the widgets_init action hook to call register_widget() for each one
Chris Carson
  • 1,835
  • 15
  • 13