[theme-reviewers] How to manage 3rd party libraries and dependencies in a theme framework
Sayontan Sinha
sayontan at gmail.com
Tue Feb 21 16:20:42 UTC 2012
I did ask about this a few days back. Take a look here:
http://tgmpluginactivation.com/. Using the code here you will be able to
set dependencies on other plugins, making them "required" for certain
functionality to work or "recommended" for better suitability with your
theme.
On Tue, Feb 21, 2012 at 12:09 AM, jay Cauvain <wp at stormfire.me> wrote:
> Only if there are conditionals, so that the theme will function without
> the plugin, in case the user decides that they don't want the plugin.
> On Feb 21, 2012 1:09 AM, "Maximilian von Wortdrücken" <
> max.wortdrucken at gmail.com> wrote:
>
>> I thought about this possibility, but it left me with more
>> questions/problems:
>>
>> 1. Are plugins held to different standards with regards to making
>> connections to other servers and/or downloading and unpacking files from
>> those servers?
>> 2. One of the goals is to create an environment where child theme
>> developers can rely on the availability of this functionality (and thus be
>> freed from having to bundle 3rd party libraries with their themes). In
>> order to meet that goal, I would have to make the theme framework dependent
>> on a plugin. What are the WP theme review guidelines concerning this? Will
>> WordPress reviewers accept a theme framework that is dependent on certain
>> plugins?
>>
>>
>>
>>
>> On Mon, Feb 20, 2012 at 3:52 PM, Simon Prosser <pross at pross.org.uk>wrote:
>>
>>> 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
>>> _______________________________________________
>>> theme-reviewers mailing list
>>> theme-reviewers at lists.wordpress.org
>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>
>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
--
Sayontan Sinha
http://mynethome.net | http://mynethome.net/blog
--
Beating Australia in Cricket is like killing a celebrity. The death gets
more coverage than the crime.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120221/e3814694/attachment.htm>
More information about the theme-reviewers
mailing list