[wp-hackers] Theme framework proposal

scribu scribu at gmail.com
Mon Mar 30 19:15:00 GMT 2009


On Mon, Mar 30, 2009 at 9:42 PM, Tong Zou <xitongzou at gmail.com> wrote:

> Sure, dependencies would be nice. Do you have a good idea on how I could
> implement or get started with a proposal like this? Help is appreciated.


You could implement one or two functions, similar to
register_activation_hook(), which would be called like this:

register_theme_dependencies(array(
     'foo-plugin' => '1.0'
     'another_plugin' => '3.3'
);

register_plugin_dependencies(array(
     'foo-plugin' => '1.0'
     'another_plugin' => '3.3'
);

Basically, what those functions do is check all deps and add the plugins
that are not already installed to a donwload queue. After that, the user is
asked if he wants to install them.

This shouldn't be too hard because WP already has automatic plugin
installation.

Of course, the devil is in the details.

-- 
http://scribu.net


More information about the wp-hackers mailing list