コード例 #1
0
ファイル: Platform.php プロジェクト: juanmanunez/gantry5
 public function __construct(Container $container)
 {
     $this->content_dir = Folder::getRelativePath(WP_CONTENT_DIR);
     $this->includes_dir = Folder::getRelativePath(WPINC);
     $this->gantry_dir = Folder::getRelativePath(GANTRY5_PATH);
     parent::__construct($container);
     // Add wp-includes directory to the streams
     $this->items['streams']['wp-includes'] = ['type' => 'ReadOnlyStream', 'prefixes' => ['' => $this->includes_dir]];
 }
コード例 #2
0
ファイル: Platform.php プロジェクト: nmsde/gantry5
 public function __construct(Container $container)
 {
     parent::__construct($container);
     Folder::create(GANTRY5_ROOT . '/custom');
     // Initialize custom streams for Prime.
     $this->items['streams'] += ['gantry-prime' => ['type' => 'ReadOnlyStream', 'prefixes' => ['' => ['']]], 'gantry-custom' => ['type' => 'ReadOnlyStream', 'prefixes' => ['' => []]], 'gantry-pages' => ['type' => 'ReadOnlyStream', 'prefixes' => ['' => ['gantry-theme://overrides/pages', 'pages']]], 'gantry-positions' => ['type' => 'ReadOnlyStream', 'prefixes' => ['' => ['gantry-theme://overrides/positions', 'positions']]]];
     $this->items['streams']['gantry-layouts']['prefixes'][''][] = 'gantry-prime://layouts';
     $this->items['streams']['gantry-config']['prefixes'][''][] = 'gantry-prime://config';
 }
コード例 #3
0
ファイル: Platform.php プロジェクト: sam-suresh/gantry5
 public function init()
 {
     if ($this->multisite) {
         $theme = $this->get('streams.gantry-theme.prefixes..0');
         if ($theme) {
             $this->set('streams.gantry-theme.prefixes..0', $theme . $this->multisite);
         }
     }
     return parent::init();
 }
コード例 #4
0
ファイル: Platform.php プロジェクト: rastabrane/gantry5
 public function __construct(Container $container)
 {
     $this->content_dir = Folder::getRelativePath(WP_CONTENT_DIR);
     $this->includes_dir = Folder::getRelativePath(WPINC);
     $this->gantry_dir = Folder::getRelativePath(GANTRY5_PATH);
     parent::__construct($container);
     /**
      * Please remember to add the newly added streams to the add_gantry5_streams_to_kses()
      * in gantry5.php so they would get added to the allowed kses protocols.
      */
     // Add wp-includes directory to the streams
     $this->items['streams']['wp-includes'] = ['type' => 'ReadOnlyStream', 'prefixes' => ['' => $this->includes_dir]];
     // Add wp-content directory to the streams
     $this->items['streams']['wp-content'] = ['type' => 'ReadOnlyStream', 'prefixes' => ['' => $this->content_dir]];
 }
コード例 #5
0
ファイル: Platform.php プロジェクト: pensesmart/gantry5
 public function __construct(Container $container)
 {
     $this->content_dir = Folder::getRelativePath(WP_CONTENT_DIR);
     $this->gantry_dir = Folder::getRelativePath(GANTRY5_PATH);
     parent::__construct($container);
 }