Closed GaryJones closed 10 years ago
Why not JSON instead?
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.
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.
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.