Automattic/jetpack — pull request #653 by blobaugh (2014-06-05 00:35:07+00:00)
Title: Refactor out code duplication on module activation/deactivation

When enabling/disabling a module there is duplicate code that pings WordPress.com with
the update. Abstracting this out into a method in Jetpack::toggle_module_on_wpcom().
This allows the dev on a module to simply do something such as:
add_action( 'jetpack_activate_module_monitor', array( 'Jetpack', 'toggle_module_on_wpcom' ) );
add_action( 'jetpack_deactivate_module_monitor', array( 'Jetpack', 'toggle_module_on_wpcom' ) );

This update seems to work fine. Can I get some other eyes on it before merging?