![]() |
|
how to : enable a plugin from a theme - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: how to : enable a plugin from a theme (/thread-12942.html) |
how to : enable a plugin from a theme - vincent3569 - 2017-07-21 hi I have to enable a plugin from my theme (tags_extrats). How manage $priority, especially for this plugin ?
how to : enable a plugin from a theme - acrylian - 2017-07-21 You are not meant to enable plugins via the theme. There are plugins that are and need to be loaded earlier. If your theme has dependencies on plugins, add checks for it. I have a feeling with your goolgemaps topic that you are overcomplicating things a bit currently. how to : enable a plugin from a theme - sbillard - 2017-07-21 You need to copy the priority from the plugin's But maybe you don't have to enable it. You can always just how to : enable a plugin from a theme - vincent3569 - 2017-07-23 hi I try to create a custom album page with isotope layout. so I need to use tag_extras plugin to access on albums tags. the way I found to do that is to enable plugin in function.php. thanks in advance for your help. how to : enable a plugin from a theme - acrylian - 2017-07-24 But why don't you just put out a note to users that they have to enable the plugin first? You coudl do that on the plugin options for example or on that specific theme page as well. For that custom album layout you probably need the mutliple_layout plugins anyway. If you don't use it you should instead of using a switch on album.php as it is much cleaner codewise). Again, Zenphoto leaves you the freedom to do things different way. I would do it that way. A user using Zenphoto should naturally know about plugins and how to enable them. Especially since that is not complicated if support is built into a theme already. You should avoid such hard requirements of plugins because what if the plugin is not included anymore in the future? Then people even need to install it first (no plan to remove it though). how to : enable a plugin from a theme - vincent3569 - 2017-07-24 of course, there are 3 different ways (at least):
finaly, that is the 3rd way I use for my need. |