/** * */ protected function _loadAdminJs() { $adminJsPath = $this->_pathinfo->getRootJs() . 'admin.js'; if (file_exists($adminJsPath)) { $handle = $this->getId() . '-' . 'admin-js'; IfwPsn_Wp_Proxy_Script::loadAdmin($handle, $this->_env->getUrlJs() . 'admin.js', array(), $this->getVersion()); } }
/** * @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(); }