Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
938 views
in Plugins by
I would like to read constant values (settings) from one place, and thought of using qa-plugin.php

Can I declare global variables in qa-plugin.php? What to be aware of?
by
That is a good point. I found myself repeating 'constants' across multiple files in a plugin.
by
I still haven't found out how declare a global variable in a qa-plugin.php and read it e.g. from a widget module or layer...

1 Answer

0 votes
by
Yes, you can by all means - just make sure you stick to a namespace which won't clash with other things, e.g. use your plugin name as a variable prefix.
by
thanks for your reply :)
...