Register plugins via XML or JSON configuration file #44

Closed
GaryJones opened this Issue Oct 10, 2011 · 3 comments

3 participants

@GaryJones

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

Why not JSON instead?

@GaryJones

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

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.

@GaryJones GaryJones was assigned Dec 27, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment