Example #1
0
 /**
  * Все контроллеры проекта имеют преффикс. Если он указан в конфиге, то берём его, если нет — берём стандартный преффикс «Project_»
  */
 protected function _getControllerPrefix()
 {
     if (empty($this->_controllerPrefix)) {
         $this->_controllerPrefix = Fruitframe_Config::get('prefix') ? Fruitframe_Config::get('prefix') : 'Project';
     }
     return $this->_controllerPrefix;
 }
Example #2
0
 public function widgetsInitHook()
 {
     if (is_array($widgets = Fruitframe_Config::get('clear_widgets'))) {
         foreach ($widgets as $widgetName) {
             unregister_widget('WP_Widget_' . $widgetName);
         }
     }
 }
Example #3
0
 public function init()
 {
     $config = Fruitframe_Config::get();
     if (!empty($config['pages']) && is_array($config['pages']) && count($config['pages'])) {
         foreach ($config['pages'] as $page) {
             $page = is_array($page) ? $page : array('slug' => $page, 'title' => $page, 'text' => $page);
             $this->_addPage($page['slug'], $page['title'], $page['text']);
         }
     }
 }
Example #4
0
 public function __construct()
 {
     global $wpdb;
     $this->_wpdb = $wpdb;
     $this->_config = Fruitframe_Config::get();
     $this->_uploadDir = wp_upload_dir();
     $this->_targetDir = $this->_uploadDir['basedir'] . '/sneak_peek';
     $this->_path = realpath(dirname(__FILE__));
     $this->_url = FRUITFRAME_ROOT_URL . '/app/plugins/sneakpeek';
     $this->_adminTemplate = $this->_path . '/template_sneakpeek_admin.php';
 }
Example #5
0
From: <?php 
echo $values['name'];
?>
 <<?php 
echo $values['email'];
?>
>
<?php 
$configs = Fruitframe_Config::get();
foreach ($configs['contact']['fields'] as $key => $val) {
    ?>
	<?php 
    echo $key;
    ?>
: <?php 
    echo $values[$key];
    ?>

<?php 
}
?>
---

Это сообщение было отправлено с помощью контактной формы сайта <?php 
echo site_url();
Example #6
0
 public function __construct()
 {
     $this->_config = Fruitframe_Config::get();
     $this->_path = realpath(dirname(__FILE__));
 }
Example #7
0
 public function parseOptions($options = array())
 {
     return Fruitframe_Config::get('options');
 }
Example #8
0
function fruitframe_get_config($path = NULL)
{
    return Fruitframe_Config::get($path);
}
Example #9
0
 public function initPlugins()
 {
     foreach (Fruitframe_Config::get('plugins') as $plugin) {
         $className = 'Fruitframe_Plugin_' . ucfirst($plugin);
         require_once FRUITFRAME_PLUGINS . '/' . $plugin . '/' . $plugin . '.php';
         $obj = new $className();
         $obj->init();
         unset($obj);
     }
 }