예제 #1
0
파일: Abstract.php 프로젝트: jasmun/Noco100
 /**
  * Checks if plugin translation files exist and inits the plugin textdomain
  *
  * @return bool
  */
 protected function _initTranslation()
 {
     $result = false;
     if ($this->_pathinfo->hasRootLang()) {
         $langRelPath = $this->_pm->getPathinfo()->getDirname() . '/modules/' . $this->_pathinfo->getDirname() . '/lang';
         $result = IfwPsn_Wp_Proxy::loadTextdomain($this->getTextDomain(), false, $langRelPath);
     }
     return $result;
 }
예제 #2
0
파일: Module.php 프로젝트: jasmun/Noco100
 /**
  * @return mixed
  */
 protected function _init()
 {
     if ($this->_module->isCustomModule()) {
         $uploadDir = IfwPsn_Wp_Proxy_Blog::getUploadDir();
         $this->_url = $uploadDir['baseurl'] . '/' . $this->_customLocationName . '/' . $this->_pathinfo->getDirname() . '/';
     } else {
         // built-in module
         $dirnamePathParts = array_reverse(explode(DIRECTORY_SEPARATOR, $this->_pathinfo->getDirnamePath()));
         $this->_url = plugins_url($dirnamePathParts[3]) . '/modules/' . $this->_pathinfo->getDirname() . '/';
     }
     $this->_urlFiles = $this->_url . 'files/';
     $this->_urlCss = $this->_urlFiles . 'css/';
     $this->_urlJs = $this->_urlFiles . 'js/';
     $this->_urlImg = $this->_urlFiles . 'img/';
     $this->_version = $this->_module->getVersion();
     $this->_name = $this->_module->getName();
     $this->_description = $this->_module->getDescription();
     $this->_textDomain = $this->_module->getTextDomain();
     $this->_homepage = $this->_module->getHomepage();
 }