/** * Updates the post votes via an HTTP request. * * @wp-hook template_redirect * * @return void */ public function update_http() { if (!is_user_logged_in()) { return; } if (!$this->nonce->is_valid()) { return; } if (!$this->update()) { return; } $url = filter_input(INPUT_POST, '_wp_http_referer'); $url = urldecode($url); $url = esc_url($url); wp_safe_redirect($url); }