thomasgriffin/TGM-Plugin-Activation — pull request #219 by jrfnl (2014-09-05 12:18:31+00:00)
Title: Improve extensibility

The changes in this PR allow for the class to be extended from a child class for a specific implementation and to set the parent_slug from the config.

The way the class was set up, extending from a child class would mean overloading a truck load of methods to get round the hard coded class name and some more convoluted coding to overrule the instance and the auto-instantiation of the class.
These changes take the pain out of extending the class and make it so this library can be have a clean upgrade path even when you extend the class.

#### Details:
* Allow setting of the parent menu item from the $config array
* Wrap instantiation in a hooked function (so it can be unhooked)
* Use the global to get to the instance.
This allows for an extended child class to set the global and for everything to still work provided the child class provides their own static `get_instance()` method which sets their own static `$instance` property.
* Force instantiation via `get_instance()` by making the constructor protected