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

Maximilian von Wortdrücken max.wortdrucken at gmail.com
Mon Feb 20 21:32:45 UTC 2012


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:

   1. Theme developers can import and update 3rd party libraries
   independently. That is, without updating the theme framework itself.
   2. Child themes and the theme framework can check for dependencies
   before proceeding with certain actions.
   3. Developers and site admins can view a list of installed libraries and
   be notified of available updates.
   4. 3rd party libraries are limited only by whether or not they're
   publicly accessible on the Web.
   5. 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:
      1. name of lib
      2. remote address to connect to for downloading
      3. routine for connecting to server
      4. routine for unpacking / writing files to the file system
      5. installation path
      6. routine for determining version
   6. 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:

   1. What are the rules regarding WP themes making connections to other
   servers (e.g., svn repos, github repos, etc.) ?
   2. What are the rules regarding WP themes downloading and unpacking
   files (e.g., a new version of some code library) from other servers?
   3. Does WordPress provide any kind of standard API for this already?



Thanks in advance for your help and consideration.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120220/63e91cd3/attachment.htm>


More information about the theme-reviewers mailing list