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:
@@ -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";
|
||||
}
|
||||
|
@@ -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');
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -4,4 +4,7 @@
|
||||
* Add new shortcode {siteurl}
|
||||
*/
|
||||
Shortcode::add('siteurl', 'returnSiteUrl');
|
||||
function returnSiteUrl() { return Option::get('siteurl'); }
|
||||
function returnSiteUrl()
|
||||
{
|
||||
return Option::get('siteurl');
|
||||
}
|
||||
|
Reference in New Issue
Block a user