public function regenerate_webhook() { if (!isset($_POST['GitiumSubmitRegenerateWebhook'])) { return; } check_admin_referer('gitium-settings'); gitium_get_webhook_key(true); $this->success_redirect(__('Webhook URL regenerates. Please make sure you update any external references.', 'gitium'), $this->settings_menu_slug); }
function gitium_get_webhook() { if (defined('GIT_WEBHOOK_URL') && GIT_WEBHOOK_URL) { return GIT_WEBHOOK_URL; } $key = gitium_get_webhook_key(); $url = add_query_arg('key', $key, plugins_url('gitium-webhook.php', __FILE__)); return apply_filters('gitium_webhook_url', $url, $key); }