/**
  * @return ICWP_WPSF_WpFilesystem
  */
 public static function GetInstance()
 {
     if (is_null(self::$oInstance)) {
         self::$oInstance = new self();
     }
     return self::$oInstance;
 }
 /**
  * @return ICWP_WPSF_WpFilesystem
  */
 public static function loadFileSystemProcessor()
 {
     if (!isset(self::$oFs)) {
         require_once dirname(__FILE__) . ICWP_DS . 'icwp-wpfilesystem.php';
         self::$oFs = ICWP_WPSF_WpFilesystem::GetInstance();
     }
     return self::$oFs;
 }
Пример #3
0
 /**
  * @return string|false
  */
 public static function WhatIsMyIp()
 {
     $sIp = '';
     if (class_exists('ICWP_WPSF_WpFilesystem')) {
         $oWpFs = ICWP_WPSF_WpFilesystem::GetInstance();
         $sIp = $oWpFs->getUrlContent(self::IpifyEndpoint);
         if (empty($sIp) || !is_string($sIp)) {
             $sIp = '';
         }
     }
     return $sIp;
 }