public function load_hooks()
{
add_action('init', array(&$this, 'init'));
add_action('init', array(&$this, 'background_update'));
add_action('init', array(&$this, 'set_options_filter'));
add_action('wp_ajax_github-updater-update', array(&$this, 'ajax_update'));
add_action('wp_ajax_nopriv_github-updater-update', array(&$this, 'ajax_update'));
// Load hook for shiny updates Bitbucket authentication headers.
$bitbucket = new Bitbucket_API(new \stdClass());
add_filter('http_request_args', array(&$bitbucket, 'ajax_maybe_authenticate_http'), 15, 2);
add_filter('extra_theme_headers', array(&$this, 'add_headers'));
add_filter('extra_plugin_headers', array(&$this, 'add_headers'));
add_filter('upgrader_source_selection', array(&$this, 'upgrader_source_selection'), 10, 4);
/*
* The following hook needed to ensure transient is reset correctly after
* shiny updates.
*/
add_filter('http_response', array('Fragen\\GitHub_Updater\\API', 'wp_update_response'), 10, 3);
}