![]() |
|
Can a theme enable a plugin? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: Can a theme enable a plugin? (/thread-11623.html) |
Can a theme enable a plugin? - JimBrown - 06-02-2014 As the title says... I looked through the docs for Plugin Architecture and saw the options['note']. Also looked at the Theming Tutorial. Didn't see anything that would allow a theme to force a plugin to be enabled. If there isn't such a thing, I'm guessing there's a good reason for it, right? ;-) Thanks, Can a theme enable a plugin? - sbillard - 06-02-2014 Themes can force plugins to be loaded by doing the You can also use the BTW, this variant of setOption allows you to set any option temporarily. Can a theme enable a plugin? - acrylian - 06-02-2014 The best probably is to have a theme work generally without any plugins even if that means real basic functionality. "Progressive enhancement" so to speak. That way your site will not break if a plugin gets (suddenly) incompatible on a Zenphoto upgrade. Can a theme enable a plugin? - sbillard - 06-02-2014 I should mention as well that there is a proscribed loading order for plugins. So a theme can really only enable Theme plugins directly. So for instance it would not likely work to have a theme enable the Of course a custom plugin could be made to enable the other plugins or the theme option initialization could permanently enable the plugin. But with the latter there is no guarantee that the user would not disable it later. If what you are building is really specific to your theme perhaps it would be better to make it part of the theme scripts and/or the theme's Can a theme enable a plugin? - JimBrown - 07-02-2014 Ok, I think I understand the issues. Thanks for the explanations. ...jim |