开发者

Wordpress: Package plugin with theme

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 wan开发者_开发技巧t 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?


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

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


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜