DISQUS

Fun with WordPress: Plugin Config: WordPress vs Habari

  • Owen · 1 year ago
    One of the many design considerations when building the plugin functionality in Habari was explicitly that WordPress made you create whole options pages for your plugins when you might have one checkbox to configure things. We try to handle this in Habari by making the config of the plugin integrate better with the software as a whole.

    Something you might have overlooked while you were describing this is the significance of this line in your Habari plugin:

    if ( $plugin_id == $this->plugin_id() )


    Yes, your plugin can actually add configuration options to other plugins. Users may appreciate this powerful feature when coupled with our upcoming dependency functionality. A plugin could require that another plugin exist, and then add to its functionality.

    For example, you could install a core spam-checking plugin, and then extend its capabilities and configuration options without providing a separate interface to do so. Easily integrated, simple to code, fun to use.

    I think it's great to emphasize that all of these forms are built programmatically, rather than using hard-to-alter, fixed templates. For the effort, plugins have a consistent look, validation, uniform storage, and the immediate ability to be modified and extended easily by other plugins.

    The examples in this post are a good comparison of features. I hope that you might write something on the use of sub-templates in themes, where a plugin provides its own output by default, but can be overridden by a template in the current theme. This (output) would even be the next logical step for the plugin you've produced above!

    I am pleased that Habari is giving WordPress a good showing. Thanks again for another great article!
  • Andrew Rickmann · 1 year ago
    Thanks Owen.

    I am pretty much deciding on something I want to do then finding out how to do it so there are probably significances that I am missing. I hadn't though to extend the functionality of another plugin but it sounds like an excelllent idea.

    I noticed the sub-template thing in the documentation so I will certainly be taking a closer look. I am making a conscious decision to make posts a direct comparison to WordPress features so I will need to see where it takes me before I know whether to write it up or not.