Putting $app out in the global space does in fact make it global (not to the namespace). What that ends up doing is colliding with other plugins built on this structure. It needs to go in a static variable in the app() function. Or, it needs to be unique.
https://github.com/aubreypwd/wp-plugin-boilerplate/blob/master/plugin-name.php#L24
Putting
$app
out in the global space does in fact make it global (not to the namespace). What that ends up doing is colliding with other plugins built on this structure. It needs to go in a static variable in theapp()
function. Or, it needs to be unique.$app
as static var inapp()
The second task above is so that you can use the below method to get to the app object: