1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-06 13:16:54 +02:00

Monstra General Updates

This commit is contained in:
Awilum
2015-10-16 18:09:58 +03:00
parent 43297d2006
commit 1854cfe80e
34 changed files with 560 additions and 712 deletions

View File

@@ -4,4 +4,7 @@
* Set meta generator
*/
Action::add('theme_meta', 'setMetaGenerator');
function setMetaGenerator() { echo '<meta name="generator" content="Powered by Monstra '.Monstra::VERSION.'" />'."\n"; }
function setMetaGenerator()
{
echo '<meta name="generator" content="Powered by Monstra '.Monstra::VERSION.'" />'."\n";
}

View File

@@ -1,7 +1,7 @@
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');
/**
* Monstra CMS Defines
* Monstra Defines
*/
/**
@@ -91,3 +91,4 @@ define('MONSTRA_GZIP', false);
//define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306');
//define('MONSTRA_DB_USER', 'root');
//define('MONSTRA_DB_PASSWORD', 'password');

View File

@@ -3,7 +3,9 @@
/**
* Evaluate a string as PHP code
*/
if (MONSTRA_EVAL_PHP) Filter::add('content', 'evalPHP');
if (MONSTRA_EVAL_PHP) {
Filter::add('content', 'evalPHP');
}
function obEval($mathes)
{
ob_start();
@@ -13,7 +15,10 @@ function obEval($mathes)
return $mathes;
}
function evalPHP($str) { return preg_replace_callback('/\[php\](.*?)\[\/php\]/ms','obEval', $str); }
function evalPHP($str)
{
return preg_replace_callback('/\[php\](.*?)\[\/php\]/ms', 'obEval', $str);
}
/**
* Add shortcode parser filter

View File

@@ -4,4 +4,7 @@
* Add new shortcode {siteurl}
*/
Shortcode::add('siteurl', 'returnSiteUrl');
function returnSiteUrl() { return Option::get('siteurl'); }
function returnSiteUrl()
{
return Option::get('siteurl');
}