mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-15 17:44:31 +02:00
#431 initial commit for MONSTRA 4
This commit is contained in:
15
monstra/boot/actions.php
Executable file
15
monstra/boot/actions.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Monstra.
|
||||
*
|
||||
* (c) Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
// Set Monstra Meta Generator
|
||||
Action::add('theme_meta', function () {
|
||||
echo('<meta name="generator" content="Powered by Monstra" />');
|
||||
});
|
34
monstra/boot/defines.php
Executable file
34
monstra/boot/defines.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Monstra.
|
||||
*
|
||||
* (c) Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
// Define the path to the root directory (without trailing slash).
|
||||
define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()));
|
||||
|
||||
// Define the path to the storage directory (without trailing slash).
|
||||
define('SITE_PATH', ROOT_DIR . '/site');
|
||||
|
||||
// Define the path to the storage directory (without trailing slash).
|
||||
define('STORAGE_PATH', SITE_PATH . '/storage');
|
||||
|
||||
// Define the path to the themes directory (without trailing slash).
|
||||
define('THEMES_PATH', SITE_PATH . '/themes');
|
||||
|
||||
// Define the path to the plugins directory (without trailing slash).
|
||||
define('PLUGINS_PATH', SITE_PATH . '/plugins');
|
||||
|
||||
// Define the path to the config directory (without trailing slash).
|
||||
define('CONFIG_PATH', SITE_PATH . '/config');
|
||||
|
||||
// Define the path to the cache directory (without trailing slash).
|
||||
define('CACHE_PATH', SITE_PATH . '/cache');
|
||||
|
||||
// Define the path to the cache directory (without trailing slash).
|
||||
define('ACCOUNTS_PATH', SITE_PATH . '/cache');
|
16
monstra/boot/filters.php
Executable file
16
monstra/boot/filters.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Monstra.
|
||||
*
|
||||
* (c) Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
// Add Shortcode parser filter
|
||||
Filter::add('content', 'Shortcode::parse', 1);
|
||||
|
||||
// Add Parsedown parser filter
|
||||
Filter::add('content', 'Markdown::parse', 2);
|
22
monstra/boot/shortcodes.php
Executable file
22
monstra/boot/shortcodes.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Monstra.
|
||||
*
|
||||
* (c) Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
// Add {block name=block-name} shortcode
|
||||
Shortcode::add('block', function ($attributes) {
|
||||
if (isset($attributes['name'])) {
|
||||
return Blocks::get($attributes['name']);
|
||||
}
|
||||
});
|
||||
|
||||
// Add {site_url} shortcode
|
||||
Shortcode::add('site_url', function () {
|
||||
return Url::getBase();
|
||||
});
|
Reference in New Issue
Block a user