websharks/quick-cache — pull request #345 by jaswsinc (2014-09-30 08:31:06+00:00)
Title: Plugin framework enhancements. Uninstall stub loader added too. See: web...

Plugin framework enhancements. Uninstall stub loader added too. See: websharks/quick-cache#334

## Framework Enhancements

- Adding a new property: `\quick_cache\plugin::$slug` so that moving forward we can reference that property instead of constantly doing a `str_replace('_', '-', __NAMEPSACE__)` in several places.

- Adding an `uninstall.php` stub loader; together with `uninstall.inc.php`. The stub checks for the existence of PHP v5.3 before loading. Resolves #334

- Adding two new global flags. One to tell QC whether it should autoload or not. Another to tell QC if it's uninstalling or not. `$GLOBALS[__NAMESPACE__.'_autoload_plugin']` and `$GLOBALS[__NAMESPACE__.'_uninstalling']`.

- Adding a cached check at the top of `\quick_cache\plugin::setup()` to prevent this method from ever being run more than once. This allows the activate, delete, and uninstall routines to ensure the plugin is setup before running, but without the risk of setting the plugin hooks/filters/options up more than once; in a case where it's already been done in one way or another.