protected function redirect_on_save()
{
$update = false;
$refresh_transients = $this->refresh_transients();
$reset_api_key = $this->reset_api_key();
$option_page = array('github_updater', 'github_updater_remote_management');
if (isset($_POST['action']) && 'update' === $_POST['action'] && (isset($_POST['option_page']) && in_array($_POST['option_page'], $option_page))) {
$update = true;
}
$redirect_url = is_multisite() ? network_admin_url('settings.php') : admin_url('options-general.php');
if ($update || $refresh_transients || $reset_api_key) {
$query = isset($_POST['_wp_http_referer']) ? parse_url($_POST['_wp_http_referer'], PHP_URL_QUERY) : null;
parse_str($query, $arr);
$arr['tab'] = !empty($arr['tab']) ? $arr['tab'] : 'github_updater_settings';
$arr['subtab'] = !empty($arr['subtab']) ? $arr['subtab'] : 'github_updater';
$location = add_query_arg(array('page' => 'github-updater', 'tab' => $arr['tab'], 'subtab' => $arr['subtab'], 'refresh_transients' => $refresh_transients, 'reset' => $reset_api_key, 'updated' => $update), $redirect_url);
wp_redirect($location);
exit;
}
}