mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-03 19:57:57 +02:00
Site Class: code optimization.
This commit is contained in:
@@ -97,11 +97,7 @@
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function title() {
|
public static function title() {
|
||||||
|
return call_user_func(ucfirst(Uri::command()).'::title');
|
||||||
// Get title
|
|
||||||
$title = call_user_func(ucfirst(Uri::command()).'::title');
|
|
||||||
|
|
||||||
return $title;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -115,15 +111,7 @@
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function description() {
|
public static function description() {
|
||||||
|
return (trim(call_user_func(ucfirst(Uri::command()).'::description')) == '') ? Html::toText(Option::get('description')) : Html::toText($description);
|
||||||
// Get description
|
|
||||||
$description = call_user_func(ucfirst(Uri::command()).'::description');
|
|
||||||
|
|
||||||
if (trim($description) !== '') {
|
|
||||||
return Html::toText($description);
|
|
||||||
} else {
|
|
||||||
return Html::toText(Option::get('description'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -137,16 +125,7 @@
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function keywords() {
|
public static function keywords() {
|
||||||
|
return (trim(call_user_func(ucfirst(Uri::command()).'::keywords')) == '') ? Html::toText(Option::get('keywords')) : Html::toText($description);
|
||||||
// Get keywords
|
|
||||||
$keywords = call_user_func(ucfirst(Uri::command()).'::keywords');
|
|
||||||
|
|
||||||
if (trim($keywords) !== '') {
|
|
||||||
return Html::toText($keywords);
|
|
||||||
} else {
|
|
||||||
return Html::toText(Option::get('keywords'));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -174,11 +153,7 @@
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function content() {
|
public static function content() {
|
||||||
|
return Filter::apply('content', call_user_func(ucfirst(Uri::command()).'::content'));
|
||||||
// Get content
|
|
||||||
$content = call_user_func(ucfirst(Uri::command()).'::content');
|
|
||||||
|
|
||||||
return Filter::apply('content', $content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user