01-27-2015, 06:21 PM
The variables are global by default, but each plugin executes in its own sandbox, so you don't need to prefix by plugin name, that's kinda counter-productive. You might want to use file-local variables, though - if you declare a variable as "local" on the file level (without any enclosing function), the variable will be accessible to all the file's functions, but no-where else. This is useful for self-contained modules that have some form of a global state, so that they don't leak that state out.
Of course, getting into the habit of using as much "local" as possible is always a good thing. I think when the Core plugin was developed this idea hasn't been rooted too strong yet, so there's a lot of instances in Core that could use localising
Of course, getting into the habit of using as much "local" as possible is always a good thing. I think when the Core plugin was developed this idea hasn't been rooted too strong yet, so there's a lot of instances in Core that could use localising