/**
  * @param array $aData
  * @param string $sView
  * @return bool
  */
 protected function display($aData = array(), $sView = '')
 {
     if (empty($sView)) {
         $oWpFs = $this->loadFileSystemProcessor();
         $sCustomViewSource = $this->oPluginVo->getViewDir() . $this->doPluginPrefix('config_' . $this->sFeatureSlug . '_index') . '.php';
         $sNormalViewSource = $this->oPluginVo->getViewDir() . $this->doPluginPrefix('config_index') . '.php';
         $sFile = $oWpFs->exists($sCustomViewSource) ? $sCustomViewSource : $sNormalViewSource;
     } else {
         $sFile = $this->oPluginVo->getViewDir() . $this->doPluginPrefix($sView) . '.php';
     }
     if (!is_file($sFile)) {
         echo "View not found: " . $sFile;
         return false;
     }
     if (count($aData) > 0) {
         extract($aData, EXTR_PREFIX_ALL, $this->oPluginVo->getParentSlug());
         //slug being 'icwp'
     }
     ob_start();
     include $sFile;
     $sContents = ob_get_contents();
     ob_end_clean();
     echo $sContents;
     return true;
 }
Exemplo n.º 2
0
 /**
  */
 protected function __construct()
 {
     if (empty(self::$sRootFile)) {
         self::$sRootFile = __FILE__;
     }
     self::$aFeatures = array('plugin', 'css', 'less');
     self::$sVersion = '3.3.5-0';
     self::$sPluginSlug = 'wptb';
     self::$sHumanName = 'WordPress Twitter Bootstrap';
     self::$sMenuTitleName = 'Twitter Bootstrap';
     self::$sTextDomain = 'wordpress-bootstrap-css';
     self::$fLoggingEnabled = false;
 }
Exemplo n.º 3
0
 public function onWpDeactivatePlugin()
 {
     if (current_user_can($this->oPluginVo->getBasePermissions())) {
         do_action($this->doPluginPrefix('delete_plugin_options'));
     }
 }