TGMPA / TGM-Plugin-Activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
http://tgmpluginactivation.com/
GNU General Public License v2.0
1.76k stars 430 forks source link

Register plugins via XML or JSON configuration file #44

Closed GaryJones closed 10 years ago

GaryJones commented 13 years ago

Following on from @zmk's suggestion in #41, I do like the idea of having an XML file as a configuration for registering plugins and options - the structure is such that it would be relatively trivial to understand, and read from.

Without restricting where the plugin and configuration should go (together) within a theme, looking for a tgmpa.xml file in the same directory as the class file (or thinking of a way to pass in a reference to the class file), or one level above it if it doesn't exist may work sufficiently well.

Update: A JSON config file should also be considered.

scribu commented 13 years ago

Why not JSON instead?

GaryJones commented 13 years ago

JSON may well be the better lightweight storage method here - I tend to just think of config files as more easily readable in <...> blocks than JSON brackets, quotes, semi-colons et al.

scribu commented 12 years ago

XML configuration files were invented because you can't define associative arrays directly in Java. There's no need for them in any modern, interpreted programming language.