[theme-reviewers] How to manage 3rd party libraries and dependencies in a theme framework

Simon Prosser pross at pross.org.uk
Mon Feb 20 21:52:19 UTC 2012

Why not just host the libs in a plugin? Then you can update that
whenever you like and the theme will not need updating.

2012/2/20 Maximilian von Wortdrücken <max.wortdrucken at gmail.com>:
> Hi all,
> I am working on a WP theme framework that will have a large number of
> dependencies on 3rd party code libraries. My intent is to provide theme
> developers with a simple interface (in the WP Admin dashboard) that allows
> them to easily import/include/update/delete 3rd party libraries--both server
> side *and* front end code libraries.
> I'm envisioning a system similar to a Linux package manager. With a system
> like this in place, theme developers using my framework could have easy
> access to all their favorite libs (above and beyond what is available from
> the WordPress default options), but I wouldn't have to bundle those libs
> with the theme. Additionally, this system would provide a standard API that
> child themes could use to verify dependencies upon being activated (and
> prompt the administrator to update or download those dependencies if need
> be).
> So my general question is: how can I build this functionality into my theme
> framework without it being rejected by the official WP theme review process?
> Here are the requirements:
> Theme developers can import and update 3rd party libraries independently.
> That is, without updating the theme framework itself.
> Child themes and the theme framework can check for dependencies before
> proceeding with certain actions.
> Developers and site admins can view a list of installed libraries and be
> notified of available updates.
> 3rd party libraries are limited only by whether or not they're publicly
> accessible on the Web.
> The theme framework would not come with any 3rd party libs installed.
> Instead, each library would be defined as a subclass of some base class that
> manages details like:
> name of lib
> remote address to connect to for downloading
> routine for connecting to server
> routine for unpacking / writing files to the file system
> installation path
> routine for determining version
> Theme framework would maintain a master list of all 3rd party libraries by
> maintaining the directory of subclasses. If a developer encounters the need
> for a particular library that isn't defined, she can easily create her own
> custom connector object (and submit it for inclusion in the next framework
> release).
> Here are some specific concerns:
> What are the rules regarding WP themes making connections to other servers
> (e.g., svn repos, github repos, etc.) ?
> What are the rules regarding WP themes downloading and unpacking files
> (e.g., a new version of some code library) from other servers?
> Does WordPress provide any kind of standard API for this already?
> Thanks in advance for your help and consideration.
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

My Blog: http://pross.org.uk/
Plugins : http://pross.org.uk/plugins/
Themes: http://wordpress.org/extend/themes/profile/pross

More information about the theme-reviewers mailing list