Exemplo n.º 1
0
 /**
  * Anonymous and unique site identifier (Hash).
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.1.0
  *
  * @return string
  */
 function get_anonymous_id()
 {
     if (!self::$_accounts->has_option('unique_id')) {
         self::$_accounts->set_option('unique_id', md5(get_site_url()), true);
     }
     return self::$_accounts->get_option('unique_id');
 }
 /**
  * Anonymous and unique site identifier (Hash).
  *
  * @author Vova Feldman (@svovaf)
  * @since  1.1.0
  *
  * @return string
  */
 function get_anonymous_id()
 {
     if (!self::$_accounts->has_option('unique_id')) {
         $key = get_site_url();
         // If localhost, assign microtime instead of domain.
         if (WP_FS__IS_LOCALHOST || false !== strpos($key, 'localhost')) {
             $key = microtime();
         }
         self::$_accounts->set_option('unique_id', md5($key), true);
     }
     return self::$_accounts->get_option('unique_id');
 }
Exemplo n.º 3
0
 function has_option($option)
 {
     return $this->_options->has_option($option);
 }