Automattic / babble

Multilingual WordPress done right.
https://wordpress.org/plugins/babble/
245 stars 50 forks source link

Remove `class-plugin.php` #222

Closed simonwheatley closed 9 years ago

simonwheatley commented 9 years ago

Most classes in Babble extend Babble_Plugin purely to use it's helper functions. Instead we should use core functions and APIs directly, and remove the Babble_Plugin class completely.

Steps:

simonwheatley commented 9 years ago

See: https://github.com/Automattic/babble/pull/214

simonwheatley commented 9 years ago

As part of removing the plugin class, we should remove all activation and deactivation hooks.

See also https://github.com/Automattic/babble/issues/242

johnbillion commented 9 years ago

I think this ticket has gone about as far as it can now. PR #314 removes a whole load of unused code, and removes the Babble_Plugin dependency from most classes.

The Babble_Jobs, Babble_Languages, Babble_Switcher_Interface, and BabbleTranslationGroupTool classes use the render_admin() and get_option() methods of this class so it makes sense that it remains. The methods in the Babble_Plugin class could all be converted to static methods, but we don't gain much from this.

simonwheatley commented 9 years ago

Agreed, thanks @johnbillion