/** * Send an error notifier request to Rublon (use a workaround if cURL not present) * * @param string $msg * @return string */ private function _notify($msg) { $data = array(); $data['msg'] = $msg; $data['request_uri'] = $_SERVER['REQUEST_URI']; try { RublonHelper::notify($data, array('message-type' => RublonHelper::RUBLON_NOTIFY_TYPE_ERROR)); } catch (Exception $e) { // Do nothing. } return ''; }
function rublon2factor_anonymous_stats_agreement() { $post = $_POST; $other_settings = RublonHelper::getSettings('other'); if (!empty($post['nonce']) && wp_verify_nonce($post['nonce'], Rublon_Pointers::ANONYMOUS_STATS_ALLOWED)) { $other_settings[Rublon_Pointers::ANONYMOUS_STATS_ALLOWED] = $post['answer']; RublonHelper::saveSettings($other_settings, 'other'); if ($post['answer'] == RublonHelper::YES) { try { RublonHelper::notify(array('msg' => 'Preliminary statistics from a WordPress site.'), array('message-type' => RublonHelper::RUBLON_NOTIFY_TYPE_STATS)); } catch (Exception $e) { // Do nothing. } } } }