Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
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?
That is a good point. I found myself repeating 'constants' across multiple files in a plugin.
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
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.
thanks for your reply :)