Sorry, this is a noob question. But, I want to follow the best practices.
I read that functions and global variables should be prefixed in plugins.
So, for example, myfunction()
, should be lax_myplugin_myfunction()
. And a variable, such as $myvar
, should be $lax_myplugin_myvar
.
Do I need to prefix a variable if it's in a function? For example,
lax_myplugin_myfunction() {
$count = 50;
return $count;
}
Should I prefix $count
and make it $lax_myplugin_count
? Or I don't have to bother with it as it's in a function. What's the best practice?
Thank you.